View Full Version : eac3to AC3 -> AC3 gain curiosities
shh
21st April 2010, 19:55
Hi!
I'm having problems transcoding AC3 5.1 -> AC3 5.1 with eac3to v3.18.
I want to shrink some of my DVDs for my mediabox and am somewhat confused about what eac3to is producing.
First, I'm using "these standard AC3"-files as found on nearly every DVD. For this example eac3to sais:
AC3, 5.1 channels, 1:31:51, 448kbps, 48khz, dialnorm: -27dB
I just want to reduce bitrate, so I run something like this:
eac3to input.ac3 output.ac3 -384
1. Curiosity: -keepDialognorm option doesn't have an effect.
If I use it or not, the output-file is bit by bit the same. Why? :confused:
2. Curiosity: DD Dialog Normalization is being removed sais the log.
What does that mean? That actually the Dialog Normalization is being applied to the output, but not marked in the destination file anymore (= setting dialog-level to -31dB)?
Further question: How is the Dialog Normalization applied? Is it just a positive gain on the center channel, or are all other channels attenuated to implicitly increase the dialog level?
3. Curiosity: Result is too loud.
I'm just reducing bitrate, but the whole volume of the output is too loud afterwards. I understand, that I receive a file with different DialogLevel, but even the loud parts of the result are "ear-measured" something about 4-5dB too loud (<- I used different encodings with -xdB in eac3to to check this; about -5dB sounds as loud as the source AC3 file)
So, I did't use -normalize nor DRC, what eac3to can't apply anyway... How come?
Some thoughts: I checked my source-file in MProbe, which shows a "Compression Gain Word" varying from -4.68 to -5.29dB what would probably be the value what I have to de-gain to get equal loudness results with eac3to. I also recognize that the encodings of eac3to don't have this gain word.
What's this value for, and is this missing gain word the reason I'm receiving a different loudness on my A/V-receiver?
Then, why doesn't eac3to correct this for me (when it removes the gain word already)?
How do I get a bitrate-reduced AC3 file which is just the same for volume and dialog-level on my receiver?
Best regards...
nurbs
21st April 2010, 20:38
Not 100% sure about this but:
IIRC -keepDialognorm is only used when you demux AC3 tracks. If you don't specify it it will be set to -31dp(?) so that no dialog normalization is applied when you play the demuxed file.
IIRC eac3to doesn't apply dialog normalization during decoding.
kypec
22nd April 2010, 09:25
Are you sure you have used the option spelled correctly? It must be -keepDialnorm while you keep writing -keepDialognorm
shh
22nd April 2010, 13:16
Oops. But when doing the tests I wrote the correct option "-keepDialnorm". Otherwise eac3to would've complained anyway.
Quick test again:
D:\Video>\eac3to\eac3to.exe ae.@.ac3 test.ac3 -384 -keepDialnorm
AC3, 5.1 channels, 0:00:40, 448kbps, 48khz, dialnorm: -27dB
The Nero decoder doesn't seem to work, will use libav instead.
Decoding with libav/ffmpeg...
Remapping channels...
Encoding AC3 <384kbps> with libAften...
Creating file "test.ac3"...
eac3to processing took 1 second.
Done.
D:\Video>\eac3to\eac3to.exe ae.@.ac3 test2.ac3 -384
AC3, 5.1 channels, 0:00:40, 448kbps, 48khz, dialnorm: -27dB
The Nero decoder doesn't seem to work, will use libav instead.
Removing AC3 dialog normalization...
Decoding with libav/ffmpeg...
Remapping channels...
Encoding AC3 <384kbps> with libAften...
Creating file "test2.ac3"...
eac3to processing took 1 second.
Done.
D:\Video>\eac3to\eac3to.exe test.ac3
AC3, 5.1 channels, 0:00:40, 384kbps, 48khz
D:\Video>\eac3to\eac3to.exe test2.ac3
AC3, 5.1 channels, 0:00:40, 384kbps, 48khz
D:\Video>crc32.exe test.ac3
test.ac3 - CRC32: D91CBC94
D:\Video>crc32.exe test2.ac3
test2.ac3 - CRC32: D91CBC94
Ouputs test.ac3 and test2.ac3 are bit by bit identical!
Version info:
D:\Video>\eac3to\eac3to.exe -test
eac3to (v3.18) is installed
Nero Audio Decoder (Nero 6 or older) doesn't seem to be installed
http://www.nero.com/eng/store-blu-ray.html
CAUTION: You need Nero 7. Nero 8 won't work with eac3to.
ArcSoft DTS Decoder (1.1.0.7) works fine
Sonic Audio Decoder (3.18.0.0) doesn't seem to be installed
Haali Matroska Muxer (2010-03-27) is installed
Nero AAC Encoder (1.5.1.0) is installed
Surcode DTS Encoder doesn't seem to be installed
http://www.surcode.com
MkvToolnix (3.3.0.0, release version) is installed
TinTime
22nd April 2010, 14:45
I could be wrong here but I don't think libav respects dialnorm.
You can set dialnorm when encoding with the aften CLI tool - you could give that a go.
tebasuna51
22nd April 2010, 15:03
Eac3to decode (Nero or libav) never use the Dialnorm, like must be to recode audio.
Eac3to encode always use Dialnorm=-31dB.
The parameter -keepDialnorm only work when you extract ac3 without modify the stream.
If you want put a different value for Dialnorm you need use Aften in 'pipe' mode:
eac3to.exe ae.@.ac3 stdout.wav | Aften -dnorm 27 -b 384 -pad 0 -readtoeof 1 - test2.ac3
EDIT:
Further question: How is the Dialog Normalization applied? Is it just a positive gain on the center channel, or are all other channels attenuated to implicitly increase the dialog level?
3. Curiosity: Result is too loud....
DialogNorm apply a negative gain (-31 + 27) = -4 dB to all channels.
With DialogNorm -31dB (-31 + 31) = 0 dB, result have the same volume than uncompressed source, the same behaviour than use others encoders (Flac, TrueHD, DTS, WMA, AAC, MP3, ...).
shh
23rd April 2010, 12:53
:thanks: I also read some further docs about Dialog Normalization and much things are clearer now.
Main problem was, I thought DN is only applied to the center-channel with unchanged surround-channels.
But, eac3to's treatment of DN should be considered a bug:
eac3to silently ignores the dialog level of the input file:
1. -keepDialognorm doesn't have an effect although the log sais eac3to is doing something.
2. Input dialog level is remapped to -31dB without modifying gain in any way. Because eac3to knows it's reencoding with libaften (defaulting to -31dB), it should use the "-4dB" option automatically. This is what users expect when eac3to is logging "Removing AC3 dialog normalization..."
The parameter -keepDialnorm only work when you extract ac3 without modify the stream.
When does this situation occur? :confused:
Opening a MPG/VOB/MKV with AC3 and just extracting an AC3-stream?
Does eac3to then change something depending on -keepDialognorm? :eek:
tebasuna51
23rd April 2010, 13:45
Main problem was, I thought DN is only applied to the center-channel with unchanged surround-channels.
Nope, the attenuation is applied to all channels.
But, eac3to's treatment of DN should be considered a bug:
eac3to silently ignores the dialog level of the input file:
Because the DialogNorm is a undesired feature than make ac3 files sound lower than other formats.
Input dialog level is remapped to -31dB without modifying gain in any way. Because eac3to knows it's reencoding with libaften (defaulting to -31dB), it should use the "-4dB" option automatically.
Never. When you recode you must have the source untouched, if you want put the initial DialNorm (I don't know for what, but you are free) use the command line I put in my previous post.
Opening a MPG/VOB/MKV with AC3 and just extracting an AC3-stream?
Yes, when eac3to extract an AC3 track from a container (also m2ts from BD) make 3 things:
1) Apply the delay included in the container (adding silence ac3 frames or cutting frames). Then the audio is in sync with the extracted video.
2) Correct gaps/overlaps if multiple input files (vob, m2ts) have the problem.
3) Correct the undesired DialogNorm feature changing the field value (to 31) in ac3 frame headers (unless you use the -keepDialognorm parameter)
You can also correct the DialogNorm in a individual ac3 file (like I make always I detect the low volume problem) only with:
eac3to input.ac3 DiallogNorm31.ac3
shh
23rd April 2010, 14:57
-27dB being an undesired feature:
I didn't recognize yet, but since there are many DVDs with parallel DTS and AC3-tracks: Are the AC3-tracks indeed lower volume than the DTS-tracks (or PCM)?
About a -27dB source:
So, when just writing -31dB in the output.ac3 you retain full dynamic range. What would be a good thing - I can just turn my volume down, if it's too loud.
But, since all hardware AC3-decoders (receivers, DVD-players) apply a automatic DRC on the output (as it's required by Dolby), doesn't this remapping just break everything? How can DRC, "Film"-mode, "Orchestra"-mode etc. work properly on the receiver, when someone silently changed the info about how loud the dialogs were?
tebasuna51
23rd April 2010, 16:28
-27dB being an undesired feature:
I didn't recognize yet, but since there are many DVDs with parallel DTS and AC3-tracks: Are the AC3-tracks indeed lower volume than the DTS-tracks (or PCM)?
Yes, if AC3 and DTS are encoded from the same PCM source and DTS don't use the DialNorm.
DTS have also a DialNorm field in DTS headers (and eac3to can also cancel it) but isn't used frequently.
Don't use DialNorm or use a different PCM source mix can be the reason because the users prefer the DTS track than the AC3 in some DVD's.
But, since all hardware AC3-decoders (receivers, DVD-players) apply a automatic DRC on the output (as it's required by Dolby), doesn't this remapping just break everything? How can DRC, "Film"-mode, "Orchestra"-mode etc. work properly on the receiver, when someone silently changed the info about how loud the dialogs were?
Apply DialogNorm is mandatory for Dolby decoders, but apply DRC isn't mandatory.
Eac3to always encode ac3 with DRC='none' (and is not recommended use Aften with other DRC option).
BTW, the ac3 DRC method is a bit obsolete (write attenuation values for each block in ac3 frames), was intended for old receivers without enough process power, actual receivers can do similar functions in real time (Night mode, DSP functions,...) for all kind of audio not only for AC3.
nike22
24th April 2010, 03:23
Yes, if AC3 and DTS are encoded from the same PCM source and DTS don't use the DialNorm.
shh
25th April 2010, 13:58
Apply DialogNorm is mandatory for Dolby decoders, but apply DRC isn't mandatory.
Ahh, thanks! I was mistaken again. Maybe, because DRC is on by default in many AV-receivers. My old Yamaha was defaulting to a "STD" dynamic range compression, but only for Dolby Digital sources.
My new receiver has "Audyssey Dynamic Volume" for DRC, but this for all type of audio-streams.
So, you think this new "Audyssey Dynamic Volume" applied to my streams without knowledge of the dynamic range and speech-level is better, than the predefined dynamic-markers of a professional production stream knowing all dynamics? And DD DRC is obsolete? :eek:
Have you got any further information about this?
I'm persistently being annoyed by too high dynamic range of DVDs/BDs and even converting the streams doesn't create a proper listening range. Dialogs always seem to be too low and effects too loud.
I also recognize some bad reaction of this "Audyssey Dynamic Volume": If some silent parts come immediately after loud effects, they aren't lifted properly. The first 2secs often aren't audible; Audysseys reaction seem to be too slow. Wouldn't predefinened DRC-markers help here?
tebasuna51
25th April 2010, 19:52
I don't know "Audyssey Dynamic Volume", but of course 2 secs reaction is very slow, seems is bad adjusted.
The algorithms used by an AC3 encoder to calculate DRC atenuation values aren't dificult, can be reproduced by a modern receiver.
The Ac3Filter Directshow decoder can use a internal DRC for all audios in real time.
BTW, is always recommended use the original sources without re-encode (448 -> 384 don't have much sense, lose quality to save 64 Kb/s?).
If you don't like the high dynamic rang, you can use others tools to recode than accept the DRC compression (BeLigth-Azid, BeHappy-NicAudio), eac3to always preserve the full dynamic range.
Mug Funky
1st July 2010, 05:04
resurrecting a thread slightly here...
i have some questions re eac3to's dialnorm stuff. information is a little tricky to find sometimes.
- when eac3to removes dialnorm, does it also remove DRC information? file-comparing in cmd suggests that it is changing more than a few bits, but it's gobbledegook to me.
- what does eac3to set dialnorm to when it blanks it? 0? or -31?
- is it possible to set dialnorm to an arbitrary number? TV mixes are -27 typically.
- can DRC info be stripped without stripping dialnorm?
- (tough one) can DRC be calculated and written to an input file?
all these questions assume i am NOT touching the actual audio data. i don't wish to transcode if i don't have to.
thanks :)
nurbs
1st July 2010, 07:04
It sets the dialnorm to -31. You can't set it to an arbitrary number AFAIK.
tebasuna51
1st July 2010, 10:58
- when eac3to removes dialnorm, does it also remove DRC information?.
- can DRC info be stripped without stripping dialnorm?
- (tough one) can DRC be calculated and written to an input file?
No, DRC can't be removed/written without recode.
- what does eac3to set dialnorm to when it blanks it? 0? or -31?
After v3.0 -31dB.
Remember you can use the eac3to parameter -keepDialnorm
- is it possible to set dialnorm to an arbitrary number? TV mixes are -27 typically.
Yes, a small app (I have one to put -27) can change the header value (and recalculate the CRC's) without recoding.
laserfan
4th December 2010, 19:20
But, eac3to's treatment of DN should be considered a bug:
eac3to silently ignores the dialog level of the input file
Because the DialogNorm is a undesired feature than make ac3 files sound lower than other formats.
Late to the "keepDialnorm" party here and found this useful thread. I have noticed in the past that my BD backups with "director's commentary" tracks have wildly different sound levels between tracks. I suppose this is a result of converting the primary track from the original to some different bitrate AC3 and losing DN in the process, vs accepting the commentary track (usually 192kbps stereo) "as-is" therefore *its* DN has not been touched.
So I have a main track with a DN of -31 and a commentary track of -27 or -28db or whatever-it-was but louder. I'd been led to believe that "DN removal" would result in a louder track but apparently that is not the case!?
Certainly it must be said that DN is not an "undesired feature" and at least for any backups I make w/multiple audiotracks it appears I will have to pipe a custom libAften command to keep my tracks in balance!
EDIT: Well, duh, after posting I realized that "if I demuxed w/eac3to then all tracks would have DN removed" so if I do have any discrepancies between primary and secondary audiotracks that would have to be because I demuxed w/another tool and used eac3to to re-sample one of them. Would be rare that I did that (though possible).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.