Is there a way to disable or hide output thrown by FFmpeg?

10

5

I went through the documentation but couldn't find a solution. I'm hoping there is some kind of argument that will tell FFmpeg to not show the output in the console.

The output that I'm referring to is in the screenshot given below

enter image description here

asprin

Posted 2013-02-21T13:32:15.927

Reputation: 459

Question was closed 2018-10-06T17:53:08.300

Have you tried using simple command-line redirection like ffmpeg args >NUL? Although that may be a problem if it's waiting for input from the console... – martineau – 2013-02-21T14:32:07.620

Answers

14

There are two possibilities to either vastly reduce the amount of output, or redirect it to somewhere else.

  1. From ffmpeg manual: Run ffmpeg with the -loglevel quiet option.

  2. Do what @martineau said and redirect it to a null file descriptor. FFmpeg outputs to stderr by default, so in Windows you'd do ffmpeg ... 2>NUL; on Cygwin or Linux/OS X/BSD, you'd do ffmpeg ... 2> /dev/null.

allquixotic

Posted 2013-02-21T13:32:15.927

Reputation: 32 256

6ffmpeg sends all of its text to stderr, so you need to use ffmpeg ... 2> /dev/null or ffmpeg ... 2>NUL – evilsoup – 2013-02-21T15:53:21.133

9

As per the other answer, -loglevel quiet supresses everything. But, sometimes it's useful to retain some output. Here are some other options:

  • You can suppress report printing (the lines beginning with frame= that are output every few frames) by adding the -nostats option to your command line.

  • You can suppress the banner (copyright notice, libraries, etc) by adding the -hide_banner option to your command line.

There are other options, see the documentation for details.

starfry

Posted 2013-02-21T13:32:15.927

Reputation: 1 169

1I used -loglevel quiet -stats to show only the frame= line. -hide_banner didn't work, or maybe with my setup what it did remove was not enough (there was still a page and a half of stuff before the frame= line). – 287352 – 2018-02-24T07:20:41.547