INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Volume Leveling Measurement and Calculation  (Read 12930 times)

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Volume Leveling Measurement and Calculation
« on: March 22, 2016, 09:22:08 am »

I think I understand the basics of how Volume Leveling works.  I've read a number of threads about it and a TON of details that don't relate to the calculation itself.  I think that it works like this:

1.  The absolute peak and the average volume level are measured.
2.  An average level of -20 dB (digital scale) is desired.  So a volume adjustment is applied to bring the Average Level to -20 dB.  This might be a reduction in volume, or a boost in volume, but it's usually a reduction.
3.  The above has a second rule that says that the new peak level, after volume adjustment, can not go over 0 dB.  This prevents clipping.

Is that roughly correct?

If so, where is that Average Volume Level stored?  Or how is it determined or calculated?  I've found the the Volume Level adjustment made in 2 and 3 above is stored in a tag called [Volume Level (R128)] .  But I can't seem to figure out how any of the other audio analysis tags can be used to calculate that volume level adjustment.

If there's a clear explanation of this in another thread, I wasn't able to find it, despite a good bit of research over a 2 day period.

Thanks for any clarification on this.

Brian.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: Volume Leveling Measurement and Calculation
« Reply #1 on: March 22, 2016, 09:25:34 am »

First, the target level of the EBU R-128 standard is -23.0 LUFS (dB) - not 20.

The Volume Level (R128) tag is the average volume level of the file, its just stored relative to the target level. No need to store anything else.
Logged
~ nevcairiel
~ Author of LAV Filters

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Volume Leveling Measurement and Calculation
« Reply #2 on: March 22, 2016, 09:58:51 am »

First, the target level of the EBU R-128 standard is -23.0 LUFS (dB) - not 20.

Ok, I read a lot and I must have misunderstood.  I read something from Matt at one point referencing -20 dB at 83 dB SPL, which I know is the Reference Level target... but I thought it was in the context of Volume Leveling.  I must have simply been wrong on that.  -23 dBFS it is.  :)

Quote
The Volume Level (R128) tag is the average volume level of the file, its just stored relative to the target level. No need to store anything else.

Well that's way too easy!  So you're saying this I think:

[Volume Level (R128)] = (-23) - {R128 True Average Level}

rearranged:

-23 = {R128 True Average Level} + [Volume Level (R128)]

That makes sense I suppose.

EDIT:  Thank you Hendrik for taking the time to help me understand.  :)

Brian.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re:
« Reply #3 on: March 22, 2016, 10:21:07 am »

Is a lufs(dB) value equivalent, or easily translatable, to dBFS?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: Volume Leveling Measurement and Calculation
« Reply #4 on: March 22, 2016, 10:29:20 am »

LU is equivalent to dB, so LUFS is really dBFS.
Logged
~ nevcairiel
~ Author of LAV Filters

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Volume Leveling Measurement and Calculation
« Reply #5 on: March 22, 2016, 12:26:24 pm »

Part of the confusion is that the wiki article on calibration says the target is -20dBFS at 83dB (which is the film standard), and JRiver's internal calibration clips are also -20dBFS pink noise, which, to the best of my knowledge based on the Bob Katz threads when the feature was coming in, are supposed to play back at 83dB on a calibrated system.  As Hendrik noted, R128 does target a -23LUFS average level referenced to digial fullscale, but at no particular real world output volume.  

My understanding is that for system calibration one is still supposed to use -20dBFS pink noise at 83dB, and JRiver's internal test clips are -20dB pink noise.  I seem to recall (based on an old thread with Matt and Bob Katz going back and forth that I can't find at the moment) is that JRiver's internal calculation takes into account the 3dB delta automatically as part of the calculation.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: Volume Leveling Measurement and Calculation
« Reply #6 on: March 22, 2016, 01:15:56 pm »

These are two totally independent topics, honestly. One is about a consistent volume level, one is a reference output level to calibrate your loudness to.

The -23 LUFS does not have any direct relation about actual output volume, its an "arbitrary" target volume chosen to accomdate most use-cases the EBU could think up, a balance between headroom and volume.
-20dBFS pink noise at 83dB is actual real world output volume.
Logged
~ nevcairiel
~ Author of LAV Filters

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Volume Leveling Measurement and Calculation
« Reply #7 on: March 22, 2016, 01:31:09 pm »

These are two totally independent topics, honestly. One is about a consistent volume level, one is a reference output level to calibrate your loudness to.

I'm (mostly) right there with you, I was primarily offering the point of clarification to explain (to Brian) where he might be remembering the -20dBFS number from.  It's easy to get the two different "reference levels" confused.

Quote
The -23 LUFS does not have any direct relation about actual output volume, its an "arbitrary" target volume chosen to accomdate most use-cases the EBU could think up, a balance between headroom and volume.
-20dBFS pink noise at 83dB is actual real world output volume.

I agree that the R128 target isn't tracked to any real world output level, but I'm not sure the two are completely unrelated in the specific context of JRiver, because JRiver's loudness compensation assumes a real world target and adjusts accordingly.  The loudness compensation starts adjusting at any volume below the "real world" volume calibration, which assumes 83dB at -20dBFS.  However, the average level of volume leveled material is -23dBFS, which, on a calibrated system, would be 80dB.  

So there's a three dB delta between the two reference levels which would need to be rationalized for optimal functioning of the loudness algorithm, because loudness compensation doesn't scale linearly, right?  Or am I confused?  I've struggled with this issue for a while, and I'm open to the idea that I've got it wrong somehow, but I seem to recall some discussion of trying to rationalize the two.

Here's one thread I found hashing out some of these issues (and not really coming to a good conclusion): https://yabb.jriver.com/interact/index.php?topic=83601.0
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: Volume Leveling Measurement and Calculation
« Reply #8 on: March 22, 2016, 01:34:29 pm »

If you measured the reference level properly, with volume leveling on, then it would automatically come to the right value.
Logged
~ nevcairiel
~ Author of LAV Filters

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Volume Leveling Measurement and Calculation
« Reply #9 on: March 22, 2016, 01:35:20 pm »

If you measured the reference level properly, with volume leveling on, then it would automatically come to the right value.

Ok, that makes sense.  I'll file that away for reference (pun intended  ;D )
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Volume Leveling Measurement and Calculation
« Reply #10 on: March 22, 2016, 02:08:07 pm »

Using Tools > Advanced Tools > Audio Calibration > Volume calibration is the best system for setting levels (as mojave said).  Be sure to turn off Volume Leveling and Adaptive Volume during calibration (this should probably happen automatically someday).
If you measured the reference level properly, with volume leveling on, then it would automatically come to the right value.
aren't these two quotes contradicting each other?

pugels sticks at the ready in the dev centre
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Volume Leveling Measurement and Calculation
« Reply #11 on: March 22, 2016, 02:14:07 pm »

If leveling is enabled the calibration tones are played back at -1dB.
Shouldn't they be played back at -3dB for leveling if they're -20dB signals?
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver
Re: Volume Leveling Measurement and Calculation
« Reply #12 on: March 22, 2016, 02:27:02 pm »

R128 is a standard for broadcast television. The US adopted ATSC A/85 to fulfill the CALM (commercial advertisement loudness mitigation) Act. The purpose of both is for broadcasts to have consistent volume levels without commercials being a lot louder. -23 LUTS was chosen as a normalization level since it worked best with a wide range of content.

There is no correlation between volume normalization using R128 and calibrating a system to a "Reference Level" of 83 dB.

ATSC A/85 also recommends the following to be used for "Reference Level." Note that calibrating to 85 dB for greater than 20,000 sq ft is per SMPTE RP 200. RP 200 is also referenced by Bob Katz as the standard to calibrate to 83 dB. I believe difference is that 85 dB uses full bandwidth pink noise and 83 dB uses limited bandwidth pink noise.

Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Re: Volume Leveling Measurement and Calculation
« Reply #13 on: March 22, 2016, 02:41:13 pm »

If leveling is enabled the calibration tones are played back at -1dB.
Shouldn't they be played back at -3dB for leveling if they're -20dB signals?
Is that the live track or from a generated file? IIRC leveling applies a 1dB adjustment to an unanalysed track (and live playback is, by definition, unanalysed).
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Volume Leveling Measurement and Calculation
« Reply #14 on: March 22, 2016, 02:44:02 pm »

R128 is a standard for broadcast television. The US adopted ATSC A/85 to fulfill the CALM (commercial advertisement loudness mitigation) Act. The purpose of both is for broadcasts to have consistent volume levels without commercials being a lot louder. -23 LUTS was chosen as a normalization level since it worked best with a wide range of content.

There is no correlation between volume normalization using R128 and calibrating a system to a "Reference Level" of 83 dB.

ATSC A/85 also recommends the following to be used for "Reference Level." Note that calibrating to 85 dB for greater than 20,000 sq ft is per SMPTE RP 200. RP 200 is also referenced by Bob Katz as the standard to calibrate to 83 dB. I believe difference is that 85 dB uses full bandwidth pink noise and 83 dB uses limited bandwidth pink noise.

http://www.avsforum.com/photopost/data/2372597/4/47/47389e7a_ReferenceLevel_ATSC.jpeg
Yes but if leveling brings everything to the same target level, and reference level is 83dB, then the two should be aligned or else volume leveling is playing the tracks louder/quieter than reference.

Is that the live track or from a generated file? IIRC leveling applies a 1dB adjustment to an unanalysed track (and live playback is, by definition, unanalysed).
Using the built in calibration tool.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Volume Leveling Measurement and Calculation
« Reply #15 on: March 22, 2016, 03:02:48 pm »

Steering this back on track for a moment...

Can anyone confirm that this math is correct?

[Volume Level (R128)] = (-23) - {R128 True Average Level}

rearranged:

-23 = {R128 True Average Level} + [Volume Level (R128)]

rearranged again:

{R128 True Average Level} =  -23 - [Volume Level (R128)]

Brian.
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver
Re: Volume Leveling Measurement and Calculation
« Reply #16 on: March 22, 2016, 03:41:07 pm »

Yes but if leveling brings everything to the same target level, and reference level is 83dB, then the two should be aligned or else volume leveling is playing the tracks louder/quieter than reference.
Again, the normalization target level and reference level have nothing in common. Nothing says anywhere in any standard that when you play back a normalized audio file it should play at a certain volume level. R128 is a volume consistency standard, not a volume playback standard. There is no standard for the volume level where the end user should be listening. The purpose of volume leveling is so that all audio sounds sounds like it is at the same volume regardless of the actual playback volume.

By the way, when you analyze a 500-2500 Hz, -20 dBFS calibration file, it is at -3.7 LU. Pink noise has a different crest factor and different loudness than the content being analyzed to R128.

More reading:  The End Of The Loudness War?
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Volume Leveling Measurement and Calculation
« Reply #17 on: March 22, 2016, 06:15:15 pm »

Steering this back on track for a moment...
Can anyone confirm that this math is correct?
Yes, though it would be "Average Loudness" in LUFS, not "R128 True Average Level".

Again, the normalization target level and reference level have nothing in common. Nothing says anywhere in any standard that when you play back a normalized audio file it should play at a certain volume level. R128 is a volume consistency standard, not a volume playback standard. There is no standard for the volume level where the end user should be listening. The purpose of volume leveling is so that all audio sounds sounds like it is at the same volume regardless of the actual playback volume.
So if you calibrate your system to the "reference level" of 83dB, but it was calibrated using a tone played back at -20dB or -21dB, when volume leveling aligns everything to -23 LUFS, the level used for playback has now dropped to 80/81dB.
2-3dB is small, but still matters if you want a properly calibrated signal chain where the volume level in JRiver is absolute instead of relative.

By the way, when you analyze a 500-2500 Hz, -20 dBFS calibration file, it is at -3.7 LU. Pink noise has a different crest factor and different loudness than the content being analyzed to R128.
That is a very specific calibration tone, not general audio.
When you know that it is specifically a -20dB tone, you would bypass the analyzer.


If you plan to use Volume Leveling for playback, and the built-in JRiver tones generator for calibration, you should calibrate to 85dB if volume leveling is currently enabled, or 86dB with it disabled, not 83dB.
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Volume Leveling Measurement and Calculation
« Reply #18 on: March 23, 2016, 08:53:10 am »

R128 is a standard for broadcast television. -23 LUTS was chosen as a normalization level since it worked best with a wide range of content.

This is my frustration with using R128 for music. -23LUFS is fine when one is dealing with broadcast content but for music it is much too low.

Most of the streaming services are right around -16LUFS for general music presentation - allowing for a more balanced approach to volume - especially for the car. If I make a mix CD using MC (or export for iPod) and let it "print" the volume levelling @ -23 LUFS - the resultant tracks need to be cranked to about 50-65% power in our our new truck. When that disc is over and we switch back to the radio - ears are bleeding as someone jumps to drop the volume knob as the volume "returns" to 2016 levels.

While I understand that R128 is a standard and MC is adhering to it steadfast - there should be some dialog on allowing the user to set an LUFS threshold within MC so volume leveling is not so dramatic like my example above. We should be able to sample different leveling scenarios and decide which is appropriate for our environment.

I would love to be able to set mine to around -14LUFS (which is more in line with the Bob Katz K-System) which I use exclusively for my production work. The K-14 standard is to me - is ideal for any music presentation without having to crank the volume knob to get a reasonable level.

VP
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Volume Leveling Measurement and Calculation
« Reply #19 on: March 23, 2016, 09:09:51 am »

You should try using Adaptive Volume > Peak Level Normalize , in addition to Volume Leveling.  That should fix your issue.  AV > PLN adds back as much volume as possible, without clipping, given the songs in your playlist.

Brian.
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Volume Leveling Measurement and Calculation
« Reply #20 on: March 23, 2016, 09:17:06 am »

You should try using Adaptive Volume > Peak Level Normalize , in addition to Volume Leveling.  That should fix your issue.  AV > PLN adds back as much volume as possible, without clipping, given the songs in your playlist. Brian.

Let me be clear on what's happening. Inside the house with an actual instance of MC - playback is perfect - with just Volume Levelling on. I have no qualms about how MC does playback ion the house - it's what it's doing when I choose to "include" DSP/Volume Levelling when prepping tracks for a CD or the iPod.

MC claws back the volume of all files to  -23 LUFS - making the volume so low - it leads to the annoying volume knob dance I mentioned earlier. I would love to be able to "include" volume level data - to ensure a mix is not jumping around all over the place volume wise - but I do not want a 20 track mix to be driven down to -23 LUFS all the time. That is too low in my opinion.

Does your suggestion work for tracks on CD mixes or exported to MP3 (for iPod)? If it does - I do not wish to have to turn "adaptive" volume on every time I want to do an export or make a mix CD and then back "off" again for normal listening in house.

I guess I do not have a clear understanding on what this actually does.

VP
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Volume Leveling Measurement and Calculation
« Reply #21 on: March 23, 2016, 09:25:37 am »

it's what it's doing when I choose to "include" DSP/Volume Levelling when prepping tracks for a CD or the iPod.

MC claws back the volume of all files to  -23 LUFS - making the volume so low - it leads to the annoying volume knob dance I mentioned earlier. I would love to be able to "include" volume level data - to ensure a mix is not jumping around all over the place volume wise - but I do not want a 20 track mix to be driven down to -23 LUFS all the time.

Adaptive Volume > Peak Level Normalize will add back an average of 8 to 10 dB; it adds as much as it can without clipping as I understand it.

Quote
Does your suggestion work for tracks on CD mixes or exported to MP3 (for iPod)? If it does - I do not wish to have to turn "adaptive" volume on every time I want to do an export or make a mix CD and then back "off" again for normal listening in house.

The DSP settings in MC are independent in several places.  Your main listening zone has DSP settings.  There are also DSP settings that can optionally be applied during "convert format". These are separate from your zone DSP.  There are DSP settings for every Handheld Sync definition.  These are separate too.  There are DSP settings for DLNA.  These are also separate.

So yes, you can set up a DSP profile for your converted files, either in convert format, or Handheld Sync, and they will not affect your main zone DSP settings.

Brian.
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Volume Leveling Measurement and Calculation
« Reply #22 on: March 23, 2016, 09:36:38 am »

Adaptive Volume > Peak Level Normalize will add back an average of 8 to 10 dB; it adds as much as it can without clipping as I understand it.

Cool. That might be the ticket then.

The DSP settings in MC are independent in several places.  Your main listening zone has DSP settings.  There are also DSP settings that can optionally be applied during "convert format".

Interesting. Right now - on my personal workstation - there is no concept of "zones".

It's just this instance to MC playing back whatever I tell it to - presumably using the one set of DSP settings. I export my files out using Convert Format and have been "printing" the Volume Levelling (only) to this point. It results in all files getting a Volume Level (R128) value of 0.0db. And of course drives the Peak level way down.

I will add "adaptive" volume to the DSP during Convert Format and see what difference that makes

Cheers!

VP
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Volume Leveling Measurement and Calculation
« Reply #23 on: March 23, 2016, 01:01:44 pm »

This is my frustration with using R128 for music. -23LUFS is fine when one is dealing with broadcast content but for music it is much too low.
The standard is intended to be used for radio broadcast, not just television. (and some stations are using it) Video should actually be played at an even lower level.

Most of the streaming services are right around -16LUFS for general music presentation - allowing for a more balanced approach to volume
That will guarantee clipping or uneven leveling with many types of music. It's why they moved to -23 LUFS instead of using ReplayGain's -16dBFS.
 
If I make a mix CD using MC (or export for iPod) and let it "print" the volume levelling @ -23 LUFS - the resultant tracks need to be cranked to about 50-65% power in our our new truck. When that disc is over and we switch back to the radio - ears are bleeding as someone jumps to drop the volume knob as the volume "returns" to 2016 levels.
If you're burning a disc for your truck, enable peak level normalization as well. That way all tracks on the disc will be leveled and then the gain maximized.
I wouldn't suggest that for your iPod though.
 
Or you could turn the volume down before switching inputs, not after.
The issue is that radio is too loud, not that leveling is too quiet.
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Volume Leveling Measurement and Calculation
« Reply #24 on: March 23, 2016, 01:50:54 pm »

The standard is intended to be used for radio broadcast, not just television. (and some stations are using it) Video should actually be played at an even lower level.

Understood - but I am in media/broadcast and I can tell you no radio stations that I have come across here in Canada use it. TV on the other hand was mandated by the CRTC a few years back to get it together and all the major broadcasters here have implemented it. It's clear the radio has not since every station on the dial is as loud as it can possibly be :)

That will guarantee clipping or uneven leveling with many types of music. It's why they moved to -23 LUFS instead of using ReplayGain's -16dBFS.

Seems I phrased this wrong. I should have probably specified "playback normalization" for the online services. None of the big three normalized to EBU Standards of -23 LUFS

This graphic sums up what I was getting at - and displays current LUFS targets for Apple Music (-16LUFS) , Spotify (-11 LUFS) and YouTube @ (-13 LUFS).

http://productionadvice.co.uk/online-loudness/
 
Or you could turn the volume down before switching inputs, not after.
The issue is that radio is too loud, not that leveling is too quiet.

Well - I remember to turn it down if I am driving but if my wife and son are in the car - they will not.

And yes - the actual radio source may very well be too loud and pumping but I cannot do anything about that to tame it except crank the knob down. Ideally what I am looking for is a way to ensure my CD mixes (and iPod content) "match" the output of the radio so when the volume knob (with FM radio selected) says 20% and it's sounds perfectly fine - the CD is exactly the same level when I switch to it.

Seems that cannot occur until I have complete control over the output - which means making the mixes in another app (like Wavelab or Studio One) where I can place a meter on the mix bus and be sure the CD levels are close to the LUFS output of the radio.

VP
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Volume Leveling Measurement and Calculation
« Reply #25 on: March 23, 2016, 02:24:59 pm »

I found this expression to test you library when searching for details on the R128 system.
Code: [Select]
Delimit(FormatNumber(Math(1+RemoveCharacters(ListItem([Peak Level (R128), 0], 0), / dBTP/+, 0)+[Volume Level (R128), 0]), 1), / dB,)
Anything with positive values requires more headroom than the -23 LUFS target.
Anything -7 or higher would require more headroom than a -16 LUFS target.
Anything -12 or higher would require more headroom than a -11 LUFS target.

I have 400 tracks in my library with more dynamic range than even -23 LUFS can handle.
I have 13,000 tracks with more dynamic range than -16 LUFS can handle.
39,000 tracks with more dynamic range than Spotify's -11 LUFS target.
 
That library is just short of 49,000 tracks total.
Logged
Pages: [1]   Go Up