1

When playing 5.1 surround sound audio on stereo, the dialogues come out quiet low but the other sound effect comes out heavily loud. Fortunately, FFmpeg already has built-in filters to fix this issue like loudnorm and dynaudnorm but I have no clue how to use them with FFmpeg nor have I found any commands online that discuss these. I know that these FFmpeg filters work with MPV player which uses FFmpeg in real time.

I have used simple command like

 ffmpeg -i "movie.mkv" -acodec flac -ac 2 -vcodec copy "movie2.mkv" 

which gives out an output files of smaller size and the overall volume is far lower than when played natively. This is not what I'm looking for, I want to mux all the channels into 2(stereo) without any cuts or loss in quality/bit-rate. I'm open to any other software/tool recommendation if FFmpeg lacks in achieving this.

8
  • You assumption is wrong: the -ac 2 option doesn't delete any channels, it really mixes the input channels into 2 output channels. The only channel that is dropped without being used is the LFE (bass) channel. Still it's possible to mix it if you like, defining your own channel mapping instead of the default ones. trac.ffmpeg.org/wiki/AudioChannelManipulation
    – PierU
    Commented Oct 20, 2022 at 9:24
  • @PierU The bitrate drastically decreases when I do -ac 2, I'll explain why. The original file size is 9.2 GB. Converting the audio to FLAC using acodec flac gives out the file size 11.1 GB. But when I apply acodec flac -ac 2 the file size comes down to 9.2 GB. That's like 2 GB loss there.
    – Vin Raghav
    Commented Oct 20, 2022 at 11:21
  • Edit: The original file size is 9.4 GB not 9.2. It won't let me edit my comment so here is an extra comment.
    – Vin Raghav
    Commented Oct 20, 2022 at 12:19
  • 1
    By the way your whole question is not focused enough: which real problem are you trying to solve here? Overall too low volume, too quiet dialogues, or too low bitrate? These are different topics that should be addressed separately.
    – PierU
    Commented Oct 20, 2022 at 12:55
  • 3
    Does this answer your question? Properly downmix 5.1 to stereo using ffmpeg
    – PierU
    Commented Oct 20, 2022 at 16:12

1 Answer 1

1

For the 5.1 to stereo downmix part of your question...

...this filter setup is based on an Avid Pro Tools default 5.1 to stereo downmix. I find this produces a superior sounding downmix to the default -ac 2 method.

-af 'pan=stereo|FL=1.0*FL+0.707*FC+0.707*SL+0.707*LFE|FR=1.0*FR+0.707*FC+0.707*SR+0.707*LFE'

This is equal to:

L 0dB, C -3dB, R 0dB, Ls -3dB, Rs -3dB, LFE -3dB

Or drop the LFE with 0.0*LFE

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .