I'm running:

ffmpeg -i rtmp://localhost/test -crf 20 -t 00:10:00 ./video/hq/1503411993750.mp4 >> out.log 2>>error.log

And expecting >> out.log 2>>error.log to result in stdout to out.log and stderr to error.log.

When I tail both of these files during the process I get unexpected results. The contents of error.log seem to contain stdout. I get a constant stream of:

frame=191 fps=190 q=26.0 size=229kB time=00:00:04.63 bitrate=404.1
frame=227 fps=149 q=26.0 size=273kB time=00:00:05.83 bitrate=382.8
frame=242 fps=120 q=26.0 size=288kB time=00:00:06.33 bitrate= 372.6
frame=258 fps=101 q=26.0 size=306kB time=00:00:06.86 bitrate= 365.2
frame=273 fps=89 q=26.0 size=324kB time=00:00:07.36 bitrate= 360.1
# ... continued

Shouldn't the above be in out.log? Is the issue with how I've written the command or something unussual with ffmpeg?


Apparently all diagnostics messages in ffmpeg are sent to stderr, so the problem isn't syntax.

-A normally running ffmpeg task seems to send all it's output (even when there are no errors) to STDERR even with no errors.

This depends on what you mean with "output": ffmpeg sends all diagnostic messages (the "console output") to stderr because its actual output (the media stream) can go to stdout and mixing the diagnostic messages with the media stream would brake the output.

From: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2014-March/020605.html

Another thing I'm unsure of. If the above is true shouldn't out.log contain video data, but instead it's always empty.

(I guess this is because I've specified it to be sent to ./video/hq/1503411993750.mp4 instead)

  • What exactly are you looking to do? – Gyan Aug 22 '17 at 16:21

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.