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 22nd May 2018, 13:40   #14661  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,651
Mmh, thanks for the explanation but that's what I didn't want to read
It's strange because I cut an ac3 file in 2 parts (with mkvmerge), I modified the first (a few seconds), re-encoded it in ac3 and the silence appeared at the end.
Normally, mkvmerge can't cut in the middle of an AC3 frame, thus the new ac3 file should be as the first (a multiple of 1536 samples).
I will verify if I can add silence at the beginning (which would not be problematic in this case) to get a size being a multiple of 1536 samples.
Music Fan is offline   Reply With Quote
Old 22nd May 2018, 13:42   #14662  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,135
With AC3 we usually have 5ms encoder delay. It would fit your 27ms because 32ms-5ms = 27ms. So maybe remove 5ms in the beginning.

eac3to input.wav output.ac3 -5ms
sneaker_ger is offline   Reply With Quote
Old 22nd May 2018, 15:33   #14663  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,651
It's better, but there is still a 1ms silence at the end (and the same with -6ms). I will try it and see if I hear it.
Music Fan is offline   Reply With Quote
Old 22nd May 2018, 17:15   #14664  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,651
I don't hear anymore the gap with a 1ms silence.
But curiously, I had also tried to create a wav being a multiple of 1536 samples and eac3to still added a silence (a few ms) at the end.
Music Fan is offline   Reply With Quote
Old 28th May 2018, 20:01   #14665  |  Link
Megalith
Registered User
 
Join Date: Mar 2011
Posts: 96
By default, does eac3to convert .wav files to .w64 files? All of my demuxing programs seem to do this, but I've never run into an LPCM file on a Blu-ray that actually exceeded 4GB.
Megalith is offline   Reply With Quote
Old 28th May 2018, 20:12   #14666  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,669
No, you have to use .w64 as output format extension so eac3to knows you want it.

And I easily exceeded 4 GB decoding 5.1 audio to a 6 channel WAV from a DVD Video AC3 track; the other alternative eac3to offers is .wavs which creates mono WAV files per audio channel.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 28th May 2018 at 20:14.
LigH is offline   Reply With Quote
Old 29th May 2018, 10:32   #14667  |  Link
Yoshi
Registered User
 
Join Date: Apr 2014
Posts: 30
Quote:
Originally Posted by Sakura-chan View Post
Sorry if I'm beating a dead horse here...
Well if you already give the honor to quote 3 year old messages of mine which I have to re-read in order to remember what it was about again, then let's beat that poor little horse together as unfortunately, it seems that it still deserves it.

Quote:
Originally Posted by Sakura-chan View Post
But I'd want to be 101% doubt free. Is DTS-HD MA decoding (for all channels and bit depths) *really* lossless?
That I still wonder as well. Considering madshi's remark which had followed my posting at the time, I doubt it though:

Quote:
Originally Posted by madshi View Post
eac3to still cannot fully remove dialnorm from DTS-HD tracks, though, because doing so would require to rewrite the whole HD frame structure, including CRCs etc, which is very complicated.
If I should be wrong about this, everyone shall feel free to correct me but to my understanding, getting rid of dialog normalization is a fundamental requirement to have a technically lossless conversion so I am somewhat confused that this issue hasn't been brought to higher attention here as it would mean that the conversion of DTS-HD MA to let's say FLAC still isn't really lossless.

Of course it is most probably rather an academic issue as most (slightly) flawed conversions are audibly still transparent but then the question has to be valid why to care about lossless formats in the first place and not just stick to the cores (at least I wouldn't trust myself to stand a blind test in this life).

The only practical reason for me to even bother keeping the lossless stuff (taking psychological voodoo ambitions aside) is that interestingly (and almost ironically), many FLAC results turn out to be in fact smaller than their DTS core counterparts, at least when dithered down to 16 bit which technically isn't lossless anymore, either but on the other hand, any lower 8 bit from the studio master most probably contain nothing but noise there anyway.

In practice, even the best converters achieve around 20 bit performance at best, not to speak about the ears where 16 bit probably are already more than enough.


@madshi

In regard to that, just a thought about eac3to's dither function:

As I have noticed with a few series, sometimes their channels never reach at least 6dB, but let's say peak around -8 dBFS. Now if I convert the 24 bit DTS-HD MA source to 16 bit applying dither, since the peak of course remains the same, from my understanding I will effectively end up using only about 15 bits SNR wise (~ 6dB / bit).

Now most probably that doesn't matter at all as even only 13~14 bit sound damn good and are very quiet but I wonder if technically it wouldn't be the better approach to apply normalization during that dithering stage in order to make use of the full 16 bit. After all, isn't that exactly what all the mastering-in-24-bit-fuss despite having a 16 bit end-format is all about?
Yoshi is offline   Reply With Quote
Old 29th May 2018, 11:22   #14668  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,442
Quote:
Originally Posted by Yoshi View Post
If I should be wrong about this, everyone shall feel free to correct me but to my understanding, getting rid of dialog normalization is a fundamental requirement to have a technically lossless conversion so I am somewhat confused that this issue hasn't been brought to higher attention here as it would mean that the conversion of DTS-HD MA to let's say FLAC still isn't really lossless.
If you transcode audio to FLAC with eac3to using the new dcadec decoder, then it'll ignore dialnorm. What it cannot do is remove dialnorm from an encoded DTS-HD bitstream without decoding it.

Although one could argue that ignoring dialnorm is actually not a correct way to decode DTS-HD and the end-result would differ from what any commercial DTS-HD decoder would produce, and is therefor incorrect?
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 29th May 2018, 11:34   #14669  |  Link
Yoshi
Registered User
 
Join Date: Apr 2014
Posts: 30
Many thanks for your remarks, nevcairiel.

I just realized that I apparently haven't distinguished between the flag removal and the ignorance during decoding before then, good point.

However, that also raises some confusion because from what I've understood that dialog normalization is considered to be only critical during re-encoding processes because there it's irreversible. On the other hand, I don't see the unconditional necessity to remove the flag from the undecoded sources as then it will be decoded at some point in the future anyway to probably high bitdepth PCM within some AVR and then, any dialog normalization is just a loudness change which shouldn't affect the audio quality at all.

So eac3to states

"- can remove dialog normalization from AC3, E-AC3, DTS and TrueHD tracks"

Maybe it should also note something like this then in order to prevent confusion:

"- can ignore dialog normalization from AC3, E-AC3, DTS, DTS-HD MA, and TrueHD tracks during decoding"
Yoshi is offline   Reply With Quote
Old 29th May 2018, 13:55   #14670  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,416
Quote:
Originally Posted by Yoshi View Post
"- can remove dialog normalization from AC3, E-AC3, DTS and TrueHD tracks"
Thats remain true.

Quote:
"- can ignore dialog normalization from AC3, E-AC3, DTS, DTS-HD MA, and TrueHD tracks during decoding"
- When decode any Dialog Normalization in source is ignored unless you add the parameter -keepDialnorm
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 29th May 2018, 23:49   #14671  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 229
Is there is any reason why decoding DTS-HD MA or Dolby HD on a seamless-branching UHD BD to WAVs with eac3to would be problematic?
Richard1485 is offline   Reply With Quote
Old 30th May 2018, 15:26   #14672  |  Link
Yoshi
Registered User
 
Join Date: Apr 2014
Posts: 30
@tebasuna51

Thanks for your clarification. However, could you elaborate on having the dialog normalization removed without decoding it to PCM? From what I've learned now, as long as I use eac3to, it won't matter since the flag will be ignored anyway, right? However, unless I want to feed other programs or decoders with those encoded files, what is the essential purpose then of having it removed in the first place?

Isn't the approach to have the dialog normalization embedded just in case for playback purposes and ignoring it selectively whenever decoding it to PCM?

In other words - if I got this correctly, the only thing eac3to still cannot do is removing the dialog normalization info from a DTS-HD source while otherwise keeping it "as is", however decoding it will give us the PCM with dialog normalization ignored. What would be the purpose of having an altered DTS-HD file then with adjusted frames, CRC, etc. then?
Yoshi is offline   Reply With Quote
Old 31st May 2018, 00:42   #14673  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,416
The Dialog Normalization is a field in AC3 and DTS header (not used with other formats) than can force the decoders to attenuate the volume to obtain the same level between tracks...(in a ideal world).

Some decoders ca be forced to ignore the Dialog Normalization, but not others.

In AC3 header the field store a value between 0 and 31 (-31 dB), if is 27 (many times) the volume is attenuate 4 dB, if is 31 -> 0 dB (no attenuation).
Remove the Dialog Normalization is store 31 in this field to avoid attenuation. After that all decoders produce the same output (the source without attenuation).

In DTS header the field value is directly the value to attenuate, but is rarely used, between dozens of samples I only found one to force -4 dB, the rest are always 0.
I never see problems with DTS volume.

The problem is only when follow Dolby recomendations explained here: How To Properly Encode Dolby Digital Audio (AC3) because we obtain low volume compared with CD-Audio, TV commercials or other audio encoded with other formats (MP3, AAC, FLAC, ...).
The free AC3 encoders by default put 31 in Dialog Normalization to be comparable with other sources.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 31st May 2018, 12:52   #14674  |  Link
Yoshi
Registered User
 
Join Date: Apr 2014
Posts: 30
Many thanks again for your further explanation. However, in summary, even if the normalization isn't removed or ignored during conversion, the worst which will happen is the loss of a few dB of dynamic range / SNR depending on the setting of course. However, I'd rate that issue to be less severe than any dynamic range compression. Do you agree?

Something unrelated I just encountered and hopefully hasn't been discussed here already at length (searched the thread but couldn't find anything):

Given a 24 bit DTS-HD MA source which actually only contains 16 bit audio, eac3to gives me different results if using the parameter -down16 or not - which doesn't make any sense because if the actual bit depth is in fact 16 bit, then there is no need to apply dither just because I told so originally (as a user, at first I can't tell whether the 24 bit file really contains that amount of information or not). The resulting file without the -down16 option is smaller so probably eac3to unnecessarily and stubbornly applies dither here although it shouldn't.

Do I really have to let eac3to convert all 24 bit files now without the -down16 option just to see whether they are really 24 bit or only 16?
Yoshi is offline   Reply With Quote
Old 31st May 2018, 13:05   #14675  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,442
eac3to will only know if a file is actually only 16-bit after it finished processing the entire file, and would ordinarily then do a 2nd pass to remove the empty 8-bits.
If you force -down16, it'll process the 24-bit audio as if its really 24-bit audio and always apply dithering - because it doesn't know if all future data is only 16-bit.

Here is a quote from madshi from a few years ago explaining the same thing (fyi, it took me 2 minutes to find it )
Quote:
Originally Posted by madshi View Post
If your source claims to be 24bit, and if you use -down16, then eac3to will apply dithering - even if it's only really 16bit. The reason for that is that eac3to doesn't know which bitdepth the source has until processing is complete. You surely don't want eac3to to scan the whole file first, everytime, before starting processing, do you?
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 31st May 2018, 14:08   #14676  |  Link
Yoshi
Registered User
 
Join Date: Apr 2014
Posts: 30
Damn it, apparently I used the wrong keywords then because I also already assumed that madshi had mentioned that back then. Thank you for having done my task then. There was also a discussion in terms of MakeMKV which probably till this day doesn't strip unused bits like eac3to does.

However, I think it wouldn't hurt to have such an option for eac3to indeed to check the whole file beforehand if necessary and then decide what to do. I mean what speaks against it - right now, I have to do it manually which is even more bothersome. However, I greatly assume that only decoding the first few minutes or short random pieces of a movie's soundtrack should do was well - if that leads to 16 bit only of real content, it should be quite unlikely that this becomes true 24 bit audio (if there is such a thing at all) all of the sudden.

Of course one could argue that if someone is already willing to sacrifice quality on the paper by dithering down the audio to 16 bit, then 16 bit sources again dithered to 16 bit isn't exactly the end of days either.

Update: anyone else running into this issue, as a not exactly pretty but usable workaround, one can use the special device name "nul" as the filename of a second decoding instance. This way, one ends up knowing whether the original was only 16 bit or not while at least not using any hard disk I/O resources as the file is never created but processed by eac3to nonetheless. Of course, I think there would be better ways to do this including having a switch and also by maybe doing a quick random check of the source to save time.

Last edited by Yoshi; 4th June 2018 at 11:21. Reason: Update
Yoshi is offline   Reply With Quote
Old 1st June 2018, 18:19   #14677  |  Link
rockydon
Registered User
 
Join Date: Oct 2016
Posts: 76
Thanks @madshi I have reached this page via Google,I would like to ask,first of all I am a newbie to this world and I am learning things with help of Google and forums.

I want to ask can eac3to run on Linux vps,I have iso file and I want to extract few tracks out of it,i am just learning new things,can you help me,I have mounted iso now I am looking for tutorial for track extraction.

I need audio track to be extracted from it.

I have ssh access but no setup desktop.

I am sorry again if something is missing from my side,thanks and I am waiting for reply.

I don't need remux or want to make Any thing,my sole intention is to extract audio track as it is.
rockydon is offline   Reply With Quote
Old 4th June 2018, 13:56   #14678  |  Link
Yoshi
Registered User
 
Join Date: Apr 2014
Posts: 30
@rockydon: not sure if this helps in your particular VPS environment but eac3to worked flawlessly for me via WINE under Ubuntu, Mint and Fedora at least.
Yoshi is offline   Reply With Quote
Old 4th June 2018, 14:18   #14679  |  Link
rockydon
Registered User
 
Join Date: Oct 2016
Posts: 76
@yoshi thanks for your reply,I have been through many Google articles and yes you are absolutely right that it works under wine,I am not confident about running wine,I am using ubuntu 14,should I go and install wine and are their any effects of wine on other parts of Ubuntu,will wine completely change my Ubuntu environment,I am already running couple of things on it.will wine mess with my Ubuntu environment.I am a newbie and i am scared to mess up.

One more thing I want to bring into notice that I am using headless server,I don't have virtual desktop,I can only access with ssh.can I still use wine

Last edited by rockydon; 4th June 2018 at 14:33.
rockydon is offline   Reply With Quote
Old 5th June 2018, 08:47   #14680  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
Wine is totally independent from the system and it should not produce any conflict. (A small subset of the Windows OS is included with wine, but it is kept within the wine installation directory and is never mixed with the Linux OS.)

Not sure for ssh, but IMO it should work, and it doesn't hurt to try.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ 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 03:11.


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