View Full Version : Problem with converting TrueHD to WAV in eac3to
tufffta
5th May 2012, 20:36
I demuxed tracks from BluRay mt2s file with tsMuxeR_1.10.6. The TrueHD track was saved as .ac3 file, took a lot of space (about 2,6 GB) and even MediaInfo recognized it as "TrueHD / Core" (though couldn't identify bitrate: "unknown bitrate / 640 kbps"). I want to convert it to WAV (and then to FLAC). Used Eac3to, and here's the log:
eac3to v3.24
command line: eac3to "D:\THE_MATRIX\BDMV\DEMUX\00000.track_4353 - TrueHD - ENG + 640 core.ac3" "d:\matrix.eng.wav" -blu-ray
------------------------------------------------------------------------------
TrueHD/AC3, 5.1 channels, 48kHz, dialnorm: -27dB
(embedded: AC3, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB)
Extracting TrueHD stream...
Removing TrueHD dialog normalization...
Decoding with libav/ffmpeg...
Remapping channels...
Writing WAV...
Creating file "d:\matrix.eng.wav"...
[libav] End of stream indicated <WARNING>
The original audio track has a constant bit depth of 16 bits.
Caution: The WAV file is bigger than 4GB. <WARNING>
Some WAV readers might not be able to handle this file correctly. <WARNING>
Superfluous zero bytes detected, will be stripped in 2nd pass.
Starting 2nd pass...
Reading WAV...
Stripping zero bytes...
Writing WAV...
Creating file "d:\matrix.eng.wav"...
Caution: The WAV file is bigger than 4GB. <WARNING>
Some WAV readers might not be able to handle this file correctly. <WARNING>
eac3to processing took 16 minutes, 27 seconds.
Done.
I tried withou "-blu-ray" before, but it was pretty much the same. The WAV file takes about 4,38 GB, but when I play it through Foobar2000, it shows about 12 minutes, while the original is more than an hour long. Then I compressed it with FLAC, and after the progress was 100%, it said something like there is an error, an empty something or what (I don't remember), and it's only 130 MB.
What's wrong with what I am doing? Why isn't eac3to decoding the TrueHD track properly and why is the WAV file so big for a 13 minute audio track?
tebasuna51
6th May 2012, 02:26
Encode to flac with eac3to or include the parameter --ignore-chunk-sizes if you use flac.exe encoder.
tufffta
6th May 2012, 08:09
I did this. Is everything fine? I don't understand what that warning ("End of stream indicated") and "Superfluous zero bytes detected, will be stripped in 2nd pass" means:
eac3to v3.24
command line: eac3to "D:\THE_MATRIX\BDMV\STREAM\00000.m2ts" 5: audio.flac
------------------------------------------------------------------------------
M2TS, 2 video tracks, 13 audio tracks, 29 subtitle tracks, 2:16:18, 24p /1.001
1: Chapters, 40 chapters
2: VC-1, 1080p24 /1.001 (16:9)
3: VC-1, 480p24 /1.001 (3:2)
4: AC3, English, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
5: TrueHD/AC3, English, 5.1 channels, 48kHz, dialnorm: -27dB
(embedded: AC3, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB)
6: AC3, Czech, 2.0 channels, 192kbps, 48kHz, dialnorm: -27dB
7: AC3, Hungarian, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
8: AC3, Polish, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
9: AC3, Russian, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
10: AC3, Thai, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
11: AC3 Surround, Turkish, 2.0 channels, 192kbps, 48kHz, dialnorm: -27dB
12: AC3 Surround, English, 2.0 channels, 192kbps, 48kHz, dialnorm: -27dB
13: AC3 Surround, English, 2.0 channels, 192kbps, 48kHz, dialnorm: -27dB
14: AC3 Surround, English, 2.0 channels, 192kbps, 48kHz, dialnorm: -27dB
15: AC3 Surround, English, 2.0 channels, 192kbps, 48kHz, dialnorm: -27dB
16: E-AC3 Surround, English, 2.0 channels, 192kbps, 48kHz, dialnorm: -27dB
17: Subtitle (PGS), English
18: Subtitle (PGS), Chinese
19: Subtitle (PGS), Arabic
20: Subtitle (PGS), Indonesian
21: Subtitle (PGS), Bulgarian
22: Subtitle (PGS), Croatian
23: Subtitle (PGS), Czech
24: Subtitle (PGS), Estonian
25: Subtitle (PGS), Hebrew
26: Subtitle (PGS), Hungarian
27: Subtitle (PGS), Icelandic
28: Subtitle (PGS), Latvian
29: Subtitle (PGS), Polish
30: Subtitle (PGS), Portuguese
31: Subtitle (PGS), Romanian
32: Subtitle (PGS), Russian
33: Subtitle (PGS), Serbian
34: Subtitle (PGS), Slovenian
35: Subtitle (PGS), Thai
36: Subtitle (PGS), Turkish
37: Subtitle (PGS), Chinese
38: Subtitle (PGS), Chinese
39: Subtitle (PGS), Chinese
40: Subtitle (PGS), Chinese
41: Subtitle (PGS), Czech
42: Subtitle (PGS), Hungarian
43: Subtitle (PGS), Turkish
44: Subtitle (PGS), English
45: Subtitle (PGS), Chinese
[a05] Extracting audio track number 5...
[a05] Extracting TrueHD stream...
[a05] Removing TrueHD dialog normalization...
[a05] Decoding with libav/ffmpeg...
[a05] Encoding FLAC with libFlac...
[a05] Creating file "audio.flac"...
[a05] [libav] End of stream indicated <WARNING>
[a05] The original audio track has a constant bit depth of 16 bits.
[a05] Superfluous zero bytes detected, will be stripped in 2nd pass.
[a05] Starting 2nd pass...
[a05] Decoding FLAC...
[a05] Reducing depth from 24 to 16 bits...
[a05] Encoding FLAC with libFlac...
[a05] Creating file "audio.flac"...
[a05] The processed audio track has a constant bit depth of 16 bits.
Video track 2 contains 196075 frames.
Video track 3 contains 196033 frames.
eac3to processing took 34 minutes, 8 seconds.
Done.
tebasuna51
6th May 2012, 09:28
Seems OK.
"End of stream indicated": Check if the output flac have the correct length.
"Superfluous zero bytes detected...": The original audio depth was only 16 bits.
tufffta
6th May 2012, 09:57
TrueHD file (with embedded AC3) displays very wrong length: about 8:06:55. The extracted AC3 core is 2:16:17.856, while the FLAC (made from TrueHD) is 2:16:17.836. So there's some difference minor in length, which won't affect audio-video synchronisation, but still I wonder why it's not perfectly identical...
tebasuna51
6th May 2012, 18:37
The exact duration is 2:16:17.836 = 8177836 ms.
The lossy AC3 48KHz is compossed by frames with 32 ms.
Like 8177836/32 = 255557,375, the AC3 fill with silence the last frame until 255558 frames = 8177856 ms = 2:16:17.856
The -blu-ray parameter is deprecated since (see Changelog.txt):
v1.09
...
* "-blu-ray" option removed
tufffta
7th May 2012, 08:05
I decoded an other DTS-HD MA track to wav (simply with no other switches), and again it's only 12 minutes long and takes 4,38 GB. When doing it straight to FLAC, it worked well again. So now I have tried two different audio tracks (TrueHD and DTS-HS MA) for the same movie, but from different sources, and both decode to wav not right. What could be the problem here? Is it a known eac3to bug or does it have something to do with file's size? I'm using Windows 7 32 bit with NTFS, so the file size shouldn't be a problem.
tebasuna51
7th May 2012, 15:19
WAV header have two fields in header to store the filesize and the size of audio data.
Both fields have 32 bits length. With 32 bits the max size than can be store is 4GB, if audio data (and of course filesize) is greater these fields have a overflow and some soft can't know the correct duration.
Is not a bug in eac3to, is a limit in WAV header. Some encoders can accept WAV > 4GB with a specific parameter:
Flac: --ignore-chunk-sizes
Aften: -readtoeof 1
NeroAacEnc, qaac, fhgaacenc, Oggenc2: -ignorelength
...
To avoid the problem you can decode to W64, like WAV but with 64 bits for these problematic fields.
doom-nine
9th May 2012, 04:36
The exact duration is 2:16:17.836 = 8177836 ms.
The lossy AC3 48KHz is compossed by frames with 32 ms.
Like 8177836/32 = 255557,375, the AC3 fill with silence the last frame until 255558 frames = 8177856 ms = 2:16:17.856
The -blu-ray parameter is deprecated since (see Changelog.txt):
v1.09
...
* "-blu-ray" option removed
I'm wondering why one frame is 32ms for ac3. How about dts, still 32ms as a frame?
tebasuna51
9th May 2012, 10:09
The standard DTS put 512 samples in one frame, then, if samplerate is 48000 samples/second:
512/48000 = 10.666... ms
tufffta
9th May 2012, 10:22
I don't get it: I extracted TrueHD from m2ts with eac3to and then extracted the same stream with tsMuxer. tsMuxer extracted the complete stream (with its "core") and so it is playable with MPC (although the track length increased some three times). eac3to extracted only the lossless part and it's unplayble.
How could I extract the complete TrueHD with its core with eac3to?
tebasuna51
9th May 2012, 11:23
eac3to BDsource output.thd+ac3 -> full track (TrueHD + interleaved AC3)
eac3to BDsource output.thd -> only lossles TrueHD
eac3to BDsource output.ac3 -> only lossy AC3
MPC can't play thd, only if you use ffdshow you can play thd.
MPC play thd+ac3 ignoring thd data, then is the same than play ac3.
tufffta
9th May 2012, 12:05
Alrgith, thanks! And what about DTS-HD MA - do I have to use "output.dtshd+dts", if I want the complete stream, or is "output.dtshd" enough in this case?
Midzuki
10th May 2012, 03:02
^
"output.dtshd" should be enough in this case.
Remember, the DTS-HD Master Audio "core" is *semantically different* from the so-called TrueHD "core". On the one hand,
(lossy DTS) + (something else) = lossless ,
whereas TrueHD does not depend on the ac3 "co-stream" to be decoded.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.