0

I want to enter a command that only shows these two lines of ffmpeg's output and I want to see it as it processes a file:

from 'input_file.mkv':
frame=172534 fps=4622 q=-1.0 Lsize= 8319963kB time=01:59:56.17 bitrate=9471.3kbits/s speed= 193x

This command gives the output I want but frame, fps, etc. only displays after the process has completed.

ffmpeg -i input_file.mkv output.mp4 2>&1 >/dev/null | grep -E -o '(from .*)|((frame=).*)'

How can I display the info I want (and only that info) while it's processing?

Background

That's as far as I've gotten by digging online. I don't see any ffmpeg options to filter out as much as I want and the other questions I'm seeing don't seem to fit what I'm looking for. (Most of what I'm seeing are questions about extracting info from a video file or controlling output in a python script that does other things)

  • some flavors of grep have a --line-buffered option among other ways of fiddling with that – thrig Feb 18 at 19:04
  • 1
    See -progress option. – Gyan Feb 18 at 19:36

Your Answer

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

Browse other questions tagged or ask your own question.