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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 3rd May 2008, 22:55   #4581  |  Link
robena
Registered User
 
Join Date: May 2007
Posts: 29
Quote:
Originally Posted by madshi View Post
The AC3 track seems to be slightly damaged. It might be 99% alright, but if there is one wrong bit anywhere in the beginning of the AC3 stream, eac3to won't accept it. You'll have to demux the AC3 track with another tool (e.g. xport or TsMuxer) and then run the demuxed AC3 track through delaycut. delaycut will probably find something to fix. Afterwards eac3to can do the slowdown for you.

At this point in time eac3to is VERY picky about the source material. The source must be in perfect state. If there's any problem with the source, eac3to will refuse to work properly. I may improve this in a future version, but that's the way it is right now.
Thanks for the explanation and for the workaround.
robena is offline  
Old 4th May 2008, 03:38   #4582  |  Link
jchappo
Registered User
 
Join Date: Oct 2007
Posts: 36
Madashi, yet more info on DTS-HD to WAV problem.

I just converted a TrueHD track to WAV and it plays fine on the popcorn hour. Looks like libav works, but got this error:

C:\DVDRips\HD>eac3to.exe Ripped\legend_audio.truehd Ripped\output.wav
TrueHD/AC3, 5.1 channels, 48khz, dialnorm: -27dB
Extracting TrueHD stream...
Removing dialog normalization...
Writing WAV...
Creating/writing file "Ripped\output.24bit.wav"...
[libav] Lossless check failed - expected 0, calculated d1
Caution: The WAV file is bigger than 4GB.
Some WAV readers might not be able to handle this file correctly.
This audio track contains only 16 bit of information.
The zero bytes were successfully removed.
eac3to processing took 9 minutes, 14 seconds.
Done.

Sonice and Nero both produce garbage audio after about 20%
jchappo is offline  
Old 4th May 2008, 04:21   #4583  |  Link
Encoder888
Registered User
 
Encoder888's Avatar
 
Join Date: Aug 2007
Posts: 111
@madshi

I had trouble extracting the chapters from The Terminator BD (it's MPEG-2). I got this:

CHAPTER01=00:00:00.000
CHAPTER01NAME=
CHAPTER02=00:06:23.925
CHAPTER02NAME=
CHAPTER03=00:13:38.234
CHAPTER03NAME=
CHAPTER04=00:15:04.737
CHAPTER04NAME=
CHAPTER05=00:22:42.528
CHAPTER05NAME=
CHAPTER06=00:29:42.698
CHAPTER06NAME=
CHAPTER07=00:38:40.026
CHAPTER07NAME=
CHAPTER08=00:41:18.101
CHAPTER08NAME=
CHAPTER09=00:47:39.398
CHAPTER09NAME=
CHAPTER10=00:00:00.000
CHAPTER10NAME=
CHAPTER11=00:00:00.000
CHAPTER11NAME=
CHAPTER12=00:00:00.000
CHAPTER12NAME=
CHAPTER13=00:00:00.000
CHAPTER13NAME=
CHAPTER14=00:00:00.000
CHAPTER14NAME=
CHAPTER15=00:00:00.000
CHAPTER15NAME=
CHAPTER16=00:00:00.000
CHAPTER16NAME=
CHAPTER17=00:00:00.000
CHAPTER17NAME=

So, the first 8 are okay, but the last 8 are all 00:00:00.000 for some reason... Any idea what may be causing this?
Encoder888 is offline  
Old 4th May 2008, 07:12   #4584  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by gregt View Post
I am unable to convert Xmen3 at all. It is the first 7 channel movie that I have run across. Here is the output:
eac3to v2.44
command line: eac3to xmen3 XMEN3.mkv -libav -core
------------------------------------------------------------------------------
M2TS, 1 video track, 5 audio tracks, 1:44:05
1: Chapters, 31 chapters
2: h264/AVC, 1080p24 /1.001 (16:9)
3: DTS Master Audio, English, 6.1 channels, 24 bits, 48khz
4: AC3, Spanish, 5.1 channels, 448kbit/s, 48khz, dialnorm: -27dB, -13ms
5: AC3, French, 5.1 channels, 448kbit/s, 48khz, dialnorm: -27dB, -13ms
6: AC3, English, 2.0 channels, 224kbit/s, 48khz, dialnorm: -27dB, -19ms
7: AC3, English, 2.0 channels, 224kbit/s, 48khz, dialnorm: -27dB, -19ms
Creating file "XMEN3 - Chapters.txt"...
[a03] The libav DTS decoder doesn't decode the 7th channel.
[a03] The libav DTS decoder doesn't decode the full DTS-HD information.
[a03] Doubling 7th channel...
This looks like a bug. Should be fixed in the next build (I hope).

Quote:
Originally Posted by jchappo View Post
Madashi, yet more info on DTS-HD to WAV problem.

I just converted a TrueHD track to WAV and it plays fine on the popcorn hour. Looks like libav works, but got this error:

C:\DVDRips\HD>eac3to.exe Ripped\legend_audio.truehd Ripped\output.wav
TrueHD/AC3, 5.1 channels, 48khz, dialnorm: -27dB
Extracting TrueHD stream...
Removing dialog normalization...
Writing WAV...
Creating/writing file "Ripped\output.24bit.wav"...
[libav] Lossless check failed - expected 0, calculated d1
Caution: The WAV file is bigger than 4GB.
Some WAV readers might not be able to handle this file correctly.
This audio track contains only 16 bit of information.
The zero bytes were successfully removed.
eac3to processing took 9 minutes, 14 seconds.
Done.
Which error do you mean? The track seems to have been converted successfully?

Quote:
Originally Posted by jchappo View Post
Sonice and Nero both produce garbage audio after about 20%
With which movie/audio track? Also with the TrueHD track of "I Am Legend"? And the libav conversion of the same track works ok? That sounds extremely strange to me. I almost cannot believe that. How long are the final WAV files produced by libav, Nero and Sonic for this one specific TrueHD track?

Quote:
Originally Posted by Encoder888 View Post
I had trouble extracting the chapters from The Terminator BD (it's MPEG-2). [...] the first 8 are okay, but the last 8 are all 00:00:00.000 for some reason... Any idea what may be causing this?
Not right now. Can you please upload the playlist (mpls) file you used?
madshi is offline  
Old 4th May 2008, 07:27   #4585  |  Link
Encoder888
Registered User
 
Encoder888's Avatar
 
Join Date: Aug 2007
Posts: 111
@madshi

It's not a seamless branching movie, it's just one m2ts... It's the first title that's behaved like this, very weird...
Encoder888 is offline  
Old 4th May 2008, 07:59   #4586  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by Encoder888 View Post
It's not a seamless branching movie, it's just one m2ts... It's the first title that's behaved like this, very weird...
Can you please upload the playlist (mpls) file you used?

P.S: Do "eac3to BluRayMovieFolder" and then upload the first mpls file that gets listed, if that's the movie playlist.
madshi is offline  
Old 4th May 2008, 08:00   #4587  |  Link
bmnot
Registered User
 
Join Date: Jun 2007
Posts: 215
madshi, did I create the sample correctly? concerning this: http://forum.doom9.org/showpost.php?...postcount=4558
bmnot is offline  
Old 4th May 2008, 09:20   #4588  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by bmnot View Post
madshi, did I create the sample correctly? concerning this: http://forum.doom9.org/showpost.php?...postcount=4558
Yes. The bug is already fixed in my sources.
madshi is offline  
Old 4th May 2008, 09:52   #4589  |  Link
PHD_1976
Registered User
 
Join Date: May 2004
Location: Russia
Posts: 57
madshi, hi.
Is it possible to have a piece of your source code where you handle seamless branching audio?
If not could you please explain the algorithm of fixing multi file audio without reencoding?
I've tried to PM you, but your inbox limit is exceeded.
Thanx in advance for your help -)
PHD_1976 is offline  
Old 4th May 2008, 10:02   #4590  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by monohouse View Post
it only shows the information after the process is complete, I cannot force it to create only one file (instead of 2 which it makes automatically) of the bit depth that is relevant, eac3to makes both files and then deletes the wrong one, what I wanted to ask is how is it possible to know the bit-depth of the stream before starting to convert it (and yes I mean "truehd" or should we call it "craphd", what kind of bs is that creating a 24-bit if only 16-bit is used?)
The bitdepth is simply not known before the processing. The information about the bitdepth is not contained anywhere in the TrueHD track. eac3to has no other choice than to fully decode the full track and check the bitdepth of every single audio sample (of which there are usually 48000 for every second of the runtime). If all 24bit audio samples have 8bits zeroed out, eac3to will state that it's a 16bit track only and will remove the 24bit file. There's nothing else I can do.

Quote:
Originally Posted by monohouse View Post
but I do have one question though: is it possible to demux video+demux audio+convert audio into other format+remux into mkv without saving the files, process them directly into mkv (or maybe something else ?) ?
No.

Quote:
Originally Posted by monohouse View Post
is there a way to remove dialnorm from ac3 in real time ? without re-converting ? and if reconverting is necessary, is it possible to convert ac3 to ac3 without loosing the quality (demux?) ? because I was wondering, what is dialnorm ? im guessing that dialnorm is a form of processing that is being done on the audio stream to increase the volume of the dialogs if necessary based on current level of the other data, if so it is a form of processing that involves DRC, and according to pro audio rules, any type of processing is a sure degradation of quality, however if it is not a form of processing that is being performed in real-time on a stream and instead data that exists in that form (pre-amplified) then processing it with eac3to and removing the normalization is catastrophic (reencoding+modifying)
Dialnorm is a simple number stored in every AC3 audio frame. Removing dialnorm is a simple process which just sets this number to zero and recalculates the checksum. So basically there's no reencoding done. It's a simple modification of the compressed stream. There's no quality loss whatsoever.

Quote:
Originally Posted by monohouse View Post
another question: how can you be sure that The Sonic DTS decoder actually gives you 1:1 sample values ? I can appreciate the ability of eac3to when it handles trueHD tracks to give you 1:1 sample values because it's code is in your program, however when it comes to external filters, how do you know that, for example dialog normalization hasn't been applied ? and that's just the lite case, how about bass boost that was added just for fun or DRC that suddenly decided to kick in because the decoder detected what might be clipping so it compressed by say 2 db, who knows what other thresholds there may be out there and what other code that might do some of those "other stuff" you mentioned earlier, not all of these can be detected by recording and monitoring the output of the decoder.
The TrueHD decoder is not in my sources, either. I'm using libav for decoding TrueHD. Anyway, there've tests done on the decoders which include comparing the decoded results in a WAV editor and even in a hexeditor. E.g. some movies come with both PCM and DTS-HD MA tracks. And decoding the DTS-HD MA tracks with the Sonic decoder resulted in identical data compared to the PCM track. So it's fairly safe to say that the Sonic DTS-HD decoder outputs bit perfect results.

Quote:
Originally Posted by monohouse View Post
it is very hard to determine whether it only reads the "core" or the additional data beyond the core
No, it's not hard at all. I've fed the decoder only the core (test A). And I've fed it the full DTS-HD stream (test B). And the decoder output different data for both tests. So obviously the decoder makes use of the DTS-HD information.

Quote:
Originally Posted by monohouse View Post
it could even be in reverse, that it only reads the lossless track and not the core
That's technically not possible. The result would be garbage.

Quote:
Originally Posted by monohouse View Post
if eac3to contains code to properly decode truehd, is there any chance that it might include the code to decode DTS-HDMA just as well ?
eac3to does not contain code to decode TrueHD. If the libav library will ever include DTS-HD MA decoding then eac3to will offer that functionality. But today it doesn't. And I'm not aware of any plans by the libav programmers to add DTS-HD decoding.

Quote:
Originally Posted by monohouse View Post
when source is ac3 and I asked eac3to to save that source stream also as ac3, does that mean it will demux it without reencoding ?
Yes. Except if you use one of the bitrate switches to change the bitrate. Then the stream is decoded and reencoded. eac3to logs to the command line window exactly what is does. If it decodes/reencodes the AC3 stream, you'll see that in the eac3to text output. Just try it out. You'll easily be able to tell when decoding/reencoding is done and when not.

Quote:
Originally Posted by monohouse View Post
for that matter, is it true to assume that in any event that input type=output type the operation will be demuxing and not re-encoding ?
Yes. As long as you don't use any additional parameters (like bitrate switches) which force eac3to to reencode the audio stream. Of course some manipulations are done nevertheless, e.g. dialnorm removal. But as explained above that does not harm quality at all.

Quote:
Originally Posted by monohouse View Post
I noticed that when the output format is different than the input format there is a dithering process taking place, while when input=output it isn't.
Dithering is done when bitdepth is reduced. Usually that's the case when using the libav AC3, E-AC3, MP2 and DTS decoders cause I've hacked these decoders in such a way that they outputs a very high bitdepth. eac3to then internally dithers the bitdepth down to a reasonable value.
madshi is offline  
Old 4th May 2008, 10:05   #4591  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by Beastie Boy View Post
madshi, your reply to robena above seems to quote a different error to the one he posted when I replied. In the post I replied to, eac3to could not detect an audio stream, whereas your quote suggests eac3to found a damaged stream.
Actually eac3to did find an audio track, it's just not listed in the track listing because eac3to found the stream to be damaged. See the line "This doesn't seem to be a valid (E-)AC3 stream" in the original post. This line indicates that an (E-)AC3 stream was found but ignored cause it's damaged.

Quote:
Originally Posted by PHD_1976 View Post
Is it possible to have a piece of your source code where you handle seamless branching audio?
If not could you please explain the algorithm of fixing multi file audio without reencoding?
What do you need this for?
madshi is offline  
Old 4th May 2008, 10:14   #4592  |  Link
PHD_1976
Registered User
 
Join Date: May 2004
Location: Russia
Posts: 57
Quote:
Originally Posted by madshi View Post
What do you need this for?
Currently I'm trying to create a BD demuxer, which makes Scenarist compliant AVC streams while demuxing.
I already know what should be done to make AVC streams compliant, but I thought it would be great to demux all needed audio and subs as well, but I don't know how to handle audio from seamless branching movie without reencoding.
I will certainly share my tool as soon as its ready.
PHD_1976 is offline  
Old 4th May 2008, 10:22   #4593  |  Link
Encoder888
Registered User
 
Encoder888's Avatar
 
Join Date: Aug 2007
Posts: 111
@mashi.

Sorry I totally wasn't paying attention, I thought you needed the actual list, not the file :P Here it is:

http://www.mediafire.com/?dmiyggjnjit
Encoder888 is offline  
Old 4th May 2008, 10:29   #4594  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
-----

Last edited by monohouse; 17th January 2012 at 00:41.
monohouse is offline  
Old 4th May 2008, 12:43   #4595  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by monohouse View Post
I know that this is not your area but was wondering if there is a chance you might know, if I use vobblanker to blank a cell in the video then it sure does blank the audio of that area as well, does it mean that ac3 stream was modified ? or is it possible to insert data into the ac3 stream without reencoding it ?
Is possible insert silence in the middle of an ac3 stream without reencoding.

I don't know vobBlanker but the author is jsoto. also DelayCut author and the method to delay an ac3 can be used to insert ac3 silence in the middle
tebasuna51 is offline  
Old 4th May 2008, 12:55   #4596  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
-----

Last edited by monohouse; 17th January 2012 at 00:42.
monohouse is offline  
Old 4th May 2008, 14:34   #4597  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by PHD_1976 View Post
Currently I'm trying to create a BD demuxer, which makes Scenarist compliant AVC streams while demuxing.
I already know what should be done to make AVC streams compliant
Maybe (if it's not too much work) it would make sense to add this functionality to eac3to? Or are there more reasons why you want to create your own tool? Not that it would be a problem for me, of course!

Quote:
Originally Posted by PHD_1976 View Post
I thought it would be great to demux all needed audio and subs as well, but I don't know how to handle audio from seamless branching movie without reencoding.
It's quite complicated. You need this:

(1) A full stream parser for all audio formats you want to support, which can also calculate the exact runtime of each audio frame.
(2) Your tool will need to read out the PTS timestamps of the m2ts container and compare them to the runtime information your audio stream parsers (see (1)) calculated. This will give you information about where in the stream are gaps/overlaps. Unfortunately the PTS values are not always 100% correct, they may vary slightly (a bit too low or a bit too high). So you'll need to find a good way to even out the variances.
(3) You have to take the gap/overlap information from step (2) and perform the necessary changes on the audio streams. For AC3, E-AC3, DTS and MP2 you'll have to insert (or delete) single audio frames to get rid of the gaps (or overlaps). For LPCM you can insert (or delete) single samples. For TrueHD things are difficult cause it's not really possible to do such corrections on the TrueHD bitstream without introducing problems. So for TrueHD you can do the correction only if you decode the audio data first.

The eac3to source code is a complicated class structure. There's not just a few lines of code which do the audio gap/overlap correction. There's code in several classes which works together. So it's nearly impossible to give you just "some code" to duplicate eac3to's audio gap/overlap correction functionality.
madshi is offline  
Old 4th May 2008, 15:36   #4598  |  Link
jchappo
Registered User
 
Join Date: Oct 2007
Posts: 36
Madashi,

This is not an error?

[libav] Lossless check failed - expected 0, calculated d1

anyway, is there anything I could provide you to help fix Sonic and Nero decoding to WAV?
jchappo is offline  
Old 4th May 2008, 16:19   #4599  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by jchappo View Post
[libav] Lossless check failed - expected 0, calculated d1
That's a bit strange. Can be a bug in the libav decoder. Or it can be a slightly damaged TrueHD stream. Don't know. Since this warning only occurred once in the whole audio track, you probably don't need to bother much. The problem can only affect max 100ms worth of audio data in the whole audio track, I believe.

Quote:
Originally Posted by jchappo View Post
anyway, is there anything I could provide you to help fix Sonic and Nero decoding to WAV?
I'm not convinced yet that there is any problem with Sonic and Nero decoding to WAV. Can you give me some more details about why you came to the conclusion that there's something wrong with Sonic and Nero decoding to WAV? Which audio track did you decode with Sonic, Nero *and* libav? How big were the WAV files created by the 3 decoders?

It's important to decode the very same track with all 3 decoders. Only if you do that and if you then run into a problem with some decoders while other decoders don't show the same problem, only then it's a hint that some decoders might have a problem. But still even in that case the problem might be elsewhere. E.g. if the TrueHD stream is really damaged (see the "lossless check failed" libav warning you posted) this might throw off Sonic&Nero but might have a less bad effect on libav.
madshi is offline  
Old 4th May 2008, 17:09   #4600  |  Link
jchappo
Registered User
 
Join Date: Oct 2007
Posts: 36
I will do more testing, but so far, the only tracks I can play on the popcorn hour are:

LPCM tracks included with the Bluray
TrueHD converted to WAV (PCM) with eac3to -libav

Both DTS-MA and DD+ (Sonic, and Nero) both produce bad WAV files.
jchappo is offline  
Closed Thread

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 08:58.


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