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

From: Date: Wed, 10 Dec 2008 23:03:51 +0000
Subject: Re: converting a vid with ffmpeg - howto do progress bars?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-284441@lists.php.net to get a copy of this message
Boyd, Todd M. wrote:
Top posting BAD! Hulk SMASH! Anyway, moving on... I believe "ffmpeg -i <filename.ext>" should give you frame count information (along with a bunch of other stuff). It will have to be parsed, of course, but... meh. Also--were you aware that there is an ffmpeg PHP extension? It's even got a nifty instance->frameCount member! :) So, use "ffmpeg" to check on its current frame number, and "ffmpeg -i <filename.ext>" to find out how many there are in total. As Ashley already stated, it won't be completely accurate--but the bar will move a heck of a lot more often/accurately than if you only bump it each time a file is finished transcoding. HTH, // Todd
Well, nowhere can i find the frame count being printed, but there _is_ a duration: hh:mm:ss:ms field outputted, and the updating line displays a time=seconds.ms (the time in the movie where the encoder is at). The question remains how to get at that updating output, with exec() you get the output after it's done completely. And there's no way to do partial conversions with ffmpeg, it's all in one or nothing..

« previous php.general (#284441) next »