digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Audio Conversion (http://www.digitalfaq.com/archives/audio/)
-   -   Producing a correct 5.1 ac3 stream using free tools? (part2) (http://www.digitalfaq.com/archives/audio/12815-producing-correct-51-a.html)

J-Wo 11-03-2004 12:32 AM

Producing a correct 5.1 ac3 stream using free tools? (part2)
 
as for low volume in ac3 output from besweet, I have noticed this is a problem when encoding in 5.1 channels, but NOT with 2 channels. I can't remember how I ended up getting this fixed with 5.1 channels, but I think sometimes BeSweet likes to force some odd parameters into azid that screws up the volume... If I encounter another 5.1 source that needs converting maybe I'll figure out again how I fixed this. :P

jorel 11-03-2004 06:10 AM

Quote:

Originally Posted by J-Wo
as for low volume in ac3 output from besweet, I have noticed this is a problem when encoding in 5.1 channels, but NOT with 2 channels.

J-Wo as i wrote a long time here and not only in my last post..
AC3-5.1 give good volume ONLY in dolby surround receiver cos that receivers have 5 or 6(depend of the model) separeted amplifiers for EACH channel.
then using the same dolby surround as setereo and as 5.1 decoder, ALWAYS the 5.1 have better volume cos in stereo only 2 of the reminders is working.
i really will that everybody understand what i wrote thousands times:
in stereo,we have 2 channels working with the whole signal but in
dolby surround we have MORE 4 speakers working
:arrow: using the same source ac3-5.1 and the SAME volume.

my hobby is audio for 44 years and my work is eletronic for 32 years.
i know what i posted and IF someone do tests following exactly what i wrote,will see ..or better, listen the strong differences in quality and in the volume.
if nobody understood what i wrote....the only way is....a single calculator show that 1 source for 2 targets give less power that for 6 targets...
is so hard to understand?...i can' t trust!

example:
2 * 10 Watts always give less potence that 6 * 10 Watts
using the same source and the same volume for 2 or 6 channels...
if nobody understood....excuse me..i'm really sorry!

ac3 5-1 when you encode to mp2 or stereo loose lots of details....do tests putting and removing the surround.....in ac3 they increase...in stereo they sometimes loose no matter if you're using besweet,headac3.....etc.
only tests can show and proove for you, not my poor english!
:wink:



@ who care...
i will that post stay alive now! :wink:
like wroted somewhere.."use your judgement" but judge with equality and not as dictator as i was called and delete only my opinion if you want but not my informations about the audio.
one more time i write here....don' t be coward and don't do exact what you accuse me...you still need to change to be a man..delete only this part cos i'm right that you read before delete!...thanks!
:roll:

Dialhot 11-03-2004 11:43 AM

Quote:

Originally Posted by jorel
AC3-5.1 give good volume ONLY in dolby surround receiver cos that receivers have 5 or 6(depend of the model) separeted amplifiers for EACH channel.

Jorel, all that you are saying is logical but we are not talking about this here. Besweet really produce ac3 files that are lower in volume than the source !
If you take anb ac3 file demuxed from a DVD and you convert it with besweet or ac3 machine in an otehr ac3 file (let say that you do not modify anything, just for doing a test) and then you listen both file on your pc the volume of the new file will be lower than the original one !

incredible 11-03-2004 12:14 PM

Back from vacations .....

Back from vacations .....

If going with an 5.1 DVD into a SAP where a "Simple Stereo Amplifier" is connected, the SAP can be settet up to output a downmixed 5.1 to Stereo Signal out of the SAP "just stereo out" to that 2 channel Stereo amplifier.
And here it counts how good the quality of that downmixing of the SAP is given.

If a surround-matrix 2.0ch encoded DVD is played back by a 5.1 capable DDdecoder connetcted and set to 5.1 Speakers then the surroundmatrix of that 2.0ch audio is used to split the 2.0ch to descrambled 5.1 sound components which will be delivered to the 5 internal "amplifiers" of that DDdecoder, the LFE chanel often (depends on the DDdecoder model) is provided as a low voltage output signal (unamplified) so an active Subwoofer can be feeded by that one.

Quote:

but I think sometimes BeSweet likes to force some odd parameters into azid that screws up the volume.
Do get used to work with besweet in commandline mode! ;-)
Just generate a bat file from the commandline contend shown in besweet and so in that bat file you easely can set the right parameters to azid etc.
You are right that theres a bug that if you go in further seetings, it can happen that the azid part of the final commandline is resettet in a wrong way. AC3machine is also a nice choice but the latest options of these used dlls are not fully supported or even up to date ;-)

Maybe thats why phil gots everytime still that less volume output??
But I do think that you (phil) are aware of that besweet bug.

Dialhot 11-03-2004 12:35 PM

Quote:

Originally Posted by incredible
Back from vacations .....

If going with an 5.1 DVD into a SAP where a "Simple Stereo Amplifier" is connected, the SAP can be settet up to output a downmixed 5.1 to Stereo Signal out of the SAP "just stereo out" to that 2 channel Stereo amplifier.
And here it counts how good the quality of that downmixing of the SAP is given.

Already discussed in an other thread, with boulder ;-)

Quote:

AC3machine is also a nice choice but the latest options of these used dlls are not fully supported or even up to date ;-)
azid.dll used be besweet or ac3machine (or even headac3che) is about 2002 ! I don't know newer one. Do you ?

incredible 11-03-2004 12:40 PM

Well AFAIK (IMHO) the latest azid.dll is newer! Do check that as diff. parameter names for ds downmixing/outputting are used now. :-)

Just get my latest "Packshot with everything" package, in there you get the latest modules of all types.

btw: in the case of the latest azid.exe compile you could be defenitely right ... but lets check that.


(PS: You just copied my last passage of the previous post? Did your purpose was something diff.? ;-) )

And the newest beta of headac3he "should" also come with the most recent versions?

Dialhot 11-03-2004 12:49 PM

Quote:

Originally Posted by incredible
Well AFAIK (IMHO) the latest azid.dll is newer! Do check that as diff. parameter names for ds downmixing/outputting are used now. :-)

Excuse me, you are right, it is from december 2003 and support "-dpl" insteed of "-surround" for instance. But this is the one that give me volume problem.

Quote:

(PS: You just copied my last passage of the previous post? Did your purpose was something diff.? ;-) )
No. An error that I have corrected now ;-)

Quote:

And the newest beta of headac3he "should" also come with the most recent versions?
It's older (july 2003) but the ac3 encode dll is newer.

Note : I wonder now what we focus in the azid.dll. the problem is in ac3enc.dll, isn't it ?

incredible 11-03-2004 01:04 PM

Quote:

Originally Posted by Dialhot
Note : I wonder now what we focus in the azid.dll. the problem is in ac3enc.dll, isn't it ?

Thats exactly (beside other tests) what we should find out! Cause in that other Thread about ac3 encoding we started, I pointed to that azid.exe. Maybe that "could" result in a fix???? (Wouldnt make sense as azid developement should get better than worsed *lol ).
But practize is better than theory .... and thats why I wanted to figure out all options !in commandline mode! (so nothing "could" be messed up by possible buggy GUIs) ... and also beside that, that workout via 3pass and .exe modules and finally LGPL compiled ffmpeg.exe as wav in and liba52 AC3 output. ;-)

.... ähhhhm I just recognised we are again in the wrong topic for that *lol

Boulder 11-03-2004 02:34 PM

Is there any program that would give any detailed information about the ac3 file? It might be useful to know what level the dialog normalization and dynamic range compression are set. Also the different mix parameters are unknown with ac3enc.

incredible 11-03-2004 02:45 PM

Quote:

Originally Posted by Boulder
Is there any program that would give any detailed information about the ac3 file? It might be useful to know what level the dialog normalization and dynamic range compression are set.

There "could" be an AC3 parser available IMHO, ... Im not shure but I might remeber of one ... youd better ask at audio/doom9.

Quote:

Also the different mix parameters are unknown with ac3enc.
?
Do you mean azid ? As ac3enc just encodes what has been feeded with.

Quote:

Originally Posted by AC3enc readme
Bitrate: -b (Default: 384)
6channels Encoding: -6ch

Quote:

Originally Posted by Azid readme

-g GAIN
-------

Default: 1.0 (or 0db)

This option controls the main (output speaker) gain. The value can be given
in db's, in percentage, or a positive numerical value.
Examples: -g 5.3, -g 95%, -g -3db, -g 6db.

"-g max" is a special switch for finding maximum gain. (Normalize)
"-g 90%", for example, will normalize a track to 90% of its maximal gain.


--maximize
----------

Default: omitted

This option will enable a two-pass maximize function of azid. BeSweet
will in the first pass scan the entire file to find the maximum
level. In the second pass the audio will be properly decoded, gaining
it up to 0dB FS.

NOTE: Sometimes when you use this function, the output will still
create downmix overflow warnings. This is normal. It happens because
the signal has touched the 0dB FS, or because of some random value
within the signal has caused it to slightly overload.


-L LRLFE_LEVEL
----------------

Default: 0.0

This controls the downmix-level of the LFE channel into the LR channels.



-l LFE_LEVEL
------------

Default: 0.0

This controls the downmix-level of the LFE channel into the LFE output
speaker. I.e. if this options is set to a non-zero value, the LFE channel
output may be listened to with the -olfe option.


-C LEVEL
--------

Default: BSI

This command option controls the center dowmix level into the LR channels.
Normally, the BSI section contains a field which tells the decoder of how to
downmix the center channel into the LR channels.

With this option, the user may override the BSI center downmix level and
specify a custom value. Note that this option is only active when the
output decode mode (-d) is 2/x.

Allowable values is gain values (either in db's or a positive numerical
value) or BSI. When BSI is selected, the center downmix level gets its value
from the BSI section.


-S LEVEL
--------

Default: BSI

This command option controls the surround dowmix level into the LR channels.
Normally, the BSI section contains a field which tells the decoder of how to
downmix the surround channels into the LR channels.

With this option, the user may override the BSI surround downmix level and
specify a custom value. Note that this option is only active when the
output decode mode (-d) is 2/x and the input stream is either x/1 or x/2.

Allowable values is gain values (either in db's or a positive numerical
value) or BSI. When BSI is selected, the surround downmix level gets its value
from the BSI section.


-c COMPR
--------

Default: none

This option sets the overall dynamic compression in the decoder. This value
is applied to every output speaker.

The bitstream contains information of how much to amplify or attenuate the
sound to decrease the overall dynamic variations (loudness) in the program
contents. Different options exists to choose the wanted dynamic reduction:


o none No dynamic compression. The program contents is unchanged.

o normal Normal dynamic compression. Normal in-store decoders use
this as an hardcoded default.

o light Light dynamic compression. This is 50% (-6db) of the
reduction/gain that normal dynamic compression would give.

o heavy Heavy dynamic compression. Intended for poor listening
environment with much background noise.

o inverse Dynamic expansion. This is the inverse value of the light
dynamic compression, i.e. it makes strong sounds stronger
and weaker sounds weaker.



-s STEREO_MODE
--------------

Default: surround

this option controls what kind of stereo downmix should be applied.

o stereo Simple stereo downmix.

o surround Dolby surround compatible downmix.

o surround2 Dolby surround 2 compatible downmix.



-f BOOL
-------

Default: off

This option controls rear-channel filtering. The filter is a 2nd order Butterworth
filter with at -3 dB point at 7 kHz. There are two
major applications for this feature:

o To provide proper Pro Logic downmix of the rear channels

o Phasing-problems in the downmix (washy sound) caused by the rear
channel downmix into the L R channels.

Usually the rear channels are phased 90 deg in respect of the front channels
prior or inside the ac3 encoder. This is done to avoid phasing problems when
downmixing the program contents to two channels. Some sources do not provide
this shifting, and thus this feature is added.

The filter provides an increasing phase shift according to frequency. It is
90 deg at 7kHz.

NOTE: This option isn't effective when Six-Waves output mode is selected (-6ch).



-n BOOL
-------

Default: false

This selects if the decoder should use dialog normalization reduction. The
normal dialogue level in a program is defined a reference of loudness, 0db.
The BSI info variable "dialogue level" informs how much this dialogue level
is under 0db full-scale (FS) - or how much headroom there is above the
dialogue level before clip.

One of Dolby's intentions with this variable is to ensure that all dialogue
levels are played back with the same volume, regardless of the program's
amount of headroom. It is good to have when the movie you're looking at is
interrupted by a commercial break, where the headroom varies enormously.
(It prevents blowing your ears off when the break comes.)

This feature is implemented by attenuate everything such that all programs
have 31 db headroom, regardless of its original headroom. For a typical
-27db headroom program, this will case a -4db gain.



-about
------

This will print legal & copyright information regarding azid.dll .


Prodater64 11-03-2004 03:13 PM

Quote:

Originally Posted by Boulder
Is there any program that would give any detailed information about the ac3 file? It might be useful to know what level the dialog normalization and dynamic range compression are set. Also the different mix parameters are unknown with ac3enc.

http://mediainfo.sourceforge.net/

I don't know how much detailed it information is.

Boulder 11-03-2004 03:31 PM

Inc,

I know those azid parameters, but doesn't the ac3 stream itself also contain the DRC and dialnorm settings (not to mention the BSI section which seems to be very important)? At least you can set those two in SoftEncode.

incredible 11-04-2004 04:49 AM

I think thats the point of that "free" ac3enc that you cant tweak those settings as it "could" be that the internal routines of ac3enc do implementate these factor as default and for this using internal default values? It could be? Im not really shure.

incredible 11-04-2004 02:15 PM

@ Phil ...

could you "try" this commandline via bat file for reencoding an ac3:
Code:

"C:\PATH_TO_BeSweet.exe" -core( -input "X:\PATH_TO_YOUR_INPUT.ac3" -output "X:\PATH_TO_YOUR_OUTPUT.ac3"  ) -azid( -g max) -ota( -hybridgain ) -ac3enc( -b 384 -6ch )
I tried that one on 3 original AC3s and it didnt ended up in "that" less volume like you mentioned, ok just a minimal bit more silent, but ok.

In case of overflows ...:
Quote:

Originally Posted by Azid doc.
Decoding overflow
-----------------

When decoding 1 on 1 (2ch AC3 to 2 channel output and 6ch AC3 to 6
channel output, etc.), small overflows can be observed from time to
time when not using any dynamic compression. This is a normal because
of the way AC3 works. Quote from the AC3 specification (p.93
1.paragraph):

"... Since the output signal consists of the original signal plus
coding error, it is possible for the output signal to exceed 100%
level even though the original input signal was less than or equal to
100% level."

When a downmix overflow is encountered, the output signal will be
saturated to 0dB FS to prevent overflow (wrap around).

Shure there are some very loud AC3s out there which you cant backup in their volume, but these would cause in mega overflows if kept at their db values .... KillBILL gots peaks in its original of 3.5db!! As told by AZID.exe!

Latest Besweet files where taken for the workouts above.

incredible 11-04-2004 02:27 PM

@ Boulder ...

for parsing out AC3 related informations, do get azid.exe from here ...
http://www.digital-digest.com/dvd/downloads/azid.html

and use this commandline in a bat file:
Code:

azid.exe -N -Q -z off "X:\PATH_TO_THE.ac3"
pause

looks informative! Seems its what you're looking for.


Just interesting .... :

when parsing a) an orig ac3 and b) a reencoded ac3 using directly besweetGUIs parameters with a bad volume bug ... these are the results:

a) orig one:

Code:

[00:00:00.000] +------------------------------+
[00:00:00.000] |                              |
[00:00:00.000] |  AC-3 DECODER CORE          |
[00:00:00.000] |  v1.9 (b922)                |
[00:00:00.000] |                              |
[00:00:00.000] |  (C) 1997-2003 By Midas      |
[00:00:00.000] |  <midas@egon.gyaloglo.hu>    |
[00:00:00.000] +------------------------------+
[00:00:00.000] +------ BSI -----
[00:00:00.000] |  Bitrate: 384 kbit (48 kHz)
[00:00:00.000] |  Mode: Complete Main (CM)
[00:00:00.000] |  Audio mode: 3/2  L,C,R,SL,SR+LFE
[00:00:00.000] |  Center mix level: -3.0dB
[00:00:00.000] |  Surround mix level: -3.0dB
[00:00:00.000] |  Dialogue level: -27dB
[00:00:00.000] |  Mixlevel: 105dB SPL
[00:00:00.000] |  Roomtype: Large room, X curve monitor
[00:00:00.000] |  Stream: Copyright protected, Original stream
[00:00:00.000] +----------------


b) a reencoded one (with NOTICABLE less volume)

Code:

[00:00:00.000] +------------------------------+
[00:00:00.000] |                              |
[00:00:00.000] |  AC-3 DECODER CORE          |
[00:00:00.000] |  v1.9 (b922)                |
[00:00:00.000] |                              |
[00:00:00.000] |  (C) 1997-2003 By Midas      |
[00:00:00.000] |  <midas@egon.gyaloglo.hu>    |
[00:00:00.000] +------------------------------+
[00:00:00.000] +------ BSI -----
[00:00:00.000] |  Bitrate: 256 kbit (48 kHz)
[00:00:00.000] |  Mode: Complete Main (CM)
[00:00:00.000] |  Audio mode: 3/2  L,C,R,SL,SR+LFE
[00:00:00.000] |  Center mix level: -4.5dB
[00:00:00.000] |  Surround mix level: -6.0dB
[00:00:00.000] |  Dialogue level: -31dB
[00:00:00.000] |  Stream: Original stream
[00:00:00.000] +----------------

NO mixlevel etc. on the BSI of the reencoded one and less db's seen in a whole!

So I dont know ... could it be that a ac3decoding unit (or also ac3filter etc.) does readout the BSI Infos from an ac3 and therefore such low "flags" do cause a lower volume playback BY THE PLAYBACK UNIT where the audio stream data itself is full ok?????

Hmmmm ...

Boulder 11-05-2004 04:58 AM

I had similar results:

Code:

Original

[00:00:00.000] +------------------------------+
[00:00:00.000] |                              |
[00:00:00.000] |  AC-3 DECODER CORE          |
[00:00:00.000] |  v1.9 (b922)                |
[00:00:00.000] |  for Intel Pentium 4        |
[00:00:00.000] |                              |
[00:00:00.000] |  (C) 1997-2003 By Midas      |
[00:00:00.000] |  <midas@egon.gyaloglo.hu>    |
[00:00:00.000] +------------------------------+
[00:00:00.000] +------ BSI -----
[00:00:00.000] |  Bitrate: 448 kbit (48 kHz)
[00:00:00.000] |  Mode: Complete Main (CM)
[00:00:00.000] |  Audio mode: 3/2  L,C,R,SL,SR+LFE
[00:00:00.000] |  Center mix level: -3.0dB
[00:00:00.000] |  Surround mix level: -3.0dB
[00:00:00.000] |  Dialogue level: -27dB
[00:00:00.000] |  Stream: Copyright protected, Original stream
[00:00:00.000] +----------------

Code:

BeSweet

[00:00:00.000] +------------------------------+
[00:00:00.000] |                              |
[00:00:00.000] |  AC-3 DECODER CORE          |
[00:00:00.000] |  v1.9 (b922)                |
[00:00:00.000] |  for Intel Pentium 4        |
[00:00:00.000] |                              |
[00:00:00.000] |  (C) 1997-2003 By Midas      |
[00:00:00.000] |  <midas@egon.gyaloglo.hu>    |
[00:00:00.000] +------------------------------+
[00:00:00.000] +------ BSI -----
[00:00:00.000] |  Bitrate: 448 kbit (48 kHz)
[00:00:00.000] |  Mode: Complete Main (CM)
[00:00:00.000] |  Audio mode: 3/2  L,C,R,SL,SR+LFE
[00:00:00.000] |  Center mix level: -4.5dB
[00:00:00.000] |  Surround mix level: -6.0dB
[00:00:00.000] |  Dialogue level: -31dB
[00:00:00.000] |  Stream: Original stream
[00:00:00.000] +----------------

The BeSweet one is more silent, I used --maximize in the azid section.

The funny thing is that when I decode the original AC3 track into six mono wave files, I get downmix overflows so the audio is too high and thus the gain is actually zero! And this might be the reason why the BeSweet encoded AC3 is also more silent than the original one as the same happened when I encoded directly from AC3 to AC3.

The gain for this track was about 5.5dB when I downmixed to a stereo WAV..and I feel that this 5.5dB was the amount missing from the BeSweet encoded AC3. The track was not ultra silent, but as the 5.1 tracks usually need a gain of more than 10dB, I wouldn't be surprised if they sounded very silent when re-encoded without any gain.

When the original AC3 track was encoded to a 2ch AC3 track in BeSweet, there were no downmix overflows whatsoever.

If anyone's up to the task,

1) decode an AC3 track to six mono channels without any gain added
2) open them in an audio editor, determine the lowest gain needed from the six tracks,
3) use that value for amplifying every track
4) feed these six tracks to BeSweet (it should work via an .lst file, right?)
5) encode to a 5.1 AC3 track
6) check the volume.

I don't have the time right now..I've got to clean the whole apartment :roll: Unemployment sucks :x

incredible 11-05-2004 05:27 AM

Quote:

Originally Posted by Boulder
The funny thing is that when I decode the original AC3 track into six mono wave files, I get downmix overflows so the audio is too high and thus the gain is actually zero! And this might be the reason why the BeSweet encoded AC3 is also more silent than the original one as the same happened when I encoded directly from AC3 to AC3.

Exactly!
And thats why I again added that quote related to downmix overflows.
To mee it "seems" clear that a 1:1 reencode from 5.1 to 2.0 would mean overflows as you by this would just mix orig separated volumes together and that wuld be the mess. So thats why a correct downmixing incl. dynCompression solves that, thats why AC3 2.0 dwonmixed ones do result better.

Now as we do a 1:1 port of 6 channels to an again 6ch Ac3 encode, we shouldnt worry about that (as explained in the quote from azid.exe)

I did many tests yesterday on a very loud orig AC3 from KillBill1, the one which peaks in its center channel up to 3.5db!! in original state1 *wow*
And that orig volume is very difficult to keep when using azid/ac3enc.

So I eneded up to now with the line I quoted above:
Code:

"C:\PATH_TO_BeSweet.exe" -core( -input "X:\PATH_TO_YOUR_INPUT.ac3" -output "X:\PATH_TO_YOUR_OUTPUT.ac3"* ) -azid( -g max) -ota( -hybridgain ) -ac3enc( -b 384 -6ch )
(dont use BesweetGUI! Use that line above in a .bat file)

The volume resulted up to the same level in the re-encode! (a minimal less, almost not noticable)
It "could" be that the "hybridgain" does add a value or changes the value of a flag to the reencoded ac3??? I dont know.

I dint recognised any distrotions in the duplicated center 3.5db parts, but I'll make a comparison in a waveform previewer this Weekend.

Quote:

2) open them in an audio editor, determine the lowest gain needed from the six tracks,
3) use that value for amplifying every track
Thats the same like done in azids -g max or --maximize as it looks for the needed amplification needed to get a 0db peak (the same you suggested via an extern. audio editor) ... then the ac3 will be encoded with that "lowered" to 0db 6ch stream.

The point is that for instance the KillBill ac3 comes with peaks up to 3.5db! and that means no matter whats used for a 0db max changing :arrow: a pre-processing from 3.5db to 0db does end up more silent :wink: :wink:

So we should try to a) keep the origs db peaks and doing a direct 1:1 volume copy to the reencode (with overflows). Or doing that reencoding using the line above with "... azid( -g max) -ota( -hybridgain ) ..." ... testing testing testing :)

GFR 11-05-2004 08:21 AM

Quote:

Originally Posted by incredible

b) a reencoded one (with NOTICABLE less volume)

Code:

[00:00:00.000] +------------------------------+
[00:00:00.000] |                              |
[00:00:00.000] |  AC-3 DECODER CORE          |
[00:00:00.000] |  v1.9 (b922)                |
[00:00:00.000] |                              |
[00:00:00.000] |  (C) 1997-2003 By Midas      |
[00:00:00.000] |  <midas@egon.gyaloglo.hu>    |
[00:00:00.000] +------------------------------+
[00:00:00.000] +------ BSI -----
[00:00:00.000] |  Bitrate: 256 kbit (48 kHz)
[00:00:00.000] |  Mode: Complete Main (CM)
[00:00:00.000] |  Audio mode: 3/2  L,C,R,SL,SR+LFE
[00:00:00.000] |  Center mix level: -4.5dB
[00:00:00.000] |  Surround mix level: -6.0dB
[00:00:00.000] |  Dialogue level: -31dB
[00:00:00.000] |  Stream: Original stream
[00:00:00.000] +----------------

NO mixlevel etc. on the BSI of the reencoded one and less db's seen in a whole!

So I dont know ... could it be that a ac3decoding unit (or also ac3filter etc.) does readout the BSI Infos from an ac3 and therefore such low "flags" do cause a lower volume playback BY THE PLAYBACK UNIT where the audio stream data itself is full ok?????

Inc,

Some reading :) :

http://forum.doom9.org/showthread.ph...threadid=56020

http://www.dolby.com/pro/digaudio/pa...tandards.S.pdf

http://www.dolby.com/tech/L.mn.0002.DDPEG1.pdf

If I did understand it, the stream itself is OK but some metadata is added to tell the decoder how much to attenuate, how much to compress, the mix level of each channel etc., as you suspected.

The Dialog Normalization works as follows (as I understood it):

You want the stream to be normalized so that you use full scale at the highest peak and you have better S/N. That's what the -azid( -g max) -ota( -hybridgain ) does.

But, if you do this for a couple of movies, you notice some movies will seem louder and some will seem quieter, because you normalized the loudest peak of the movies, not the average level.

The idea of Dialog Normalization is to correct this so that you shouldn't need to tweak the volume knob in your amp everytime you change a disc.

There's a specified target of -31dB (relative to full scale) for dialogs. This means you want the dialogs for every movie to be -31dB. If you're dealing with music, then passages that should have the same loudness as a dialog should be at -31 dB.

So in the studio they pick the maximized wav and measure the loudness of a dialog. Let's say it's -27dB. When encoding to ac3 they set the dialnorm to -27dB.

That's louder than the target (-27dB is 4 dB above -31dB) so the decoder will attenuate it by 4dB so that the dialogs will sound at -31dB.

If you want the ac3 to sound as loud as the input wav, you have to set the dialnorm to -31 dB, so that the decoder will not need to attenuate anything.

If it is like this, then one could tweak the loudness, surround levels etc. of an ac3 file by just editing the metadata, like mp3gain does for mp3. That would be an useful application :) Ac3_patch or something like that.

When transcoding an ac3 you could try the following: in azid, use the command line switches to override BSI info and decode all channels to "full range" wavs. Then apply the necessary gain/attenuation to each channel so that the fixed BSI in ac3enc.dll are compensated and the end result matches the original file. This could be problably automated in a batch file or gui.

Anerboda 11-05-2004 07:56 PM

Inc wrote:
Code:

Code:
"C:\PATH_TO_BeSweet.exe" -core( -input "X:\PATH_TO_YOUR_INPUT.ac3" -output "X:\PATH_TO_YOUR_OUTPUT.ac3"  ) -azid( -g max) -ota( -hybridgain ) -ac3enc( -b 384 -6ch )

I've tried this and it ended with a 5.1.ac3 that was lower in volume than the original. This is only tested on the PC, not in a SAP, but should be the same difference...? I can't reproduce your results Inc, I'm sorry to say :(
But using Softencode the volume is the same as the original.

-Anerboda

incredible 11-08-2004 03:07 AM

@ GFR

Thanks for that very informative Post. :)

In Azid you only can override BSI Informations when decoding to 2/x channels, means IF a downmixing process is choosen.

I noticed the following:

When decoding an AC3, some DVDs got AC3s which do exceed a lot the 0db mark! Like mentioned above in case of KillBill where the center peaks up to 3.5db! So no matter if -g max in azid used or a normalize to 100% (=0db) in an external Audio Utility, the volume by this will be decreased anyway.

So, to keep the orig volume we should also try to rise the gain, even over the 0db mark, as 3db seems still non distorting.

Dialhot 11-08-2004 04:30 AM

Quote:

Originally Posted by incredible
So, to keep the orig volume we should also try to rise the gain, even over the 0db mark, as 3db seems still non distorting.

Not really a solution for me ears. Don't forget that gain is also added on the receiver to adapt to the speaker configuration. In my case, center channel is already to +3db. As you say, there is no distort but... +3db +3db = +6db. And THEN the distortion can be heard on certain scenes.

I didn't have the time this we to do some encodign test, but encoding at +3db is not really a solution.

incredible 11-08-2004 05:09 AM

Well actually I recognised that some DVDs got in their orig state peaks up to 4db. So these ones you also "would" overgaining if you see it like that ;-)

But your amplifier does not gain the volume when increasing the gain ;-)
Theres a constant amplifiying from in to out and you do only do set the input level from your sound input according to the channels.

Thats the same if youre using a PA Mosfet-amplifier as there also you only adjust the input-levels of what will be amplified.

So a problem would be: If your source coding ends up in a distortion, then shurely hearing loud a distotioned source it will sound even more horrible.
(Remember these Gabba-Techno-200bpm Hardcore songs? There they did apply to that RolandTR909 Kickdrum a distortion effect so it sounds more brutal, but WONT harm to your speakers.

BUT!: Even if you got a mega-clean excellent mastered Sound input like from an orig CD and you force the increasing of the "input adjust" (= Volume on your Amp.) too much, then the internal technical compounts cant actually handle that input and "clipping" will be the result.
That kind of clipping "could" exist even before your ears can recognise it. So In case of clipping the sound weave change from DC to AC (I hope I dont mix it up now). The technical compounts by that of your speakers will do heat up and finally your speakers are dead if you force the "clipping" to much and too long.

So thats why its even better for speakers IF your amp gots more power than the speaker itself, as by that the amp gots more reserves to void "technical" clipping ;-)

GFR 11-08-2004 05:50 AM

Quote:

Originally Posted by incredible
@ GFR

I noticed the following:

When decoding an AC3, some DVDs got AC3s which do exceed a lot the 0db mark! Like mentioned above in case of KillBill where the center peaks up to 3.5db! So no matter if -g max in azid used or a normalize to 100% (=0db) in an external Audio Utility, the volume by this will be decreased anyway.

I think this +3.5dB comes when you feed a maximized wav to the encoder, and the encoder will then quantize in the frequency domain. When you decode it back to time domain overshoots can occur. The same thing happens with MP3 (see the MP3Gain software). Since the metadata in the BSI is telling the decoder to attenuate a few dB, the decoder can be implemented in such a way that it won't clip.

Also, if 0dB is a full scale sinusoid, then +3.5dB doesn't mean it goes over full scale (it can't, of course :) - digtal clips hard, it's not a soft saturation like a tape recorder). It's just that the waveform is more "busy" than a sine wave. For example, a full scale square wave will be over 0dB if a full scale sine is 0dB.

Dialhot 11-08-2004 06:12 AM

Quote:

Originally Posted by incredible
too much, then the internal technical compounts cant actually handle that input and "clipping" will be the result.

For me clipping equals distortion. Else, what is the distortion definition according to you ?

Quote:

That kind of clipping "could" exist even before your ears can recognise it.
Yes it is. And if you encode at +3db you already have clipping that you do not notice and that is this "clipped" curve that you give to your amp, that will "clip" it more and then the distortion will be heard. That's why I told that "+3db +3db = +6db" even if this has no real "mathematical" meanings.

Quote:

So In case of clipping the sound weave change from DC to AC (I hope I dont mix it up now). The technical compounts by that of your speakers will do heat up and finally your speakers are dead if you force the "clipping" to much and too long.
Don't worry, all my Home Theater installation is far well protected against this ;-)

kwag 11-08-2004 11:36 AM

Just a little note on decibels.
Remember that a change of +3DB, is twice the volume level.
And the same for negative values. A change of -3DB is exactly half the volume level.


Correction:
A change of +6DB, is twice the volume level

-kwag

GFR 11-08-2004 12:35 PM

No,

+3dB is twice the POWER level.

Twice the volume (loudness) level is a couple more dBs (something between +6dB to +10dB).

kwag 11-08-2004 07:11 PM

Quote:

Originally Posted by GFR
No,

+3dB is twice the POWER level.

Yes, indeed :!:
I should have said +6db in volume level :)
Quote:


Twice the volume (loudness) level is a couple more dBs (something between +6dB to +10dB).
It's exactly 6db change for volume level, and 3db change for power level ;)

-kwag

jeo 11-14-2004 02:43 AM

Quote:

Originally Posted by jorel
AC3-5.1 give good volume ONLY in dolby surround receiver cos that receivers have 5 or 6(depend of the model) separeted amplifiers for EACH channel.
then using the same dolby surround as stereo and as 5.1 decoder, ALWAYS the 5.1 have better volume cos in stereo only 2 of the reminders is working.
i really will that everybody understand what i wrote thousands times:
in stereo,we have 2 channels working with the whole signal but in
dolby surround we have MORE 4 speakers working
:arrow: using the same source ac3-5.1 and the SAME volume.

my hobby is audio for 44 years and my work is eletronic for 32 years.
i know what i posted and IF someone do tests following exactly what i wrote,will see ..or better, listen the strong differences in quality and in the volume.
if nobody understood what i wrote....the only way is....a single calculator show that 1 source for 2 targets give less power that for 6 targets...
is so hard to understand?...i can' t trust!

example:
2 * 10 Watts always give less potence that 6 * 10 Watts
using the same source and the same volume for 2 or 6 channels...
if nobody understood....excuse me..i'm really sorry!

ac3 5-1 when you encode to mp2 or stereo loose lots of details....do tests putting and removing the surround.....in ac3 they increase...in stereo they sometimes loose no matter if you're using besweet,headac3.....etc.
only tests can show and proove for you, not my poor english!
:wink:

agree!

http://www.audioholics.com/techtips/...iverpower2.php
http://www.audioholics.com/techtips/...iverpower3.php
http://www.audioholics.com/techtips/...eiverpower.php
http://www.audioholics.com/techtips/...nelsdriven.php

read too: "No Subwoofer Output in 2-Channel Mode"
http://www.audioholics.com/techtips/...tin2channe.php

Dialhot 11-14-2004 04:57 PM

Quote:

Originally Posted by jeo
agree!

May I ask you to read completly a thread before to start to answer to it ?
We (I) already said to Jorel that, even if true, this has nothing to do with the current problem.

We are dealing here with volume loss during 5.1 -> 5.1 process with ac3enc based encoder.

jeo 11-14-2004 05:24 PM

of course... :oops:
sorry and excuse me Dialhot!
as was posted about that i only agree and post some informatives links that show the same.

Quote:

Originally Posted by Dialhot
We are dealing here with volume loss during 5.1 -> 5.1 process with ac3enc based encoder.

right, i saw that too cos i read all and this thread is very impressive.

Dialhot 12-30-2004 11:26 AM

I found the solution !

It was the only thing I never tried : the Postgain :!:
Hybrigain screw too much the dynamic so just forget it.

Do not use AC3Machine, use BesweetGui. In AC3 panel select "do 5.1 AC3". This select automatically the parameters " -azid( -g 0.95 -L -3db )". I would like to not have the "-L" but it's not very important. The gain to 95% is good as it prevents to have distort on peaks.
Go then on main tab and select "Postgain 100%" (that's add "-ota(-G 1)".

I did only one try, so let me know if you suffer some problems I didn't heard.

Prodater64 12-30-2004 11:49 AM

Quote:

Originally Posted by Dialhot
I would like to not have the "-L" but it's not very important.

You can get rid of that parameter in AZID1 options.
Just uncheck LFE to LR Channels checkbox.

http://www.digitalfaq.com/archives/error.gif

Dialhot 12-30-2004 11:57 AM

Quote:

Originally Posted by Prodater64
You can get rid of that parameter in AZID1 options.
Just uncheck LFE to LR Channels checkbox.

Pro, try.. and then you'll remove your post ;-)

Boulder 12-30-2004 12:02 PM

If you check the surround mix mode, then the LFE option won't appear when you leave the Azid settings. It shouldn't matter what the surround settings are as they are meant for downmixing to two channels. I suppose that's just a bug and not intentional.

EDIT: Hmm, it only reappears if no options are enabled in Azid. Phil, what happens on your system?

Dialhot 12-30-2004 12:08 PM

Quote:

Originally Posted by Boulder
EDIT: Hmm, it only reappears if no options are enabled in Azid. Phil, what happens on your system?

The same :-). You're right : if something else is selected (as a downmixing mode), then the "-L" does not reappears once I leave the azid1 tab :-D

Thank you.

(you can let your post Luis :lol:)

Prodater64 12-30-2004 12:21 PM

:D

rds_correia 06-05-2005 04:43 PM

Hi Phil and guys,
This is what I've used.
I take it that this is what you were talking about, right Phil?
Code:

BeSweet.exe -core( -input "E:\MATRIX_I\AC3\matrix_i AC3 T01 3_2ch 384Kbps DELAY -23ms.ac3" -output "E:\MATRIX_I\AC3\matrix_i AC3 T01 3_2ch 384Kbps DELAY -23ms-new.ac3" -logfile "E:\MATRIX_I\AC3\matrix_i AC3 T01 3_2ch 384Kbps DELAY -23ms.log" ) -azid( -g 0.95 ) -ota( -d -23 -G 1 ) -ac3enc( -b 224 -6ch )
Do notice that I didn't include the -L -3db on the azid parameter like you pointed out.
I don't even know what those do but since I'm only searching to kill the low volume and I have a feeling that those won't do much about my problem...
I'll post the results in a minute after besweet finishes.
Cheers

rds_correia 06-05-2005 05:35 PM

Nope, no luck here.
Still much lower than the original though somewhat better than my previous trials.
I don't have Cooledit or softencode.
Can't buy them and I can't understand how DSPguru doesn't try to fix this damn thing...
I know it's not directly BeSweet related.
But it gets in the way of BeSweet when it tries to transcode 5.1 material.
If he understands the problem and he knows his coding then he could have done something already.
Or at least put the pressure on the FFmpeg guys...
Any more ideas?

@Zyphon,
How about your packshot transcodings?
Do they get exactly the same volume as the original ac3-5.1?

Cheers

Dialhot 06-05-2005 06:21 PM

Rui,
You missed something into your line. I told to use the postgain. YOu should have a "-ota(G 1)" in your command line. Without this you can't have a correct result.

Note : -L sends the .1 to the front channel and on the subwoofer. You don't have normal 5.1 (the bass are louder than original).

rds_correia 06-05-2005 06:35 PM

Hi Phil :),
But I do.
Check my post again.
There is -ota( -d -23 -G 1 ).
Isn't that what you advised?
It just has a -d -23 because of the ac3 track delay.
Cheers


All times are GMT -5. The time now is 04:36 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.