[XBOX]On the fly volume normalization for video

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
shibathedog Offline
Junior Member
Posts: 4
Joined: Sep 2009
Reputation: 0
Post: #1
I hope I am submitting this correctly, if not please let me know. Basically just an option for volume normalization while watching movies. I live in an apartment so I pretty much can't watch anything at night without it unless I constantly fiddle with the volume. For now I'm thinking of either using my PC to watch stuff or routing the sound through my PC so my sound card can do it. But then the PC has to be on too which eats up a lot of electricity. I have read XBMP can do it but it doesn't look like it has been updated in a very long time. Sorry if this already exists somewhere but I honestly searched for days.

Anyway, thanks for reading.

Here is Trac Post:

http://trac.xbmc.org/ticket/7214

EDIT: Can a mod remove the Xbox tag? I meant to remove it but I forgot it was there Sad
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,216
Joined: Oct 2003
Reputation: 185
Post: #2
Video OSD -> Audio and subtitle settings -> Volume Amplification (or Dynamic Range Compression, I can never remember).

Turn it up then turn the master volume down.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
sho Offline
Team-XBMC Member
Posts: 4,132
Joined: May 2004
Reputation: 3
Post: #3
So both tickets can be closed?
http://trac.xbmc.org/ticket/7214

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
shibathedog Offline
Junior Member
Posts: 4
Joined: Sep 2009
Reputation: 0
Post: #4
Ah, sorry about that, after reading your post and doing a little more research I feel kinda dumb now. For some reason I thought Dynamic Range Compression was basically the same thing but it was like some companies copyrighted term for it. I guess that's why I didn't find anything because when I google "xbmc dynamic range compression" I find a ton of stuff.

The only thing is, when I set this I get a bunch of crackling, is there something else I'm supposed to do or some specific values I'm supposed to set? Right now I have the amplification on 6 and the volume on -6 and It's not that bad but I can still hear some distortion during some parts, mostly loud higher pitched noises.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,216
Joined: Oct 2003
Reputation: 185
Post: #5
DRC will always cause some distortion as it's effectively a non-linear amplifier. There is nothing you can do to avoid that.

A DRC level of 6dB, however, is very unlikely to cause any distortion at all unless the sound is already overly compressed.

@sho: xbox is the only thing that supports this. We're awaiting the master audio stuff to be complete before adding it to the other platforms. i.e. close or link in with the MA ticket (if there is one?)

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
shibathedog Offline
Junior Member
Posts: 4
Joined: Sep 2009
Reputation: 0
Post: #6
Ah your right, I tried it with another video file and it doesn't seem to distort, although the effect of the DRC is much less. (Makes sense.) So for properly encoded videos then what would you say is the maximum value without causing audible distortion? I know I can just try a bunch of different values but I'm interested to know what it SHOULD be not what it is because of what I'm playing just in case. Then I at least know what to blame.

I was messing with it today, feeding it through my sound card and trying to match the amount of DRC that XBMC uses with the amount my sound card uses because it works quite well but my sound card seems to adjust it on the fly (or maybe differently depending on the frequency?) and it seems fixed in XBMC so I can't really duplicate it. It seems like 9 would be the value to set, but I'm not really sure. This might be impossible to figure out without knowing everything about my sound card and it seems like I would never get the correct value if it is doing it on the fly so I decided to get more technical.

What if I wanted to reduce the dynamic range from say, that of a DVD to that of a CD. This setting would be great for me because I hate the way DVDs are recorded (no offense, I just would rather enjoy the movie and hear whats going on than have massive explosions in my face, at least at night time) and CDs pre-loudness war sound great. It is my understanding that a CD has a dynamic range of about 90 dB and a DVD has a dynamic range of about 144 dB, AC-3 tracks which I also listen to have a dynamic range of about 120 dB so I may actually adjust a bit less than needed.

Anyway, what would I set to reduce from 144 to 90? The maximum setting for volume is 60 and for volume amplification 30. So I can't set both at 54, This seems way excessive anyway, is this even the correct way of figuring this out? I tried setting both at 30 to match AC-3 but it sounded TERRIBLE so I'm obviously doing something wrong, or you simply cannot do what I am trying to do.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,216
Joined: Oct 2003
Reputation: 185
Post: #7
It's really a per-movie setting - just like the loudness war for CDs, the same applies for DVDs in some respects. Even though the DVD has a lot more dynamic range doesn't mean it's going to use it.

I suspect somewhere around 9-12dB is probably about right. Much more than that and you're risking distortion, but as I say, it depends on the movie.

At some point I had a system in place where the volume control could go to the +ve's, with each increase effectively compressing the dynamic range. This gives a nicer control system, at the expense of it being easy to overshoot things.

If you can build yourself, take a hunt around in Application.cpp - it's very likely the support is just #ifdef'd out.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
shibathedog Offline
Junior Member
Posts: 4
Joined: Sep 2009
Reputation: 0
Post: #8
Unfortunately I cannot compile, I'll take a look at it though because I figured it out a few times when I had to do some stuff for linux, hopefully it is similar.

I just wish I could figure out the setting that at least makes the DRC the same as it is on any standard walmart DVD player. Even that would be good enough. Whatever that setting is works great but I can't match it on XBMC. I guess I'll just live with it though as XBMC outperforms 20 dollar DVD players in many other ways.

Anyway, Thank you all for your help and for reading my thread. I am a lot better off than I was before! The settings I ended up with (Or at least what I am using for now) in case anyone else is looking are -4.8 for volume, although I adjust this a lot, and 10.5 for volume amplification. I could probably even go a notch higher on volume amplification but I'm trying to minimize distortion. Another added bonus is my movies are now about the same volume as my games, so I don't have to adjust the volume on my amp based on movie/game.
find quote