Wie kann ich ffmpeg-Informationen in PHP analysieren?

Wie erhält man bestimmte Informationen, wie die 'Dauer' der Ausgabe vonffmpeg -i /var/thismovie.avi ?

Ich benötige Bildhöhe, Bildbreite, Filmdauer und Bildrate. Alle diese sind in der Ausgabe des obigen Befehls, aber wie bekomme ich die Bits, die ich brauche, einzeln und stecke sie in eine Variable in PHP?

Ich habe es aufgegeben, zu installierenffmpeg-php Das ist, was ich vorher benutzt habe, um den gleichen Job zu machen.

Vielen Dank

ffmpeg -i /var/thismovie.avi eine Ausgabe wie diese erzeugen

ffmpeg version N-43171-ga763caf Copyright (c) 2000-2012 the FFmpeg developers built on Aug 3 2012 07:56:19 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-52) configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-pic --enable-libx264 --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --extra-cflags=-fPIC libavutil 51. 66.100 / 51. 66.100 libavcodec 54. 48.100 / 54. 48.100 libavformat 54. 22.100 / 54. 22.100 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 5.102 / 3. 5.102 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 [avi @ 0x18e8e240] non-interleaved AVI [avi @ 0x18e8e240] max_analyze_duration 5000000 reached at 5000000 Input #0, avi, from '/var/www/vhosts/mysite.com/httpdocs/movie.avi': Duration: 00:00:10.76, start: 0.000000, bitrate: 5180 kb/s Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 50 tbc Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, s16, 128 kb/s At least one output file must be specified` 

Antworten auf die Frage(4)

Ihre Antwort auf die Frage