Kodi Community Forum

Full Version: AC3 down mix matrix values in Gotham / Frodo ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi All,

I'm currently running Frodo and one problem I'm coming across a lot lately is that videos with AC3 5.1 sound tracks when mixed down to stereo seem to have a very low centre channel volume such that sound effects / music in the left and right channels is extremely loud with dialogue (from the centre channel) too quiet resulting in constant volume riding.

I know that a basic form of limiting/compression can be enabled by increasing the "volume amplify" option and this does help somewhat, but it doesn't address the basic problem that the down mix ratio of the centre channel relative to other channels seems to be wrong compared to other software down mixers...

I've searched quite a bit here and on google trying to find a solution but most of the pages/threads that I can find are either years out of date and pre-Frodo, or just contain people reporting the problem but no solutions. All that I could really find was that in Frodo the down mix matrix ratios are hard coded in the actual C++ code and can't be changed without editing the code and recompiling... Confused

So my question is, will Gotham provide a user adjustable way to tweak the down mix matrix in a config file so I can fix the centre channel volume ? If so I'm happy to sit tight until Gotham arrives. Again, I've tried to find the answer to this myself but can't seem to find anything concrete. If its not an option in Gotham then I hope that it is considered in a future release as the poor stereo downmix balance and an inability to adjust it even in advancedsettings.xml is a major drawback for those of us listening on two channel systems.
Downmix is done differently in Gotham as we have a new audio core and also the audio settings have been redone, however a center channel adjustment hasn't been included.

Please try a Gotham nightly development build to see if there's any improvement and provide your feedback. Gotham has been in feature freeze for a while now and bug fixes are constantly being pushed, so although not bug enough to push out a beta release yet, it is certainly stable enough for most users to try it out. Depending on what OS you're using XBMC can be run in portable mode so you can try Gotham without impacting your existing install of Frodo.
I use XBMC 12.2 on both Mac OS 10.6.8 (2.0 channel analogue output) and a Raspberry Pi, (HDMI audio out) and seem to have the same problem on both.

Can I run a portable version of Gotham on Mac OS and switch quickly between them ? If so I'm happy to give it a try.
Ah you're a Mac user, in that case there's no point as OS-X has it's own audio core and currently Gotham uses the same one as Frodo, although there has been work to allow XBMC on OS-X to make use of the audio core the other platforms use it's not been integrated yet and may not make it for Gotham release.

The same goes for Raspberry Pi as well.
So, no solution then, other than to change the values in the C++ code and create my own custom build ? Sad
Yep, bad news for those who have 2.1 speaker configuration (I have a Philips sound bar) and 5.1 movies :-(. Speeches so low with sound effects too high it´s really annoying.
I love XBMC running in my Raspberry Pi but if I cannot solve this maybe I migrate to another media system.

Regards
Can anyone point to what the current downmix matrix values are, and where in the XBMC source code they're defined ? It's enough of a problem for me that I'm willing to try altering them and performing a custom build of my own.
I´ve been looking at the source code and I think the downmix matrix is defined at CoreAudioMixMap.cpp file. But I´m not able to know how to modifiy the matrix values and which are the correct values... I think performing a custom build worths if this sound issue get fixed, any help will be appreciated.
Could you try the new OS-X audio core to see if it's any better, obtain from http://forum.xbmc.org/showthread.php?tid=185454
(2014-02-17, 13:04)jjd-uk Wrote: [ -> ]Could you try the new OS-X audio core to see if it's any better, obtain from http://forum.xbmc.org/showthread.php?tid=185454
I see its a Gotham build, is it difficult to run Gotham and Frodo side by side on Mac OS so I can switch between them without corrupting my Frodo install ?

(I learnt the hard way not to leave add-on auto update enabled on Raspbmc when switching to a Gotham nightly build as it hosed half my addons under Frodo by updating them to Gotham versions, so that I had to restore a backup...Confused )

I'm also currently running the 32 bit build of 12.2 on Mac OS 10.6.8 - does that present a problem ? (I notice your test build is 64 bit ?)
First of all, thank you jjd-uk for answering.
As I said before, I´m running XBMC on Raspberry PI (exactly on Raspbian), so I think I cannot try OS-X audio core, can I? Will be there any update for audio core in Gotham XBMC for Raspberry? If not I will try to find a way for customizing downmix matrix values. Finally, if I don´t get this issue fixed I will move out from XBMC :-(
Sorry juanma missed that you were using the RPi, what confused me is you mentioned CoreAudioMixMap.cpp where CoreAudio is the name given by Apple to the OS-X audio code and API's.

At the moment the RPi uses it's own player for video playback so I'm not sure how much use it's makes of the ActiveAE audio core that all the other platforms have either already transitioned to, or in the case of OS-X are in the process of doing so, it may well be the case that the RPi needs to use the standard DVDPlayer video core to fully utilise ActiveAE.

For RPi you probably need to dig in https://github.com/xbmc/xbmc/blob/master...MRemap.cpp but I'm not a dev, you'd need to ask in the Raspberry Pi Support forum to get the attention of the RPi dev's.
(2014-02-17, 14:37)jjd-uk Wrote: [ -> ]For RPi you probably need to dig in https://github.com/xbmc/xbmc/blob/master...MRemap.cpp but I'm not a dev, you'd need to ask in the Raspberry Pi Support forum to get the attention of the RPi dev's.

That's correct - that file generates the mixing matrix used by omxplayer.
Look at GetDownmixMatrix - the matrix returned is 8x8 where the number of utilised rows matches the number of output channels, and the number of utilised columns matches the number of input channels.

If you increase the values in the correct column, you should be able to boost the centre channel.
Nice!

So I assume that XBMC is using omxplayer underneath and therefore I have to modify PCMRemap.cpp in order to modify downmix matrix, that´s correct? (sorry for my english, I just want to be sure I understand you in a right way).


But when you say:
(2014-02-17, 15:04)popcornmix Wrote: [ -> ]the number of utilised rows matches the number of output channels, and the number of utilised columns matches the number of output channels.
If you increase the values in the correct column, you should be able to boost the centre channel.

Maybe you´re mistaken and you really mean: rows=input channels, columns output channels ??

Next steps for me is modify this file and perform a custom build for my RPi, but this a different story... I hope RPi forum and my background as programmer help...

Thank you both for your implication in this issue
(2014-02-17, 17:44)juanma Wrote: [ -> ]So I assume that XBMC is using omxplayer underneath and therefore I have to modify PCMRemap.cpp in order to modify downmix matrix, that´s correct? (sorry for my english, I just want to be sure I understand you in a right way).
Yes, for Pi that is correct.
Quote:Maybe you´re mistaken and you really mean: rows=input channels, columns output channels ??
Actually other way round - I've edited my post to correct that typo.
Pages: 1 2