[FFmpeg-user] How to determine progression

Molly Millions mollyrazormillions at gmail.com
Tue May 21 12:00:39 CEST 2013


Well, redirect the output to a file:

ffmpeg -i whatever.mp4 ....... output.mp4 >>
'/var/tmp/convert/CONVERTID.log' 2>&1

And whenever you need to get the progress, just read the contents of
/var/tmp/convert/CONVERTID.log.

Getting the progress is done by parsing the Duration: at the very beginning.

Duration: ***00:00:14.67***, start: 0.000000, bitrate: 989 kb/s

Get the fps from the video stream:
Stream #0:0(und): ***Video***: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p, 640x356, 862 kb/s, ***30 fps***, 30 tbr, 30 tbn, 60
tbc

frame= ***1135*** fps= 21 q=23.0 size=   11687kB time=00:00:37.80
bitrate=2532.5kbits/s

Convert Duration to frames, so you get the total amount of frames the video
has and by looking at the latest frame= variable, now you can calculate
just fine whats the actual progress...




On Mon, May 20, 2013 at 10:35 PM, Albert Scholtalbers <
compuvision.sr at gmail.com> wrote:

> Hi Robert,
>
> This is my output:
> frame= 1135 fps= 21 q=23.0 size=   11687kB time=00:00:37.80
> bitrate=2532.5kbits/s
>
> No percentage there....
> Does this depend on the version?
>
>
> >attaching your perl process to ffmpeg's stdout and parsing the percentage
> >that is output there is not what you want? It is of course not pretty and
> >may break with any ffmpeg update but I think this works well for many
> >people doing what you do.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list