2

I have noticed a problem with FFmpeg downmixing. If I run a command such as

ffmpeg -i infile.flac -ac 2 outfile.flac

It will have identical result as

ffmpeg -i infile.flac \
  -map_channel 0.0.0 \
  -map_channel 0.0.1 \
  -map_channel 0.0.2 \
  -map_channel 0.0.4 \
  -map_channel 0.0.5 \
  outfile.flac

That is to say, the fourth channel AKA 0.0.3 AKA LFE AKA low frequency is gone. How can I downmix 6 to 2 without losing a channel?

1

1 Answer 1

6

The -ac 2 algorithm leaves out "LFE" as can be seen by the 4th column of this output

$ ffmpeg -i infile.flac -ac 2 -v debug -f null -
0.414214 0.000000 0.292893 0.000000 0.292893 0.000000
0.000000 0.414214 0.292893 0.000000 0.000000 0.292893

To fix, set the LFE mix level

$ ffmpeg -i infile.flac -ac 2 -lfe_mix_level 1 -v debug -f null -
0.320377 0.000000 0.226541 0.226541 0.226541 0.000000
0.000000 0.320377 0.226541 0.226541 0.000000 0.226541

It should be noted that LFE typcially contains duplicate audio information

The Low-Frequency Effects (LFE) channel contains extra bass information necessary to make effects sound big enough. It should never contain elements that are not in other channels

and that including it in a downmix could cause problems

There are other concerns when adding an LFE signal to the mix. If the LFE is simply redistributed within the other channels of the mix, they will usually be subject to some low-frequency bandpass filtering. This filtering causes phase shifts of the LFE signal. When they are acoustically added within a room, these phase shifts are fairly subtle and often go unnoticed. However, when they are electronically added together with the five main channels in the encoder, they may produce less than desirable results at certain frequencies. For this reason, it is recommended that the LFE signal not be used in a Dolby Pro Logic II downmix

Mixing Information for Dolby Pro Logic II

You must log in to answer this question.

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