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

From: Date: Wed, 10 Dec 2008 21:46:38 +0000
Subject: Re: converting a vid with ffmpeg - howto do progress bars?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-284436@lists.php.net to get a copy of this message
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


« previous php.general (#284436) next »