Re: converting a vid with ffmpeg - howto do progress bars?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I call it from php with exec() atm.

just running the ffmpeg command shows some details and then a sort of continually updated status report;

Input #0, avi, from '/home/rene/web/LIVE_WEBSITES/www/veerman.name/mediaBeez_content/media/upload/20081210 220610/work/original/xy.avi':
 Duration: 00:43:03.3, start: 0.000000, bitrate: 1137 kb/s
 Stream #0.0: Video: mpeg4, yuv420p, 624x352, 23.98 fps(r)
 Stream #0.1: Audio: mp3, 48000 Hz, stereo, 112 kb/s
Output #0, flv, to '/home/rene/web/LIVE_WEBSITES/www/veerman.name/mediaBeez_content/media/upload/20081210 220610/work/highres/t.flv':
 Stream #0.0: Video: flv, yuv420p, 624x352, q=2-31, 999 kb/s, 23.98 fps(c)
 Stream #0.1: Audio: mp3, 22050 Hz, stereo, 0 kb/s
Stream mapping:
 Stream #0.0 -> #0.0
 Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 1031 fps= 21 q=2.6 size=    5752kB time=43.0 bitrate=1095.8kbits/s

(the last line continually updates)


since it doesnt print the number of input frames, i can't calculate progress from frame-count in the last line.
not even when i put "ffmpeg -v verbose", do i get the frame count..



Ashley Sheridan wrote:
On Wed, 2008-12-10 at 22:13 +0100, Rene Veerman wrote:
Hi, i got ffmpeg to convert videos for my CMS to Flash-video.
With debian, it was real easy to set up.

The only drawback is that if i can't advance the progressbar during the call to ffmpeg.. If i encode longer videos, it can take up to an hour each, and to halt the progressbar for that long is just bad imo.

Any ideas on how to read what ffmpeg is up to?



First, what does running just the ffmpeg command do (without getting PHP
involved) ? Is there any information you see which it gives as a
prediction of how long the transcode will take? Also, how are you
running the command? When I do my transcodes I tend to do it in the
background, as this will then continue should the user break the
connection, and avoids timeout issues.


Ash
www.ashleysheridan.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux