5

Consider a simple FFmpeg conversion, such as:

ffmpeg -i dream.wav dream-ffmpeg.mp3 -y

It produces the following warning:

Guessed Channel Layout for Input Stream #0.0 : mono

How can I tell FFmpeg, via command-line arguments, that the input stream will always be mono?

By goal is to be more specific, to avoid unnecessary warnings and keep my code clean. (So I may spot actual issues.)

(I am not trying to get rid of all warnings altogether.)

My understand form the FFmpeg docs was that -ac 1 would do the trick, e.g.:

ffmpeg -i dream.wav -ac 1 dream-ffmpeg.mp3 -y

But the warning's still here.

Fabien Snauwaert
  • 411
  • 4
  • 17
  • 2
    related: https://stackoverflow.com/a/43303554/8013879 `You can [...] disable performing the action of guessing (not just its announcement) by the input option of -guess_layout_max [...]. The issue with this is that the output won't be flagged with a channel layout. You can correct this by explicitly setting output channels option -ac N where N is the number of channels in the output.` – flolilo Sep 20 '17 at 17:15
  • For future reference please always show the complete console output from your command. – llogan Sep 20 '17 at 18:13

1 Answers1

2

I'd actually seen the answer but somehow failed to use the argument it seems…

In any case -guess_layout_max 0 will do the trick. e.g.:

ffmpeg -guess_layout_max 0 -i dream.wav dream-ffmpeg.mp3 -y
Fabien Snauwaert
  • 411
  • 4
  • 17