Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 26th October 2018, 00:48   #1  |  Link
Exxess
Registered User
 
Join Date: Feb 2018
Posts: 1
Downmixing 5.1 to 2.0 - FFmpeg vs VLC

Hi,

I'm writing here to get some opinions on how you feel about the differences FFmpeg and VLC are handling surround to stereo downmixing.

If you don't know of the problem, here it is (I assume you have stereo speakers, and I hope I'm not the only person seeing/hearing this): Open any surround sound AC-3 file in VLC. Let FFmpeg downmix the same file to stereo and open it up in another VLC instance. Skip to a file position with dialogues and at first let the original file play for some seconds, then the one converted by FFmpeg. The latter one should be more quiet (at least it is for me).

Now let's have a look at the basics. I think the "most official" way to downmix is given in the AC-3 standard specification. It more or less says (page 95): Mix the center channel to both front channels with -3dB and mix the rear channels to the according front channel, again with -3dB. After that, coefficients are applied to re-normalize the mix.

With the basics clear, FFmpeg does exactly that. I looked it up in the sources (you will need ac3.h, ac3_parser.c and ac3dec.c in the libavcodec directory). The results sound the same if you use
Code:
-ac 2
or
-af "pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL|FR < 1.0*FR + 0.707*FC + 0.707*BR"
When you have a look at the VLC source code (modules/audio_filter/channel_mixer/simple.c), it just does the mixing part, but it seems that it doesn't re-normalize afterwards (or I overlooked the code for that).

My opinion when comparing these two outputs is that the downmix VLC does is more clearly understandable than the one FFmpeg does. Do you get my point? What's your opinion?

Last edited by Exxess; 26th October 2018 at 00:48. Reason: typo
Exxess is offline   Reply With Quote
 

Tags
downmix, stereo


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.