Is there a way for FFmpeg to output or log time duration since a particular job/process was started?

I know that there are more or less complicated ways to display a progress bar which really seems more like a programmatical problem.

The reasoning is that I want to measure how long time my encoding jobs take (without having to set up a separate timer).

3 Answers 3


In Linux you can use the time command:

$ time ffmpeg -i input.avi output.mp4
  real  0m1.927s
  user  0m7.067s
  sys   0m0.243s

This example took 1.927 seconds to complete.

  • or you can use ffmpeg -benchmark -i Show benchmarking information at the end of an encode. Shows CPU time used and maximum memory consumption. Maximum memory consumption is not supported on all systems, it will usually display as 0 if not supported. Dec 17, 2017 at 0:58

If you use the -report option, ffmpeg will create a logfile at initialization and the filename will contain the time at which it was created. You can use the last modified time of the log file to get the completion time, and thus the duration. On Windows, you could just check the creation time of the output as well.

Addendum: A rough way to get this information, universally, without altering the command or using a monitoring tool like time, as LN guided, is to note the encoding speed normally reported i.e. speed=5.50x. So, if the duration of the output file is 110 seconds, then time taken to encode is 110 / 5.5 = 20 seconds.


Use -benchmark. You will see something like bench: utime=11.969s stime=0.315s rtime=1.908s, the rtime is what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.