Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd January 2016, 13:10   #13821  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,648
Quote:
Originally Posted by osso123 View Post
I uploaded a better example of a 5.1 DTS real-life file and the converted ac3 file.
Seems there are something wrong in your real-life DTS.
I don't know the encoder used to create this DTS, but is it than have high frequency harmonics and not the AC3. See attached image.

Maybe sound better for you, but the AC3 encoder do the job like expected:
filtering high frecuencies before encode.
Attached Images
 
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 23rd January 2016, 14:37   #13822  |  Link
osso123
Registered User
 
Join Date: Sep 2014
Location: Europa
Posts: 5
Quote:
Originally Posted by tebasuna51 View Post
Seems there are something wrong in your real-life DTS.
Or maybe you named the files wrong? Please look at this video capture I just did:
https://youtu.be/2gHP_SOZS6Y

If you have a mediaplayer that can remap/mute audio inputchannels separately - like MPC (mediaplayerclassic) - you could also just have it mute all but the LFE channel and listen to it that way. The high pitch frequencies in the ac3 are hearable from far away. So its no visual bug in Audacity or something of that sort.

P.S. btw, my spectrogram windows-size in audacity is set to 4096.

Last edited by osso123; 23rd January 2016 at 14:44.
osso123 is offline   Reply With Quote
Old 23rd January 2016, 18:40   #13823  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,648
Quote:
Originally Posted by osso123 View Post
Or maybe you named the files wrong?
I only renamed the ac3 (osso) because I make other encodes to AC3 (with Aften and ffmpeg) with the same result.

The DTS remain with the same name downloaded (orig).

Maybe the problem is your Audacity decoders.
I decoded the compressed formats (out of Audacity) to wavs, and only load in Audacity decompressed wav files.

I decoded the DTS with eac3to using libdcadec and ArcSoft and both show the same problem. The AC3 decoded with eac3to libav.

Try using that method because your DTS spectrogram seems limited to 300 Hz, but mine go until 3000 Hz and more, and I don't see problems with AC3 spectrogram (like you show in video) also until 3000 Hz.

EDIT:
Using my Audacity decoders (ffmpeg-win-2.2.2), both spectrograms go until 3000 Hz but seems fine:
The DTS don't have high harmonics and the AC3 is equal to the DTS without the problems in your video.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.

Last edited by tebasuna51; 23rd January 2016 at 19:01. Reason: Add info
tebasuna51 is offline   Reply With Quote
Old 23rd January 2016, 21:22   #13824  |  Link
an3k
Registered User
 
an3k's Avatar
 
Join Date: Oct 2006
Location: Munich, Germany
Posts: 169
Quote:
Originally Posted by hello_hello View Post
Lossy audio doesn't have a fixed bitdepth.
Bitrate = the number of samples per second. For lossless audio bitdepth = the range of values that can be assigned to any one of those samples. For 8 bit it's 256, for 16 bit it's 65,536 and for 24 bit it's 16,777,216.
Oh, I thought (for lossless audio) kHz defines how much samples per second are taken and Bit depth how many values each sample stores. And I thought AC-3 would work like eg. x264 which keeps the bitrate low when there is no content to encode. So in short AC-3 is like MP3 CBR?!

Quote:
Originally Posted by hello_hello View Post
I'd assume because the DTS-HD audio is lossless the bitdepth is known. For your example it was originally 16 bit, it was encoded at 16 bit, and eac3to decoded it as 16 bit and fed that to the AC3 encoder. DTS-HD supports 24 bit lossless, but it appears you have 16 bit DTS-HD.
I have other files. Some with 24-Bit DTS-HD and 16-Bit DTS Core, some with 16-Bit DTS-HD and 24-Bit Core and last but not least 16-Bit/16-Bit as well as 24-Bit/24-Bit. I just re-checked with MediaInfo and even for (lossy) DTS I get a Bitdepth shown.

Quote:
Originally Posted by hello_hello View Post
It's kind of like converting a 16 bit wave file to a 16 bit flac file and then back to a 16 bit wave file again. Nothing is lost, and in your first example you've effectively converted that second wave file to AC3.

Lossy audio can be decoded to any fixed bitdepth. The greater the bitdepth, the more accurately it can be decoded. eac3to decodes the lossy DTS core, which has no fixed bitdepth, to a fixed bitdepth of 24 bits.
It's kind of like converting a 16 bit wave file to an MP3 and then decoding the MP3 to a 24 bit wave file. What was lost during the MP3 conversion is gone forever despite the output bitdepth being greater.
Yeah, that is the part I already knew. I ripped my Audio-CDs with the Fraunhofer MP3 codec when it was leaked back then and still do some re-encodings today from CD to FLAC. Also read (and understood = the important part ) https://www.highresaudio.com/texte.php?ca_id=92

One last question: In http://forum.doom9.org/showthread.php?t=27131 I read that based on the bitrate AC-3 limits the available frequency range, eg. 256 kbps up to 12 kHz, 384 kbps up to 18 kHz and 448 kbps or higher with full 20 kHz. Is that true? I thought that a 2 channel 224 kbps AC-3 has a better quality per channel than a 6 channel 640 kbps AC-3. Maybe I should just go with 640 regardless of the amount of channels?
an3k is offline   Reply With Quote
Old 23rd January 2016, 23:51   #13825  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,648
Quote:
Originally Posted by an3k View Post
So in short AC-3 is like MP3 CBR?!
More or less, yes.

Quote:
I have other files. Some with 24-Bit DTS-HD and 16-Bit DTS Core, some with 16-Bit DTS-HD and 24-Bit Core and last but not least 16-Bit/16-Bit as well as 24-Bit/24-Bit. I just re-checked with MediaInfo and even for (lossy) DTS I get a Bitdepth shown.
Lossy DTS (Core) don't have bitdepth, and MediaInfo is wrong when show that info (and others infos).

Quote:
I read that based on the bitrate AC-3 limits the available frequency range, eg. 256 kbps up to 12 kHz, 384 kbps up to 18 kHz and 448 kbps or higher with full 20 kHz. Is that true?
Is a encoder option, but is recommended for 5.1.

For 2.0: 112 Kb/s up to 12.4 KHz, 160 Kb/s up to 15.8 KHz, 192 Kb/s or higer up to 20.3 KHz
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 24th January 2016, 22:02   #13826  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,943
In general, without auxiliary specifications, you can use AC3 in VBR mode too (I believe Aften supported that). But there are consumer media specifications (e.g. "DVD Video") which require CBR audio streams. AC3 can, but is not allowed to under certain circumstances.

For audio formats with a good "channel coupling" (known as "Mid/Side" encoding for MP3 which supports stereo at most, but it can be handled in a similar way for more channels too), there is a theorem that the bitrate shall be in relation to the square root of the number of full frequency channels to achieve similar quality. It usually works quite well for AC3, comparing a 2.0 bitrate as √2 times a theoretical base mono bitrate with a 5.1 bitrate as √5 times the same theoretical base mono bitrate. Depending on the content.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 25th January 2016, 11:06   #13827  |  Link
an3k
Registered User
 
an3k's Avatar
 
Join Date: Oct 2006
Location: Munich, Germany
Posts: 169
Thank you very much both of you for your time explaining that stuff

Quote:
Originally Posted by tebasuna51 View Post
More or less, yes.

Lossy DTS (Core) don't have bitdepth, and MediaInfo is wrong when show that info (and others infos).
Jeez, I thought that at least this tool does it right. I used GSpot some years ago and was told it shows wrong information and that I should use MediaInfo instead. Is there a tool that shows the information correctly?

Quote:
Originally Posted by tebasuna51 View Post
Is a encoder option, but is recommended for 5.1.

For 2.0: 112 Kb/s up to 12.4 KHz, 160 Kb/s up to 15.8 KHz, 192 Kb/s or higer up to 20.3 KHz
Overall bitrate I guess!?!

I found



but to be honest I didn't understood much. So to be on the "save side" (=no frequency limiting) one should use at least 448 kbps for 5.1 or 192 kbps for 2.0?!? For 4.0 do I just have to double the bitrate of 2.0 and for mono just halve it?

Quote:
Originally Posted by LigH View Post
In general, without auxiliary specifications, you can use AC3 in VBR mode too (I believe Aften supported that). But there are consumer media specifications (e.g. "DVD Video") which require CBR audio streams. AC3 can, but is not allowed to under certain circumstances.
Good to know VBR is possible. But that would not increase quality but only create smaller files because AC-3 is limited to 640 kbps and even VBR will not exceed this?!

Quote:
Originally Posted by LigH View Post
For audio formats with a good "channel coupling" (known as "Mid/Side" encoding for MP3 which supports stereo at most, but it can be handled in a similar way for more channels too), there is a theorem that the bitrate shall be in relation to the square root of the number of full frequency channels to achieve similar quality. It usually works quite well for AC3, comparing a 2.0 bitrate as √2 times a theoretical base mono bitrate with a 5.1 bitrate as √5 times the same theoretical base mono bitrate. Depending on the content.
I believe I think I understood this ... EDIT: After some testing I know I did not. English + mathematical terms aren't my hobby
an3k is offline   Reply With Quote
Old 25th January 2016, 11:31   #13828  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,943
It just means: To have 5.x sound as good as 2.0 at e.g. 224 kbps, you don't need 5/2 times the bitrate (224*5/2=560, next closest available block bitrate would be 576 kbps), but only about √5/√2 times as much (224*√5/√2~354 kbps, next closest available block bitrate would be 384 kbps). Well, channel coupling isn't really that good (the more channels, the more an accurate phase angle is important to avoid flanging effects). A 384 kbps discrete 5.1 AC3 sounds not certainly as good as a comparable 224 kbps ProLogic 2.0 AC3, better to have 448 kbps. And 640 kbps is even ... "generous", in comparison.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 25th January 2016, 13:28   #13829  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,648
Quote:
Originally Posted by an3k View Post
...I should use MediaInfo instead. Is there a tool that shows the information correctly?
MediaInfo is wrong when show:
Bit depth : 24 bits
The real info contained in the DTS header field is:
Source PCM Resolution : 24

That is, the bitdepth of the PCM source (WAV or equivalent) used to encode the DTS.

When encode, the PCM samples in time domain are converted to float samples in frequency domain, and someones are discarded in lossy encodes (by frecuency cutoff or low values) to fit in the bitrate assigned.

At this moment the bitdepth of the source have no meaning at all.

Even some encoders put always 24 in this header field, no mather the source was 16 bits.
Also eac3to, when extract DTS's, put always 24 in this field, thats force some decoders (than read this field) to output at least 24 bit.

For all that we need forget the bitdepth info of lossy encodes.
Only DTS have this info field, all other lossy encoders don't show that irrelevant info.

Quote:
So to be on the "save side" (=no frequency limiting) one should use at least 448 kbps for 5.1 or 192 kbps for 2.0?!?
Yep, but remember than high frequency limit is not the unique quality parameter.

Like I say before some samples in frequency domain must be discarded to fit in the bitrate, if aren't by frequency must be by low values and lose precission.

Quote:
Good to know VBR is possible.
Possible but not compatible with all players.

Before than try AC3 VBR I recommend AAC or MP3 VBR for 2.0
For 5.1 you can try AAC or E-AC3 (maybe a player than support AC3 VBR support also E-AC3 much better)
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 26th January 2016, 11:21   #13830  |  Link
an3k
Registered User
 
an3k's Avatar
 
Join Date: Oct 2006
Location: Munich, Germany
Posts: 169
Quote:
Originally Posted by LigH View Post
...
Quote:
Originally Posted by tebasuna51 View Post
...
Now I understand how it works. Thank you both very much for not letting me die stupid

One last quick question: Is there an easy way to strip the EX out of a "AC3 EX, 5.1 channels, 2:23:11, 640kbps, 48kHz" source? Currently I convert to WAV then back to AC3 and in that process (and only then) I get Reducing depth from 64 to 24 bits... (64 bit AC-3 file?! Interesting ) as well as Clipping detected, a 2nd pass will be necessary.
an3k is offline   Reply With Quote
Old 26th January 2016, 16:02   #13831  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,648
Quote:
Originally Posted by an3k View Post
Is there an easy way to strip the EX out of a "AC3 EX, 5.1 channels, 2:23:11, 640kbps, 48kHz" source?
The EX in AC3 is not related with next questions.

It say: "There are a Back Center channel mixed in surround channels"
Like DTS-ES 5.1 matrixed.

Quote:
I get Reducing depth from 64 to 24 bits...
The AC3 decoder output PCM samples 64 bits float, then is downconverted to 24 bits int because is enough precission for PCM from a lossy encode.

You can use the parameter -full to output the 64 bits float PCM.

Quote:
as well as Clipping detected, a 2nd pass will be necessary.
Sometimes the decoder output go over 0dB than can't be downconverted to 24 int without clip peaks.

You can use the parameter -no2ndpass to avoid the second pass.

Is, more or less, safe because peaks over 0dB can only be imperfections of lossy encoder/decoder. The original source can't have peaks over 0dB.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 30th January 2016, 14:25   #13832  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,171
The German (3D) BD of Inside Out (seamless branching) has a EAC3 7.1 stream with 896kbps and which has as embedded core stream AC3 5.1 with 512kbps. I want to extract just that ac3 core as it is without any reencoding. but when I do with the cmd "eac3to 1) X: C:\stream.ac3" (which should be the ac3 equivalent to extracting a DTS core from a DTS-HD MA track) then eac3to says decoding with libav/ffmpeg and encoding AC3 <640kbps> with libAften, so the stream gets indeed reencoded. same with the same cmd line and "-core" in addtion.

edit: Ive found the .ec3 -core information, but it would be nice if this could be documented within eac3to as well.

editē: why is it actually .ec3 -core here and not just .ac3 -core? that would make more sense compared to how it works with .dts
__________________
Laptop Acer Aspire V3-772g: i7-4202MQ, 8GB Ram, NVIDIA GTX 760M (+ Intel HD 4600), Windows 8.1 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64)

Last edited by Thunderbolt8; 30th January 2016 at 21:07.
Thunderbolt8 is offline   Reply With Quote
Old 31st January 2016, 17:24   #13833  |  Link
BigPines
Registered User
 
Join Date: Dec 2010
Posts: 121
Sadly, the PC I had eac3to perfectly set-up on and my backup drive were both destroyed in a single catastrophic event.

I am trying to put Humpty Dumpty back together and it is tough to say the least. I recall that years ago I spent days trying to get the perfect install of eac3to and all of it's dependencies but it has been so long, I can't recall everything necessary to get back there. This thread is so long now that I am having trouble finding up-to-date info on this. Could someone point me to the most relevant installation instructions for the best possible install of this wonderful tool and all it's dependencies? I am looking for which versions of the dependencies to use and how to install only what I need to make it work in the highest quality possible and nothing else. Thanks in advance!
BigPines is offline   Reply With Quote
Old 31st January 2016, 18:33   #13834  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,622
I think that what comes to decoding, currently you are fine with whatever is included in the eac3to package (apart from AAC decoding). Dcadec and libav will handle everything else except AAC, which apparently needs the Nero Directshow decoder.

What comes to encoding, I personally prefer to either decode to WAV and encode that in a separate encoder or pipe to the encoder directly.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 1st February 2016, 01:04   #13835  |  Link
BigPines
Registered User
 
Join Date: Dec 2010
Posts: 121
I only use the decoding. Looks like I need Nero for sure and probably ArcSoft too. Trying to get it going.
BigPines is offline   Reply With Quote
Old 1st February 2016, 04:45   #13836  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,622
You don't need ArcSoft at all, dcadec can handle everything it does.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 1st February 2016, 04:50   #13837  |  Link
BigPines
Registered User
 
Join Date: Dec 2010
Posts: 121
My understanding is Nero Lite will work but I have installed Nero Lite 7.11.10.0 and I still get the message that Nero Audio Decoder is not installed. I guess I'll try something else.

Last edited by BigPines; 1st February 2016 at 05:06.
BigPines is offline   Reply With Quote
Old 1st February 2016, 08:13   #13838  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 907
You could always pipe to QAAC. Something that still gets updates.
__________________
Win10 (x64) build 18362| GPU Caps Viewer 1.42.4.0
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
Intel Xeon X5660 @2.80GHz
Sparktank is offline   Reply With Quote
Old 1st February 2016, 19:44   #13839  |  Link
BigPines
Registered User
 
Join Date: Dec 2010
Posts: 121
I finally think I have eac3to going as best I can. I decided to get it going with as many features as possible since my prior install was fully functional. Again, my goal was to make as light an install as possible with the most features and the best components.

Seems like it has been a while since someone posted the steps for a complete install so I am posting this in the hopes it will save someone else some time. A couple of notes:

- I was unable to obtain Sonic Cinemaster Audio Decoder 4.3 so installation of that component is not covered below.
- I was unable to figure out how to register only the required library(s) for Haali Media Splitter so below describes a full install.
- I was unable to figure out how to register only the required library(s) for Nero so below describes a full install. I tried what is described in the following thread but I kept getting errors trying to regsvr32 the libraries so I gave up: http://forum.doom9.org/showthread.ph...97#post1396997
- I was unable to figure out how to register only the required library(s) for SurCode DTS Encoder so below describes a full install.

If someone wants to help make this better and has information on how I can accomplish any of the shortfalls listed above, I am interested.


Setting Up eac3to on Windows 7 x64:

1) Download the latest eac3to from here: http://madshi.net/eac3to.zip

The link is also in the first post at the beginning of this thread.

2) Copy the eac3to directory to "C:\Program Files (x86)\"

3) Copy the necessary ArcSoft DLLs into the eac3to directory.

If you need these dlls, checkactivate.dll comes from ArcSoft TotalMedia Theater 2.x. The rest of the files come from ArcSoft TotalMedia Theater 6.x. Install ArcSoft TotalMedia Theater 6.x and harvest the DLLs from here:

C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\MagCore.dll
C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\MagPCMac.dll
C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\MagUIEngine.dll
C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\MagUIInter.dll
C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\Codec\ASAudioHD.ax
C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\Codec\DtsDec.dll
C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\Codec\dtsdecoderdll.dll

Place the DLLs in the eac3to directory. Uninstall ArcSoft once you have the DLLs.

4) Run the following in the Command Prompt AS ADMINISTRATOR:

regsvr32.exe "C:\Program Files (x86)\eac3to\ASAudioHD.ax"

5) Copy neroAacEnc.exe into the eac3to directory.

If you need to get this, download free from: http://www.nero.com/eng/company/abou...-aac-codec.php. After unzipping, harvest the .exe from: \NeroAACCodec-1.5.1.zip\win32\neroAacEnc.exe

6) Install Haali Media Splitter. It can be downloaded free from: https://haali.su/mkv/

7) Install Surcode DVD Pro DTS Encoder v1.0.29

8) Install Nero 7.11.10.0 Micro/Lite

Go to Start->All Programs->Nero->Setup->Nero ProductSetup.

On the Left hand side click the Key icon which says License and enter the appropriate HD Audio serial numbers.
BigPines is offline   Reply With Quote
Old 1st February 2016, 19:51   #13840  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,394
Just because eac3to tells you that a component is missing doesn't mean it's required. The ArcSoft DTS decoder, for example, is essentially unneeded.
Snowknight26 is offline   Reply With Quote
Reply

Tags
eac3to

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.