0

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.

  • 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. https://trac.ffmpeg.org/wiki/AudioChannelManipulation – PierU Oct 20 '22 at 09: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 Oct 20 '22 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 Oct 20 '22 at 12:19
  • Indeed 2 channels occupy less space than 5+1 channels, that's obvious. But this doesn't change any bit of my previous comment: apart from the LFE channel, the other ones are not simply dropped, they are mixed into the 2 output channels. – PierU Oct 20 '22 at 12:38
  • 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 Oct 20 '22 at 12:55
  • The overall volume is not low. It's just the dialogues. If I could somehow bring the dialogues at the same level as other sound effects then that would be the answer. – Vin Raghav Oct 20 '22 at 13:13
  • Then please edit your question to focus on this particular issue (the too quiet dialogues). As it is written now it looks like the overall volume and/or the low bitrate are also of concern (e.g. *"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"*) – PierU Oct 20 '22 at 13:23
  • 2
    Does this answer your question? [Properly downmix 5.1 to stereo using ffmpeg](https://superuser.com/questions/852400/properly-downmix-5-1-to-stereo-using-ffmpeg) – PierU Oct 20 '22 at 16:12

1 Answers1

0

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

mwjb
  • 185
  • 1
  • 11