Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Dolby Digital AC3 and Dynamic Range Compression (Read 13379 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Dolby Digital AC3 and Dynamic Range Compression

I think I understand how this all works, but I'd like someone more knowledgeable than me to make sure I've got my head round it correctly.

When you encode AC3, you must specify a dialogue normalization (dialnorm) value and a dynamic range compression (DRC) profile.

The dialnorm figure you should use can be estimated by measuring the RMS level of a portion of the soundtrack containing normal conversational dialogue. AC3 decoders use this figure to amplify or attenuate the waveform to ensure that all audio sources have a dialogue level of -31dB when decoded.

The DRC profile for audio on DVDs is normally "film - light" or "film - standard".

Let's say you have an AC3 stream ripped off a commercial DVD. Azid can tell you various bits of information about the stream, such as the bitrate and the dialnorm level. Is there anything that will tell you what DRC profile - film light, film standard, etc. - is specified in the bitstream?

The settings for dialnorm and DRC profile do not actually affect the encoded audio; they are just stored as metadata in the AC3 bitstream. So if you decode the AC3 in software (using azid, for example) you should get an output that has the same levels and dynamic range as the original source (unless you enable DRC and/or dialog normalization reduction options for the decoding).

When playing a DVD with AC3 audio, you have two options for decoding the bitstream. The DVD player can decode the audio (and output the decoded audio digitally as PCM, or through its analogue outputs), or the raw bitstream can be passed digitally to an external decoder.

Most hardware decoders I've come across - whether DVD player's internal decoder or external amp/receiver - have an option to turn DRC on or off. I assume that "on" means "use the profile specified in the bitstream" and that "off" means "don't apply any DRC".

Some DVD players however, instead of having a simple on or off, have a variable scale setting. How does this work? Does it override the DRC profile specified in the bitstream, or is it a multiplier that increases/decreases the effect of the profile specified (and thus, will have no effect if the DRC profile is set to "none")?

I'm also assuming that any DRC options in the DVD player setup only apply if the player is doing the decoding itself, and if it's outputting the raw bitstream then this will be unaltered by any settings in the player.

I think that all hardware decoders apply the dialnorm reduction. I haven't seen any cases where this can be turned off, (nor can I imagine any case where you would want to).

 

Dolby Digital AC3 and Dynamic Range Compression

Reply #1
Let's say you have an AC3 stream ripped off a commercial DVD. Azid can tell you various bits of information about the stream, such as the bitrate and the dialnorm level. Is there anything that will tell you what DRC profile - film light, film standard, etc. - is specified in the bitstream?

The DRC profile is not specified in the bitstream.  It is only used by the encoder to calculate appropriate DRC values for each block or frame.  Theoretically, a program could analyze the DRC "signal" in relation to an estimated power in each frame by only doing a partial decode.  Then it could try to guess which profile was used.  I don't know of any programs which currently do that, but I hope to include that functionality in a program of mine one day, as well as the ability to modify an existing stream to change the DRC profile without a complete re-encode.  I know that doesn't help you now, but maybe it will give you a better idea of what's possible.

Quote
The settings for dialnorm and DRC profile do not actually affect the encoded audio; they are just stored as metadata in the AC3 bitstream. So if you decode the AC3 in software (using azid, for example) you should get an output that has the same levels and dynamic range as the original source (unless you enable DRC and/or dialog normalization reduction options for the decoding).

Generally speaking, yes.  However, there is an additional, optional compression gain which is used to further limit dynamic range, usually for broadcasting.  Also, the original source could have had a greater dynamic range than what AC3 can handle, but that's just a technicality.

Quote
When playing a DVD with AC3 audio, you have two options for decoding the bitstream. The DVD player can decode the audio (and output the decoded audio digitally as PCM, or through its analogue outputs), or the raw bitstream can be passed digitally to an external decoder.

Most hardware decoders I've come across - whether DVD player's internal decoder or external amp/receiver - have an option to turn DRC on or off. I assume that "on" means "use the profile specified in the bitstream" and that "off" means "don't apply any DRC".

Some DVD players however, instead of having a simple on or off, have a variable scale setting. How does this work? Does it override the DRC profile specified in the bitstream, or is it a multiplier that increases/decreases the effect of the profile specified (and thus, will have no effect if the DRC profile is set to "none")?

You are correct. It does scaling (multiplier) of the DRC gain which is already encoded in the file.

Quote
I'm also assuming that any DRC options in the DVD player setup only apply if the player is doing the decoding itself, and if it's outputting the raw bitstream then this will be unaltered by any settings in the player.

I think that all hardware decoders apply the dialnorm reduction. I haven't seen any cases where this can be turned off, (nor can I imagine any case where you would want to).

I would assume so as well, but do not know definitively.

If you have not done so already, you may want to check out the DVD audio guides on http://forum.doom9.org/

Hope this helps,

-Justin

Dolby Digital AC3 and Dynamic Range Compression

Reply #2
Yes, very helpful, thank you.