View Full Version : GUIDE: How To Properly Encode Dolby Digital Audio (AC3)
raquete
30th June 2006, 05:02
no,it's not extracted from original ac3,it's using stereo cda.
ok,thanks tebasuna51,i got the "feeling"!
;)
thank you too for the "update" in the guide SomeJoe.
Sakuya
26th July 2006, 05:38
I have an official DVD with a 5.1 surround track that seems to be lacking in the music area. The soft music just can barely be heard for some reason. The action packed music for action scenes can be heard somewhat but is often drowned out by the explosion sounds.
Is there a way to fix this, maybe by re-encoding in Soft Encode? :scared:
maybe by re-encoding in Soft Encode? Or Nero7 !
Sakuya
26th July 2006, 21:35
Or Nero7 !
I only have Nero 6. :scared: Any other methods?
raquete
9th August 2006, 04:16
dialog normalization doubts remains...
same source at 100% and at 70%,in audition "group waveform normalize" was found the averages -16.11 from the 100% source and -19.21 from 70% source to be used in "dialogue normalizations".
http://img105.imageshack.us/img105/6571/10070jx3.png
here are the results in Ciler's AC3 tools" from the waves encoded as AC3 :
http://img105.imageshack.us/img105/7396/10070ac3fd5.png
.waves: 100.wav = 0dB and 70.wav = -3.098dB, then the sources have 3dBs differences.
.ac3: 100.ac3 using dialnorm 16 and 70.ac3 using dialnorm 19, then the results have 3dBs differences.
what i mean and ask:
why the 100.ac3 have too much more volume than 70.ac3 if the sources are 3dBs differents and was encoded with the same 3dBs differences where using -16 in dialnorm sounds louder than -19?
it all means that sources with differents volumes result in differents dialnorms adjusts.
sources louder remains louder and sources lower remains lower? in the end,what dialnorm is doing? ...a mess? :scared:
(why) the volumes are not equals or seamless in the HT or receiver/decoder(or in pc with MPClassic,powerdvd,etc) (?)
the parameters are right(i'm sure they are following the guide) or have something wrong with the parameters used?
we don't have to "treat" the volumes of the sources and later encode the AC3?
i (we?) need one "reference",something like a "pre-dialnorm treatment" or "know level for reference"...or something like this.
thanks. :thanks:
corrections are very welcome! ;)
(you can do your own fast test or i can host the ac3 samples if needed)
tebasuna51
9th August 2006, 13:27
- The encoder put DialNorm like a parameter in the header of ac3 frames, is also used for calculate the DRC info (at begining of each audio block, if present), but is not used to modify the audio samples. Then audio samples from same wav are the same with DialNorm -16 or -19. Audio samples from 100.ac3 are loud than 70.ac3 because DialNorm don't change the audio samples.
- The decoder, ideally instructed by the user, can:
1) Apply DialNorm, then
100.ac3 (0 db) - (31-16) = sound at -15 dB
70.ac3 (-3 db) - (31-19) = sound at -15 dB
2) Don't apply DialNorm
100.ac3 (0 dB) = sound at 0 dB
70.ac3 (-3 db) = sound at -3 dB
Now answers to:
why the 100.ac3 have too much more volume than 70.ac3 if the sources are 3dBs differents and was encoded with the same 3dBs differences where using -16 in dialnorm sounds louder than -19?
This decoder don't use DialNorm value.
it all means that sources with differents volumes result in differents dialnorms adjusts.
sources louder remains louder and sources lower remains lower? in the end,what dialnorm is doing? ...a mess?
Sources louder remains louder, and DialNorm is intended to offer same volume (-31 dB in average) with decoders than uses DialNorm.
(why) the volumes are not equals or seamless in the HT or receiver/decoder(or in pc with MPClassic,powerdvd,etc) (?)
Check the defaults/settings of your decoders, seems you have different adjusts.
the parameters are right(i'm sure they are following the guide) or have something wrong with the parameters used?
Seems DialNorm is well calculated.
we don't have to "treat" the volumes of the sources and later encode the AC3?
i (we?) need one "reference",something like a "pre-dialnorm treatment" or "know level for reference"...or something like this.
The same question for me. Something to do with the volume before encode?: Nothing.
Now my question is:
1) Do you want make a Dolby compliant ac3 to be played with Dolby compliant decoders, together with another Dolby compliant material, to be listened all at same average volume (-31 dB)?. If you answer yes, calculate the DialNorm and apply the appropriate DRC.
2) Do you want an ac3 to be listened together with other material (CDAudio, Mp3, Commercial TV, ...) at same volume?. If you answer yes then maximize the wav source and encode with DianNorm = 31 and DRC = None. This method (not Dolby compliant) use ac3 like other lossy encoders (mp3, ogg, aac, ...), and the ac3 volume must be the same than the wav source with all decoders.
raquete
9th August 2006, 15:41
first and most important:thank you for answers.
Now my question is:
1) Do you want make a Dolby compliant ac3 ... yes!
If you answer yes, calculate the DialNorm and apply the appropriate DRC.was done.
Seems DialNorm is well calculated.
yes,i just :readguid: and follow.
Check the defaults/settings of your decoders, seems you have different adjusts.was done too and the adjust is right.
Something to do with the volume before encode?: Nothing.ok.then...(back to the beginning)
- The decoder, ideally instructed by the user, can:
1) Apply DialNorm, then
100.ac3 (0 db) - (31-16) = sound at -15 dB
70.ac3 (-3 db) - (31-19) = sound at -15 dB
you don't want to mean here: 70.ac3 (-3 db) - (31-19) = sound at -12 dB ?
...or i'm really lost and :stupid:
if yes,(i'm sure following the metadata parameters)then the 100.ac3 remains louder!
from Dolby Metadata guide.pdf:
http://img239.imageshack.us/img239/9200/metadataca0.png
Sources louder remains louder, and DialNorm is intended to offer same volume (-31 dB in average) with decoders than uses DialNorm.
how can the volume level be consistent after follow this "rules" from metadata guide ?
...played with Dolby compliant decoders, together with another Dolby compliant material, to be listened all at same average volume (-31 dB)?.
how we get same volume if 100.ac3 sound at -15 dB and 70.ac3 sound at -12 dB ?
corrections (please) are welcome tebasuna51.
thanks so much. ;)
tebasuna51
9th August 2006, 17:26
"1) Apply DialNorm, then
100.ac3 (0 db) - (31-16) = sound at -15 dB
70.ac3 (-3 db) - (31-19) = sound at -15 dB"
you don't want to mean here: 70.ac3 (-3 db) - (31-19) = sound at -12 dB ?
...or i'm really lost
Maybe :rolleyes: , because -3 - 31 + 19 = -15.
In others words:
100.wav: max peak 0 dB, average -16 dB
70.wav: max peak -3 dB, average -19 dB
And encoded and decoded with DialNorm:
100.ac3: max peak -15 dB, average -31 dB
70.ac3: max peak -15 dB, average -31 dB
For that the volume level is consistent after follow this "rules" from metadata guide.
raquete
9th August 2006, 18:16
because -3 - 31 + 19 = -15.
but tebasuna, -3 is the dB level of the wav source with 70% and is not to be used in the calculations.
as 100% is 0dB, 70% is -3db(-3.092).
tebasuna51
10th August 2006, 01:20
but tebasuna, -3 is the dB level of the wav source with 70% and is not to be used in the calculations.
as 100% is 0dB, 70% is -3db(-3.092).
Wrong.
For what is 70% DialNorm -19 dB, just -3 dB than 100% DialNorm (-16 dB) ?
Because 100% need be attenuated 3 dB more than 70% to obtain the same output level.
For that is useless attenuate or maximize the sources before encode (for Dolby compliants ac3):
100% -> DialNorm = -16
70% -> DialNorm = -19
Output volume -> the same, max peak -15 dB, average -31 dB
raquete
10th August 2006, 01:35
ok.the sources and results are 3db differents form each other,we are talikng the same thing...
viewing from another angle...
the sources have to match the -31 standard where "31+(dialogue level value)=shift applied"
-16 was the average from 100%.wav:
x = 31 - 16
x = 15
and -19 from 70%.wav:
x = 31 - 19
x = 12
where "x" represent "shift applied" in the decoder to match -31.
(15dB and 12dB in this examples and they have(the same)3dBs of differences as sources)
the mess was: the parameter "shift applied"(x) is for the decoder and not "to encode".
see? i'm feeling stup but have remedy,i have hope. (lol)
(lol,i'm very complicated)
seems "logical" now tebasuna.
right? (or wrong?) :thanks:
:)
raquete
11th August 2006, 21:08
source: Led Zeppelin-Presence 00:44:20.866 (all 7 tracks as one single track)
from a.audition1.5 -17.21, from s.forge8a -14.4
:p what you choose?....i'm lost tebasuna.
regards. ;)
edit: screenshots later if needed
tebasuna51
12th August 2006, 00:28
from a.audition1.5 -17.21, from s.forge8a -14.4
:p what you choose?....i'm lost tebasuna.
Of course -16 (always minimize the possible errors:D , and take decisions without doubts :cool: )
raquete
12th August 2006, 02:05
Of course -16 ok.
and take decisions without doubts) no doubts.
...was only one "fast indecision" with more than 1 option. (lol)
(always minimize the possible errors..) i did it :p ...i minimize asking my :helpful:
:thanks: so much!
Boulder
14th August 2006, 18:27
from a.audition1.5 -17.21, from s.forge8a -14.4
Out of curiosity, do you have the exact same settings in both programs? In Audition there's two settings for calculating the RMS values, "0dB=FS Sine Wave" and "0dB=FS Square Wave". I just did a quick test and the first one shows -10.4dB and the latter one -13.41dB for average RMS power.
raquete
14th August 2006, 22:09
In Audition there's two settings for calculating the RMS values...
in "group waveform normalize" ? :confused:
Boulder
14th August 2006, 22:13
in "group waveform normalize" ? :confused:
Nope, in Window->Amplitude Statistics.
EDIT: if I analyze the WAV file via Group waveform normalize, I get -9.61dB as the average. When I get the stats via Window->Amplitude Statistics, it shows that the Total RMS Power is ~-9.61dB (left channel -9.64 and the right -9.58dB) but the average RMS power is ~-10.4dB with FS Sine Wave selected. I've always used the latter method for getting the avg RMS power.
raquete
14th August 2006, 22:23
in Window->Amplitude Statistics
square wave:
Left Right
Min Sample Value: -32768 -29392
Max Sample Value: 30988 29073
Peak Amplitude: 0 dB -.94 dB
Possibly Clipped: 1 0
DC Offset: -.695 -.382
Minimum RMS Power: -inf dB -inf dB
Maximum RMS Power: -10.69 dB -11.38 dB
Average RMS Power: -20.74 dB -21.46 dB
Total RMS Power: -19.87 dB -20.59 dB
Actual Bit Depth: 16 Bits 16 Bits
Using RMS Window of 50 ms
Sine wave:
Left Right
Min Sample Value: -32768 -29392
Max Sample Value: 30988 29073
Peak Amplitude: 0 dB -.94 dB
Possibly Clipped: 1 0
DC Offset: -.695 -.382
Minimum RMS Power: -inf dB -inf dB
Maximum RMS Power: -7.68 dB -8.37 dB
Average RMS Power: -17.73 dB -18.45 dB
Total RMS Power: -16.86 dB -17.58 dB
Actual Bit Depth: 16 Bits 16 Bits
Using RMS Window of 50 ms
regards.
Boulder
14th August 2006, 22:29
Humm, it doesn't explain the huge difference between Sound Forge and Audition.. and it can't be any rounding errors because the difference is too big for that :confused:
I don't have SF so I can't check what it would say about my sample WAV.
raquete
15th August 2006, 00:23
don't worry Boulder,i have both and i'm double confused...in what editor we can really trust? :confused:
(this is one of lots reasons that i posted "Dialogue normalizations for music (test)" thread and(maybe) i am the first to find this ... http://forum.doom9.org/showthread.php?t=114390 ...seems nobody care :( )
:thanks:
raquete
23rd August 2006, 00:15
Boulder are you around?
did you found one final conclusion about the difference between Sound Forge and Audition?
what i saw is that checking "use equal loudness control" give one short rms and without check give high rms.the rms between this values from sound forge is seamless the rms from audition...but this is not one conclusion,only a single observation.
another detail from sound forge help:
"Ignore below
Drag the fader to determine the level of material you want to include in the RMS calculation. Any sound material below the threshold will be ignored in the calculation. This is useful to eliminate any silent sections from the RMS calculation. You should set this parameter a few dB above what you consider to be silence.
If you set this value to minus infinity, all sound data will be used. If the value is set too high (above -10 dB), there is a good chance that the RMS value is always below the threshold. In this case, no normalization will occur. Therefore, it is good to test the threshold by using the Scan Levels button."
the screenshot from the guide is using the default "[Sys] Normalize RMS to -16 dB (music)" where the Scan settings is in -45,0 dB(0,56%) where all sound with less level is ignored as silence when use Scan Levels to find the RMS.
your comments please.
best regards. :)
Boulder
23rd August 2006, 05:20
I never got into any real conclusion - I just decided to keep on using the value Audition gives me. It apparently doesn't have the choice to ignore "silent" areas. Besides, that would just give me another setting headache :p
maa
23rd August 2006, 09:15
Are you guys forgetting that some studio programs have "Pan Law" activated and other don't ?
Just a thought,
maa
raquete
23rd August 2006, 15:36
@ Boulder
Audition is my choice too. ;)
that would just give me another setting headache lol.
but wait,maa give us another headache.(joke) :p
@ maa
Are you guys forgetting that some studio programs have "Pan Law" activated and other don't ?
no,i don't forgot because i don't know about "Pan Law".
tell us more.
maa
23rd August 2006, 16:03
Right, I'll try.
When a mono signal is panned from one speaker to the other it doubles its volume when in the middle position because its now using two amplifiers and two speakers set the same.
All good hardware mixers and most software compensate for this to allow equal loadness by dropping the center volume by 6db, or 4.5 or 3db depending on mono or stereo and the way the software mixes the channels.
This is a major reason why some people think one software sounds totally different to another - if this is not adjusted the same or switched off then dissaster will follow.
Hope this helps a bit....
Cheers
M
raquete
23rd August 2006, 16:38
When a mono signal is panned from one speaker to the other it doubles its volume when in the middle position...
you're right.
this is why i use hard center and sides(surrounds) without center.
:D
w0rd™
14th September 2006, 07:05
I've got some questions, just to make it abit clearer in my head, so sorry if its been explained already, but so far its not so clear for me.
1. If i'm making a 5.1 ac3 mix and i have six wavs-
w1 : -10db rms
w2: -15db rms
w3: -14db rms
w4: -17db rms
w5: -5db rms
w6: -10db rms
how do i find the dialnorm for the final ac3 file? do i have to normalize the 6 wavs first?
2. If i get my final dialnorm figure from above for the 5.1 ac3, and on the dvd i also have music for the menu which is not ac3, what would i have to normalize the menu audio to, so that its the same level as the final ac3 soundtrack?
3. In adobe audition, which value is the best to use for dialnorm?
It gives for example this output in group waveform normalize:
Eq-Loud: -13.15
Loud: - 14.26
Max: -10.29
Avg: -15.91
thanks for any help.
raquete
16th September 2006, 20:55
1- ...how do i find the dialnorm for the final ac3 file?
maybe it can be done usisng the Center channel alone but i'm not sure.
as is not clear what track means w1,w2 and remainders...
do a new file and paste L in the left and R in the right and save.
follow the guide in "Example Compression Settings",is very clever...
http://forum.doom9.org/showthread.php?t=56020
2- ...what would i have to normalize the menu audio to.. do the same as posted for the first question.
3- In adobe audition, which value is the best to use for dialnorm?
Avg:
regards!
w0rd™
18th September 2006, 16:33
yes, well i guess it has to be the centre channel, or the dialogue part of the wav file, since its for the dialnorm value! even if there's dialogue in the rear channels, the most practical way is to choose main dialogue....
thanks.
w0rd™
19th September 2006, 11:26
just one more thing, is there any option in audition that will allow me to highlight a certain part of the audio and check the rms of just the part i want?
wave group normalize scans the whole clip, i want to check rms value of just highlighted part.
thanks.
Boulder
19th September 2006, 11:42
Choose the area and then select Window->Amplitude statistics.
raquete
20th September 2006, 00:06
Choose the area and then select Window->Amplitude statistics.
yes,cool option for only one file.
as he have more than one track(i don't know how many in the menu)better is not better load all in edit view and use group waveform normalize than one by one?
i think that is faster but i want to know your opinions/comments Boulder!
( audition have lots of "secrets features",maybe you know something that i ignore,i can bet)
;)
off topic:
i'm sending pm to you(is not about this topic)
:)
Boulder
20th September 2006, 05:22
Maybe he should use only the center channel, or center + the two front channels for determining the dialnorm value. Just choose the same part in each file, the selection area timecodes can be seen at the bottom right corner.
raquete
20th September 2006, 14:04
yes,seems one good option!
thank you.
ot: doh :-/ ...big typos in my last post,i need to edit :o
Rockaria
29th October 2006, 21:30
Right, I'll try.
When a mono signal is panned from one speaker to the other it doubles its volume when in the middle position because its now using two amplifiers and two speakers set the same.
All good hardware mixers and most software compensate for this to allow equal loadness by dropping the center volume by 6db, or 4.5 or 3db depending on mono or stereo and the way the software mixes the channels.
This is a major reason why some people think one software sounds totally different to another - if this is not adjusted the same or switched off then dissaster will follow.
Hope this helps a bit....
Cheers
M
Thanks for the good info.
raquete
3rd November 2006, 16:05
When a mono signal is panned from one speaker to the other it doubles its volume...not always!
samples? mine(i have lots) or yours?
regards
dvdboy
21st February 2007, 16:50
Ok, I think I follow the Dialogue Normalisation part, but I couldn't seem to see an 'idiots guide' to DRC.
I've got a piece of video with interviews and light background music, so scan the average RMS with soundforge at several places where there is speech and very little music I get:
-17.9
-20.5
-21.1
-19.5
Divided by 4 gives me an average of -19.75, so I've set the Dialogue Normalisation within Sonic's encoder to -20dB.
But how do I calculate which DRC preset to use?
Is it safe just to set this to none?
raquete
21st February 2007, 23:35
hi dvdboy.
-20dB seems good!
reading another thread with seamless question,the average value is the logical and safe answer.
take a look: http://forum.doom9.org/showthread.php?t=122212
foxyshadis
22nd February 2007, 00:18
DRC is meant to keep the levels fairly constant, so if they already are that way, there's no need for it. If the music is much louder than the dialogue, you would want it (though for a talk show, you'd probably just want to remaster it instead). The more variation between soft dialogue and loud noise, the heavier the preset.
kOoL tHuG
18th March 2008, 17:32
I have converted a Pal Video to Ntsc video. But now when i remux the ac3 file to the video i get audio synce issues. I guess it is coz my video was 25 Fps before and now its 29.97 Fps. Now can plz somebody help out with how to reencode the ac3 file to properly get the audio in sync with the video?
P.S - I used Besweet and Belight. I basically didn't like the quality i get after i reencoded the original ac3 file.
loekverhees
20th January 2009, 13:27
Hello,
I've analyzed a 2 channel wavefile in Adobe Audition. These are the Amplitude Analysis data (FS Sine Wave used):
Left Right
Min Sample Value: -2791 -2792
Max Sample Value: 3635 3633
Peak Amplitude: -19.1 dB -19.1 dB
Possibly Clipped: 0 0
DC Offset: 0 0
Minimum RMS Power: -73.89 dB -73.41 dB
Maximum RMS Power: -27.9 dB -27.89 dB
Average RMS Power: -43.84 dB -43.82 dB
Total RMS Power: -40.8 dB -40.79 dB
Actual Bit Depth: 16 Bits 16 Bits
Using RMS Window of 50 ms
Using RMS Window of 50 ms
So, I would choose -41 dB for the dialog normalization in Sonic Foundry Soft Encode. However, the lowest value I can choose from the pulldown menu in Soft Encode is -31 dB. So, what should I choose?
tebasuna51
20th January 2009, 17:53
I've analyzed a 2 channel wavefile in Adobe Audition.
...
So, I would choose -41 dB for the dialog normalization in Sonic Foundry Soft Encode. However, the lowest value I can choose from the pulldown menu in Soft Encode is -31 dB. So, what should I choose?
The use of Dialog Normalization is obsolete, now each stream try to offer the max possible volume.
You can amplify your wave +19dB to reach the max peak volume at 0dB (Peak Amplitude: -19.1 dB), and you can put the -31 dB value for DialNorm to avoid any attenuation.
loekverhees
20th January 2009, 20:30
OK, thanks for the answer. But just wondering why the Dialog Normalization is obsolete now, and why was it useful some time ago?
b66pak
20th January 2009, 20:38
offtopic...do you know some freeware audio analyzers?
_
tebasuna51
20th January 2009, 22:24
OK, thanks for the answer. But just wondering why the Dialog Normalization is obsolete now, and why was it useful some time ago?
If all your audio sources are ac3 the DialNorm can be a useful method to have the same volume levels.
The problem is when you listen CD Audio, mp3, commercial tv and other sources without this control. All other sources try to output the bigger possible volume, and the ac3 sounds with DialNorm have a big handicap.
loekverhees
21st January 2009, 09:52
If all your audio sources are ac3 the DialNorm can be a useful method to have the same volume levels.
The problem is when you listen CD Audio, mp3, commercial tv and other sources without this control. All other sources try to output the bigger possible volume, and the ac3 sounds with DialNorm have a big handicap.
Ok, I get it. Thanks again for the answers :).
b66pak
28th January 2009, 17:29
offtopic...do you know some freeware audio analyzers?
_
nobody know?
_
tebasuna51
28th January 2009, 22:07
Free audio editors are Audacity and Wavosaur and have some functions to analyze the sounds.
krabapple
10th February 2010, 21:39
I am starting from six-channel music files recorded from SACDs directly off the 6ch analog output of an SACD player. I used Audition to record (soundcard is an M-Audio 1010lt). Recording level is such that the highest peak is just below 0dBFS (i.e., no clipping in any channel). Each recording is saved as a single interleaved 6ch .wav (PCM) file (I can also save as six mono .wav files if I want to).
I want to convert the 6ch .wav (PCM) file to AC3 so I can play it via S/PDIF connection from my laptop and let my AVR decode it; I *don't* want to change any levels at playback and I *don't* want to add any compression. So is there a way to bypass Dialnorm and DRC? Btw, for encoding I am using the FFmpg library with Audacity (beta) to do wav-->AC3 conversion, and I don't see any options other than setting bitrate and channel mapping....
tebasuna51
11th February 2010, 01:25
You can use Aften like encoder, based in ffmpeg library but with more settings.
There are a GUI to set all the parameters: WavToAc3Encoder (http://wavtoac3encoder.googlecode.com/files/EncWAVtoAC3-4.5.zip)
Or you can also encode with Audacity using Aften, like external program, and this command line:
d:\path\Aften -b 640 -readtoeof 1 -exps 32 -s 1 - "%f".ac3
see this post: http://forum.audacityteam.org/viewtopic.php?p=72939#p72939
The default is don't use DialNorm/DRC
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.