0

I am writing a bash script to speed up podcasts. In it, I have:

ffmpeg -nostats -hide_banner -loglevel panic -y -i normal/$channel/$filename -filter:a "atempo=1.3" fast/$channel/$filename

However, when I run this, I get lots of output like this:

stream #0:
   keyframe=1
   duration=0.026
   dts=336.196  pts=336.196
   size=836

Isn't the -nostats flag supposed to stop this? According to the documentation:

-stats(global)

Print encoding progress/statistics. It is on by default, to explicitly disable it you need to specify -nostats.

Also, I still get the banner output from ffmpeg even though I have -hide_banner.

-hide_banner

Suppress printing banner.

All FFmpeg tools will normally show a copyright notice, build options and library versions. This option can be used to suppress printing this information.

I can't figure out why ffmpeg is ignoring these flags, or (more likely) what I'm doing wrong.

Update

I also tried -loglevel panic and it still outputs everything.

I am also getting output in red like this:

00000060  b3 2e 0d 77 68 54 73 a9 e3 79 c7 65 ca 85 45 64 ...whTs..y.e..Ed
00000070  30 5c 94 ef 4b 02 be 67 4e 71 e4 39 18 5c 23 a3 0\..K..gNq.9.\#.
00000080  d6 54 ec 8a 79 59 e1 74 31 52 a4 5f 52 2f 48 5f .T..yY.t1R._R/H_
00000090  15 2a a5 5f 2f e7 c2 c3 7a 85 da bf 2e 18 ca d2 .*._/...z.......
000000a0  8d ad ab 69 d3 e8 c5 7c 98 7c 8c 79 34 c6 9a 2d ...i...|.|.y4..-
000000b0  10 fe 69 91 73 23 9e 3c 7e fc b3 eb e4 95 7c 92 ..i.s#.<~.....|.
000000c0  b4 b4 21 bc b4 5e 68 43 d7 fb 4b 4a 1a be 87 b4 ..!..^hC..KJ....
000000d0  f5 e0 e0 01 00 1f e4 40 33 bd ff fc 59 ae 86 94 .......@3...Y...
000000e0  30 60 30 f6 7f c1 12 4b c8 43 c9 2c a4 74 bc 3c 0`0....K.C.,.t.<
000000f0  f0 40 00 1d ab f1 9f 8c 9a 60 30 8c 6c c8 40 d5 .@.......`0.l.@.

I have more output on Pastebin

I am running ffmpeg version 3.0.2-1~trusty

Caleb Eby
  • 111

2 Answers2

3

Apologies for necroposting solution ; this is the only existing thread that describes the situation I am facing, which came from when I was trying to troubleshoot later errors in a script.

One way this output is triggered is that ffmpeg could be consuming bytes from stdin.

The following will cause the stream #0 output to print ; it will also cause subsequent files to fail conversion.

find . -name '*.ogg' | while read filename; do
    ffmpeg -loglevel 0 -nostats -i "$filename" "$filename.mp3"
done

The problem is due to ffmpeg using stdin by default; use -nostdin to turn off this behavious

From the man page:

-stdin
    Enable interaction on standard input. On by default unless standard input is
    used as an input. To explicitly disable interaction you need to specify
    "-nostdin".

    Disabling interaction on standard input is useful, for example, if ffmpeg is
    in the background process group. Roughly the same result can be achieved with
    "ffmpeg ... < /dev/null" but it
    requires a shell.
tk-noodle
  • 143
2

The only flag you need is:

-loglevel 0

This should suppress all terminal output. If it isn't working for you, be sure you're using the latest version of FFmpeg (4.0 at time of writing).