S
S
sv22042016-11-20 22:09:24
fmpeg
sv2204, 2016-11-20 22:09:24

How to print the ffmpeg encoding status to the terminal if the process is running in the background?

How can I see the encoding status of an ffmpeg stream in Ubuntu if the process itself was running in the background?
You need to output something like this:

frame= 4870 fps= 26 q=31.0 q=36.0 size=    6111kB time=00:03:15.16 bitrate= 256.5kbits/s speed=1.05x

PS use screenis not an option.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sh0ttky, 2016-11-24
@sv2204

When a program "outputs something to the terminal", it technically means that it writes to the appropriate tty files. FFmpeg prints its state to stderr. The stdout and stderr descriptor numbers are 1 and 2, respectively.
You can redirect its stderr output to a file:
in the above example, the file will be overwritten with each new call.
Print status to current terminal = read last line of log
If you're concerned about hard disk usage: /tmp is usually mounted in RAM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question