[FFmpeg-user] issue with DTS 5.1 to wav 2.0 (sort of bug report?)

Andy Furniss adf.lists at gmail.com
Wed Mar 26 00:08:10 CET 2014

roger21 wrote:
> hello,
> when trying to convert a 5.1 audio source into wav i  got a weird
> result, the mix sounds like only two channel are kept and it is very
> low

Testing a channel check doesn't show any missing for me.

> here the original command :
> ffmpeg.exe -i "source.mkv" -c:a pcm_s16le -ac 2 "audio.wav"
> when i do the same conversion to mp3 or vorbis i got a fully ok
> result, the sound is clear and loud, i got the reverb effects and
> all
> ffmpeg.exe -i "source.mkv" -c:a libmp3lame -r:a 48K -b:a 192K
> -compression_level 0 -ac 2 "audio.mp3"
> so as a workaround i used -af pan and the result is all fine
> ffmpeg.exe -i "source.mkv" -c:a pcm_s16le -af
> "pan=stereo|FL=FL+0.5*FC+SL+0.5*LFE|FR=FR+0.5FC+SR+0.5*LFE"
> "audio.wav"
> but as the doc said i shouldn't use it for normal downmixing
> so not really a question again, just a concern or something (i don't
>  think  i did something wrong in my command line but that is always a
>  possibility)

I guess this is a bug, but the correct result is the wav - so you may
not be keen on it being fixed.

In the case of DTS you can get a "louder" downmix by requesting 2
channels eg.

ffmpeg.exe -request_channels 2 -i "source.mkv" -c:a pcm_s16le "audio.wav"

Doing this will use meta data in the stream or fall back on a default,
neither of which for DTS are fully normalised. Using this on AC3 will
get normalised AFAIK. For True HD and I guess the possibly upcoming
DTS-MA -request_channels is optimal as you should get a studio downmix -
so it's well worth using it for those.

Using -ac 2 should, I think, normally get normalised - but the bug here
seems to be it's not always happening when the output is an encoder. You
can see this with -loglevel debug. A few quick tests show that input ac3
-> output mp3 and input dts -> output ac3 are both also not normalised and
get C and surround -3dB. If input or output are wav then the result does
get normalised to prevent clipping.

More information about the ffmpeg-user mailing list