Log in

View Full Version : eac3to - audio conversion tool


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 [93] 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308

madshi
4th May 2008, 18:39
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.
That is not a conclusive test. The bad WAV playback probably only depends on the WAV file size and on nothing else. Most probably the WAV files created from DTS-MA and DD+ are bigger than 4GB while the TrueHD created WAV file is probably smaller than 4GB. Probably that's the difference...

madshi
4th May 2008, 19:31
eac3to v2.45 released

http://madshi.net/eac3to.zip

* Blu-Ray angles are now reported as separate titles
* duplicate playlists are not listed in the "folder view", anymore
* reduced TrueHD and RAW/PCM gap/overlap threshold to 7ms
* reduced (E-)AC3 gap/overlap threshold to 60% of the runtime of one audio frame
* reduced MP2 gap/overlap threshold to 60% of the runtime of one MP2 frame
* reduced DTS threshold to 60% of the runtime of one DTS frame, but at least 7ms
* fixed: Blu-Ray chapter export sometimes wrote incorrect "00:00:00.000" items
* improved handling of MPEG2 streams (changes from interlaced to progressive)
* video information now shows "with pulldown flags", if applicable
* removed "-ignoreDiscon" from help; hint is shown when a discontinuity occurs
* added "-ignoreEncrypt" option; hint is shown when a source is encrypted
* new option "-extensible" creates WAV files with a slightly different header
* fixed some smaller bugs
Notes:

(1) As demanded, I've noticably decreased the audio gap/overlap thresholds. For most audio tracks the threshold is only 7ms now. If you run into any trouble with this (e.g. gaps/overlaps reported in situations where you didn't expect it), please let me know. Also if it works well for you, I'd also like to hear about it and maybe see some success logs. Thanks!

(2) Please note that MPEG2 handling of problematic streams has improved, but I still not to improve it further. As an explanation: Many MPEG2 streams are 60i. Some of them are natively interlaced, others are movies. Movies are often encoded as 24p but with pulldown flags. HD DVD uses this method. Now the problem is this: Sometimes a stream begins as 24p with pulldown flags but then suddenly switches to natively 60i interlaced. Or the other way round. Some streams even switch multiple times. Of course we want eac3to to handle 24p movies with pulldown flags as 24p. But doing this runs into problems when the stream suddenly switches to 60i interlaced content. Currently any stream with changes between 24p (with pulldown flags) and 60i is not handled in the best possible way by eac3to. I still need to improve that. But at least processing is not aborted, anymore, if there's such a change in the stream. The previous eac3to version aborted in such a situation. That means with v2.45 you can at least use eac3to for demuxing video and for handling the audio streams etc...

(3) I've heard that TsMuxer complains about eac3to's WAV files. Something like "channel mapping information missing". You can now use the new "-extensible" switch to make eac3to write slightly different WAV headers. This may satisfy TsMuxer (or not).

jchappo
4th May 2008, 21:12
Actually the TrueHD WAV file was 6GB, DD+ and DTS-HD both produce WAV files around that size as well.

markrb
4th May 2008, 21:21
[a04] Encoding AC3...
[a04] Creating file "D:\audio.ac3"...
[a04] Audio overlaps for 14ms at playtime 0:00:02.
[a04] Audio overlaps for 25ms at playtime 0:05:09.
[a04] Audio overlaps for 12ms at playtime 0:09:18.
[a04] Audio overlaps for 5ms at playtime 0:09:53.
[a04] Audio overlaps for 29ms at playtime 0:12:14.
[a04] Audio overlaps for 23ms at playtime 0:13:32.
[a04] Audio overlaps for 10ms at playtime 0:26:09.
[a04] Audio overlaps for 23ms at playtime 0:28:19.
[a04] Audio overlaps for 32ms at playtime 0:34:52.
[a04] Audio overlaps for 24ms at playtime 1:03:31.
[a04] Audio overlaps for 8ms at playtime 1:04:06.
[a04] Audio overlaps for 11ms at playtime 1:20:23.
[a04] Audio overlaps for 7ms at playtime 1:22:20.
[a04] Audio overlaps for 13ms at playtime 1:24:06.
[a04] Audio overlaps for 14ms at playtime 1:26:21.
[a04] Audio overlaps for 21ms at playtime 1:29:26.
[a04] Audio overlaps for 11ms at playtime 1:29:54.
[a04] Audio overlaps for 21ms at playtime 1:37:21.
[a04] Audio overlaps for 28ms at playtime 1:39:05.
[a04] Audio overlaps for 27ms at playtime 1:39:27.
[a04] The audio file was demuxed without making use of the gap/overlap information.
[a04] Please rerun the same eac3to command line. That will correct the gaps/overlaps.

I don't understand what it's asking me to do.
Am I suppose to just run the program again and it will somehow remember and fix the issue or am I suppose to put in some sort of command to fix it?

Thanks,
Mark

madshi
4th May 2008, 21:25
Actually the TrueHD WAV file was 6GB, DD+ and DTS-HD both produce WAV files around that size as well.
Ok. Then please try decoding the very same audio track with all 3 decoders and compare. I'd be surprised if it depended on the decoder which WAV plays fine for you and which doesn't. But of course anything is possible.

Yraen
4th May 2008, 21:29
[a04] The audio file was demuxed without making use of the gap/overlap information.
[a04] Please rerun the same eac3to command line. That will correct the gaps/overlaps.

I don't understand what it's asking me to do.
Am I suppose to just run the program again and it will somehow remember and fix the issue or am I suppose to put in some sort of command to fix it?

Thanks,
Mark

Yes, just run the same command line again.

madshi
4th May 2008, 21:31
I don't understand what it's asking me to do.
Am I suppose to just run the program again and it will somehow remember and fix the issue
Yes. You're supposed to simply rerun eac3to with exactly the same parameters as in your first try. The information needed for fixing the issue were stored on harddisk during the first pass (look for a *.gap file). This is then made use of when you run eac3to a 2nd time.

If you want you can save the original "d:\audio.ac3" file and compare it with the final result. You should notice that the current "d:\audio.ac3" file is not in sync with the video. The AC3 file you get from the 2nd pass should be in sync.

Edit: Yraen was faster... :)

bmnot
4th May 2008, 21:38
"The h264 muxer received invalid h264/AVC data" error problem fixed as expected. Thanks. :)

EDIT: I have a potentially silly question. If I have a 16-bit lossless source I want to convert to DTS, should I encode the DTS at 16-bit, because there is no need for 24, and so the size will be smaller? Or would encoding to DTS at 24-bit help the sound quality?

nautilus7
4th May 2008, 22:36
Surcode will encode at 24 bit. You don't have/need to do anything.

Thunderbolt8
4th May 2008, 23:47
thanks for the new version :)

2 questions:

"reduced DTS threshold to 60% of the runtime of one DTS frame, but at least 7ms" - does this affect dts-hd (MA) as well?

and regarding those mpeg2 sources, which sometimes switch flags or show other problems, should I still continue to make samples of these? or do you have already enough and just need more time for those improvements atm?

Atak_Snajpera
5th May 2008, 00:32
Is it possible to demux only chapters?

Bluestraw
5th May 2008, 00:43
Many thanks for the new version - I tested the angle support, and successfully converted the French version of Cars (which is at least 12 parts) to MKV with FLAC, and the resulting file is perfectly in sync. Only reported a couple of small overlaps, each 4 ms I think.

Yraen
5th May 2008, 00:44
Is it possible to demux only chapters?

Yes. Most chapters are track 1, but check to be sure.

eac3to H:\moviefolder\ 1) 1: chapters.txt

jchappo
5th May 2008, 01:22
Ok Madashi,

Converted the DTS-HD track to WAV with all decoders, all suffered from same problem, after 20-30% it was all garbage.

Same thing converting from DD+.

Only thing that works is TrueHD.

nautilus7
5th May 2008, 01:39
Ok Madashi,

Converted the DTS-HD track to WAV with all decoders, all suffered from same problem, after 20-30% it was all garbage.

Same thing converting from DD+.

Only thing that works is TrueHD.There must be something wrong with your installation of the sonic decoder. Which version do you have? Which movie did you try?

gregt
5th May 2008, 02:38
Thanks for this update (2.45)!
- Fixed the Xmen3 problem which now converts successfully.
- Fixed the DVD interlaced problem and my interlaced (480i60 and 480p24 with pulldown flags) files now process with no problems (so far)! Most of my DVDs the changed occurs in the first 2 seconds.
- the gap change seems to create a lot gap data where there was none before. I ignore it on files that I know it is not needed.
One issue that I am having with DVDs is that the language seems to be missing for audio and subtitles as follows:
eac3to v2.45
command line: eac3to vts_01_1.vob+vts_01_2.vob+vts_01_3.vob+vts_01_4.vob+vts_01_5.vob t.mkv
------------------------------------------------------------------------------
VOB, 1 video track, 2 audio tracks, 3 subtitle tracks, 13:17:28
1: Joined VOB file
2: MPEG2, 480p24 /1.001 (4:3) with pulldown flags
3: AC3, 2.0 channels, 192kbit/s, 48khz, dialnorm: -27dB, -83ms
4: AC3, 2.0 channels, 192kbit/s, 48khz, dialnorm: -27dB, -100ms
5: Subtitle
6: Subtitle
7: Subtitle

But, thanks for the update as that is a huge improvement for me.

nautilus7
5th May 2008, 02:48
To make eac3to list languages you have to load the DVD folder, like you do for HD DVDs and Blu-ray Discs. Reading DVD folders isn't supported (yet), though, so you can't do it currently.

PHD_1976
5th May 2008, 06:27
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!

Madshi,
There's a lot of work fixing h264 streams for Scenarist.
Maybe we can discuss it outside this thread.
I don't mind sharing my code with you.
Where can I write you a letter with a description of what should be done to fix H264 streams?

madshi
5th May 2008, 07:37
"reduced DTS threshold to 60% of the runtime of one DTS frame, but at least 7ms" - does this affect dts-hd (MA) as well?
Yes.

and regarding those mpeg2 sources, which sometimes switch flags or show other problems, should I still continue to make samples of these? or do you have already enough and just need more time for those improvements atm?
Right now I don't need further samples. Once I'm done with the improvements and there are still problems, I'd be interested in further samples. But for now I think I have enough samples.

Many thanks for the new version - I tested the angle support, and successfully converted the French version of Cars (which is at least 12 parts) to MKV with FLAC, and the resulting file is perfectly in sync. Only reported a couple of small overlaps, each 4 ms I think.
Good to hear, thanks!

Converted the DTS-HD track to WAV with all decoders, all suffered from same problem, after 20-30% it was all garbage.

Same thing converting from DD+.

Only thing that works is TrueHD.
Do you have different movies with DTS-HD, DD+ and TrueHD tracks? If possible, it would be helpful if you could test other movies, too.

I still believe that the size of the WAV file is the only problem here. Let me explain: The WAV header has a "size" field which is only 4 byte long. The max size you can put in 4 bytes is about 2GB or 4GB (depending on whether you interpret that number to be able to hold negative numbers, too). Now if you have a WAV file which is longer than 2GB or 4GB, the "size" field in the WAV header is invalid. It's difficult to explain to a non-programmer what value this field has when it's invalid. But you can think of it as being "random", but the random value depends on the full WAV file size. Now if a media player is stupid enough to rely on the "size" field, it will interpret the random value in the WAV header as being the correct size. Since the value is random, a 5.9GB WAV file could eventually work much better than a 6.1GB WAV file or vice versa.

When you decode the same track with different decoders, they will likely still output the same WAV size. That's why all 3 decoders behave the same for you. I believe the only problem is the random WAV "size" field. You probably just had luck with your TrueHD track that the random size field somehow made it work more or less ok.

Fixed the DVD interlaced problem and my interlaced (480i60 and 480p24 with pulldown flags) files now process with no problems (so far)! Most of my DVDs the changed occurs in the first 2 seconds.
- the gap change seems to create a lot gap data where there was none before.
Yeah, that's still something I'm working on. It happens especially when a movie begins as 480p24 (with pulldown flags) and then changes to 480i60.

One issue that I am having with DVDs is that the language seems to be missing
As nautilus7 already explained, this is a feature which is just not implemented in eac3to. eac3to parses the special HD DVD and Blu-Ray files where the language information is contained. But eac3to doesn't parse the special DVD files where the info is contained.

There's a lot of work fixing h264 streams for Scenarist.
Maybe we can discuss it outside this thread.
I don't mind sharing my code with you.
Where can I write you a letter with a description of what should be done to fix H264 streams?
You can email to dear (at) madshi (dot) net.

PHD_1976
5th May 2008, 13:00
You can email to dear (at) madshi (dot) net.
Just emailed you from genetr (at) mail (dot) ru

sshd
5th May 2008, 13:10
The Machinist HD DVD:
3: h264/AVC, 1080p24 /1.001 (16:9) with pulldown flags

This title does not appear to have pulldown flags.
Video is destroyed when removing pulldown with h264info and plays fine at 23.976 fps without.

tebasuna51
5th May 2008, 15:52
Thanks for your new eac3to version.

You includes the -extensible parameter to output wav with the WAVE_FORMAT_EXTENSIBLE header (henceforth WFE).
I like this improvement but I have some comments:
- When use WFE header is mandatory a fix channel order.
- The most useful new data (maybe the unique) is the Channel Mask to specify the channels present in the audiodata.
- When is unknown the channels present in the source is recommended use a default Channel Mask based in the number of channels.
- When we know the source channels the channel mask must be set in accord.

1) ABOUT DEFAULTS

I think the default used in eac3to for 4 channels (0x000F = FL FR FC LF) must be changed for 0x0033 = FL FR BL BR (Quadro) more usual and compatible with Flac/Ogg multichannel.
A WFE wav with maskchannel 0x000F is rejected by flac.

The default used for 8 channel (0x00FF = FL FR FC LF BL BR FLC FRC) is not usual, maybe the default can be 0x063F = FL FR FC LF BL BR SL SR

When I try know the default for 7 channels using a 3/3.1 wav file:
eac3to v2.45
command line: "D:\Test\AudioN\eac3to\eac3to.exe" "E:\Test\7_61.wav" "E:\Test\z331.wav" -extensible
------------------------------------------------------------------------------
WAV, 6.1 channels, 0:00:20, 16 bits, 48khz
Doubling 7th channel...
Reading WAV...
Writing WAV...
Creating file "E:\Test\z331.wav"...
eac3to processing took 1 second.
Done.
For what "Doubling 7th channel..."?
Maybe the default for 7 channel can be: 0x013F = FL FR FC LF BL BR BC

2) ABOUT KNOW SOURCE AC3

At least with ac3 source we can obtain perfect WFE wav output:
acmod.lfe ac3 channels Mask and MS channels ordered Detect-MaskCh eac3to libav remap
------------------------- --------------------------------- --------------------- ------------
1 1/0.0 C 0x0004 FC 1.0 0x0004 ok not needed
1 1/0.1 C LFE 0x000C FC LF 1.1 0x0003 (1)(2) not needed
2 2/0.0 L R 0x0003 FL FR 2.0 0x0003 ok not needed
2 2/0.1 L R LFE 0x000B FL FR LF 2.1 0x0007 (2) not needed
4 2/1.0 L R S 0x0103 FL FR BC 2/1 0x0007 (2) not needed
4 2/1.1 L R S LFE 0x010B FL FR LF BC 2/1.1 0x000F (2)(3) -0,1,3,2,4,5
6 2/2.0 L R SL SR 0x0033 FL FR BL BR 2/2 0x000F (2) not needed
6 2/2.1 L R SL SR LFE 0x003B FL FR LF BL BR 2/2.1 0x0037 (2)(3) -0,1,4,2,3,5
3 3/0.0 L C R 0x0007 FL FR FC 3/0 0x0007 (3) -0,2,1,3,4,5
3 3/0.1 L C R LFE 0x000F FL FR FC LF 3/0.1 0x000F (3) -0,2,1,3,4,5
5 3/1.0 L C R S 0x0107 FL FR FC BC 3/1 0x000F (2)(3) -0,2,1,3,4,5
5 3/1.1 L C R S LFE 0x010F FL FR FC LF BC 3/1.1 0x0037 (2)(3) -0,2,1,4,3,5
7 3/2.0 L C R SL SR 0x0037 FL FR FC BL BR 5.0 0x0037 (3) -0,2,1,3,4,5
7 3/2.1 L C R SL SR LFE 0x003F FL FR FC LF BL BR 5.1 0x003F ok already done

(2) Default mask for channel number, the correct mask can be easyly put based in detection
(3) When decoded with libav need remapping channels.
EDIT: My previous note (1) was:
(1) Wrong detection, must be 1.1 (not important because mono + LFE is really strange).
But is my fault, eac3to detect 1.1 correctly

calinb
5th May 2008, 18:09
At this point in time eac3to is VERY picky about the source material.Indeed! Oftentimes, source that produces the "This track is not clean...Please clean the track with delaycut" error can be processed with eac3to ver. 1.16--after remuxing/joining the .evo(s) with EVOdemux, if necessary.

gregt
5th May 2008, 18:26
I seem to have run into a consistent problem with certain DVDs that are 480i60. The following is an example:
eac3to v2.45
command line: eac3to vts_01_1.vob+vts_01_2.vob+vts_01_3.vob+vts_01_4.vob t.mkv
------------------------------------------------------------------------------
VOB, 1 video track, 3 audio tracks, 3 subtitle tracks, 1:53:11
1: Joined VOB file
2: MPEG2, 480i60 /1.001 (16:9)
3: AC3, 2.0 channels, 192kbit/s, 48khz, dialnorm: -26dB
4: AC3, 2.0 channels, 192kbit/s, 48khz, dialnorm: -25dB
5: AC3, 2.0 channels, 192kbit/s, 48khz, dialnorm: -23dB
6: Subtitle
7: Subtitle
8: Subtitle
[v02] Extracting video track number 2...
[a04] Extracting audio track number 4...
[a05] Extracting audio track number 5...
[v02] Muxing video to Matroska...
[a03] Extracting audio track number 3...
[a05] Removing dialog normalization...
[a04] Removing dialog normalization...
[a03] Removing dialog normalization...
[v02] The MPEG2 stream changed from 60000i to 48000i at runtime 0:00:02.
[s07] Extracting subtitle track number 7...
[s08] Extracting subtitle track number 8...
[s06] Extracting subtitle track number 6...
[a03] Creating file "t - 3 - AC3, 2.0 channels, 192kbps, 48khz.ac3"...
[a04] Creating file "t - 4 - AC3, 2.0 channels, 192kbps, 48khz.ac3"...
[a05] Creating file "t - 5 - AC3, 2.0 channels, 192kbps, 48khz.ac3"...
[s08] Creating file "t - 5 - Subtitle.sup"...
[s06] Creating file "t - 3 - Subtitle.sup"...
[s07] Creating file "t - 4 - Subtitle.sup"...
Added fps value to MKV header.
Video track 2 contains 162910 frames.
eac3to processing took 1 minute, 50 seconds.
Done.

The "stream changed from 60000i to 48000i " is the consistancy. The mkv file produced is jerky during playback and this happens to all that I try to convert where this exact stream change occurs. Is there an option on eac3to that will solve this or is this a bug?

jchappo
5th May 2008, 21:08
Madashi,

Next time I get a Bluray in with LCPM audio, and a DTS-HD track, I will do more testing.

But for now, your assumption is incorrect. All the tracks I am converting are from full length feature films. The TrueHD, DTS-HD, and DD+ tracks come out roughly the same size, between 1 and 3gb depending on movie length. Once uncompressed to WAV, all files are > 4gb, even the TrueHD.

My question is, why do the LPCM tracks that ship with the Blurays work perfectly, while ones converted using eac3to don't? What is difference between the LPCM provided by the movie studio, and the one your program is making? Is there some kind of program I can use to analyze the two LPCM files?

Bascially, I wan't to do something similar listed in this thread:
http://forum.doom9.org/showthread.php?p=968533#post968533

But I want to go from DTS-HD/TrueHD/DD+ to LPCM. Would I use the RAW output option on eac3to, and map the channels like it says in that thread?

nautilus7
5th May 2008, 21:24
Madashi,

Next time I get a Bluray in with LCPM audio, and a DTS-HD track, I will do more testing.

But for now, your assumption is incorrect. All the tracks I am converting are from full length feature films. The TrueHD, DTS-HD, and DD+ tracks come out roughly the same size, between 1 and 3gb depending on movie length. Once uncompressed to WAV, all files are > 4gb, even the TrueHD.

My question is, why do the LPCM tracks that ship with the Blurays work perfectly, while ones converted using eac3to don't? What is difference between the LPCM provided by the movie studio, and the one your program is making? Is there some kind of program I can use to analyze the two LPCM files?It seems that you didn't understand what madshi told you. Read again and tell what movie is that you 're converting. Maybe someone else can try it also.

DeepBeepMeep
5th May 2008, 21:44
Madshi,

When converting a TrueHD track to a DTS track with a multiparts seamless branching .m2ts file, are two passes really needed?

In my example I try to extract two tracks: an AC3 track and a TrueHD track (converted to DTS). Overlap is only detected on the AC3 track, is this normal? If so, could you automate the two passes to avoid calling surcode twice ? In fact, if the second pass was handled directly by EAC3TO you could save a lot of time since the demuxing has been already done.

Thanks for your great tool!

tebasuna51
5th May 2008, 21:45
My question is, why do the LPCM tracks that ship with the Blurays work perfectly, while ones converted using eac3to don't? What is difference between the LPCM provided by the movie studio, and the one your program is making? Is there some kind of program I can use to analyze the two LPCM files?

Like madshi say you the difference in only the header, the LPCM is raw data without header and the length is passed by other method.
The wav file >4GB have a field to inform about the length than must be wrong because have only 4 bytes and the max number is 2^32.

There are soft to manage these big wave files, you can encode to ac3 with Aften -readtoeof 1, or to mp4 with Neroaacenc -ignorelength. You can split, change bitdepth, samplerate, ... with WaveWizard. An also can be managed in AviSynth (BeHappy, SoundOut, Wavi) if you open the file with RaWavSource() method.

You can also convert (SoundOut) the header to w64 (Sonic Foundry, now acquired by Sony) format with fields than support until 2^64 filelength, but not all soft can accept this format.

nautilus7
5th May 2008, 22:12
When converting a TrueHD track to a DTS track with a multiparts seamless branching .m2ts file, are two passes really needed?

In my example I try to extract two tracks: an AC3 track and a TrueHD track (converted to DTS). Overlap is only detected on the AC3 track, is this normal?Yes, it is normal. Overlaps for TrueHD are really small and as a result not often met. If no overlaps are detected for a track, the 2nd pass isn't needed (there's no .gaps file created fo that track).
If so, could you automate the two passes to avoid calling surcode twice?Even if you needed 2 passes in your case, to avoid calling surcode twice (it is very slow), i suggest converting truehd (or whatever) to wav, do the 2nd pass (if needed) and then run a simple command to make the wav 2 dts encoding. This is what i always do when i want to encode to dts. Another good reason for feeding surcode direclty with wav files is to avoid the "surcode button didn't seem to work" error when you specify long filenames/paths as inputs. In that case you won't need to decode the source track twice.

DeepBeepMeep
5th May 2008, 22:23
Nautilus7,

Thans for your answer. I think it would be greatly appreciated anyway to automate the two passs processes since there is little reason why one would not go for the second pass when overlaps are discovered.

tebasuna51
5th May 2008, 22:34
Bascially, I wan't to do something similar listed in this thread:
http://forum.doom9.org/showthread.php?p=968533#post968533

But I want to go from DTS-HD/TrueHD/DD+ to LPCM. Would I use the RAW output option on eac3to, and map the channels like it says in that thread?

You don't need xport, sox, wavewizard or mediacoder, eac3to do all the job.
The 5.1 channels are automatically remapped from LPCM/DTS-HD/TrueHD/DD+
The RAW is the same than the wav if you delete the first 44 bytes.

jchappo
5th May 2008, 23:14
Let me fully explain the problem I have so everyone can understand it better.

The Popcorn hour A-100, is a network media player which can play uncompressed Bluray audio/video. It will accept a M2TS stream and passthrough the LPCM audio to my receiver. Some Bluray movies come with an LPCM audio stream already on them, some do not. For the ones that do not, I want to use eac3to to convert the TrueHD/DTS-HD/DD+ to LCPM so the A-100 can play it. But, I have only been successful with TrueHD so far, both DTS-HD and DD+ produce files that are garbage after the first 20-30% of the movie.

This is the problem. My question is, why can't eac3to produce LPCM files like that ones the movie studio includes on some discs? If I could produce those exact files, then that would be awesome and everything would just work. I am trying to figure out why eac3to is not producing these same files, and how to fix it.

jchappo
5th May 2008, 23:17
Would it help if I posted a sample of a movie studio created LPCM file, and one decoded from a DTS-HD track from eac3to which has garbage audio after 30%?

nautilus7
5th May 2008, 23:40
You keep saying your "problem", but you didn't listen to what madshi already said.

Do a simple test: Instead of making multi channel wav files make mono wavs. (eac3to input.thd/dtshd/eac3/etc output.wavs). Then check the center channel of all tracks. I bet every single one would be fine.

wildchild22
6th May 2008, 00:40
I have the same problem with lpcm as the above poster. What we really need is a program that can accept wavs not an interleaved wav file and mux that with video like scenarist. That way the audio track will be under 4 gigs. either that or maybe madshi could add an option to split the demuxed video and audio file every 30 mins. That way we maybe able to use tsmuxer and append the file and the sound may be correct.

jchappo
6th May 2008, 02:20
nautilis7,

I tried what you said and you are correct. If by dump luck, the TrueHD stream decoded into a working WAV, then why can't I edit the value in the WAV header to make it always work?

I'm just trying to get a working solution to producing working LPCM files.

tebasuna51
6th May 2008, 02:25
I have the same problem with lpcm as the above poster. What we really need is a program that can accept wavs not an interleaved wav file and mux that with video like scenarist. That way the audio track will be under 4 gigs. either that or maybe madshi could add an option to split the demuxed video and audio file every 30 mins. That way we maybe able to use tsmuxer and append the file and the sound may be correct.

Then the problem is in tsmuxer, must accept wav > 4GB or multiple monowavs or w64/RF64 wav headers.

EPiPH0NE
6th May 2008, 08:30
I have the same problem with lpcm as the above poster. What we really need is a program that can accept wavs not an interleaved wav file and mux that with video like scenarist. That way the audio track will be under 4 gigs. either that or maybe madshi could add an option to split the demuxed video and audio file every 30 mins. That way we maybe able to use tsmuxer and append the file and the sound may be correct.

I have already asked madshi about this and have been already trying to do this so I'll let you guys take over. Splitting the M2TS up then processing works for DTS-MA -> WAV but they can't be rejoined at this current time. We DO need to know how to make these files just like the studios are doing cause we are obviously missing something here. Maybe we should do:

eac3to.exe source.m2ts destination.wavs

then use another encoder to make the multi channel PCM/WAV? But, what encoder and what settings and how do we ensure proper LPCM channel configuration?

Beastie Boy
6th May 2008, 08:36
Have you tried

eac3to source.m2ts destination.raw

and then changing the file extention if necessary. Maybe this will get around any incompatabilities with the wav header.

Cheers, Beastie.

madshi
6th May 2008, 08:41
One issue that I am having with DVDs is that the language seems to be missing for audio and subtitles
Just as a quick follow up:

The VOB format allows to have language identifiers inside the VOB stream. If there are any, eac3to will read them and display them. I do have some DVDs where language detection works. However, there are many DVDs where the language information is not contained in the VOB itself, but in the other files (*.IFO, I believe). eac3to currently doesn't parse these files, so the language cannot be displayed in such cases.

The Machinist HD DVD:
3: h264/AVC, 1080p24 /1.001 (16:9) with pulldown flags

This title does not appear to have pulldown flags.
Video is destroyed when removing pulldown with h264info and plays fine at 23.976 fps without.
As far as I know, every single HD DVD movie (regardless of codec) does have pulldown flags. I think it's even a requirement of the HD DVD specification! If video is destroyed when using h264info then that probably indicates a bug in h264info. I'd suggest uploading a little sample and letting the h264info programmer know about the problem. He should be able to easily fix it.

Indeed! Oftentimes, source that produces the "This track is not clean...Please clean the track with delaycut" error can be processed with eac3to ver. 1.16--after remuxing/joining the .evo(s) with EVOdemux, if necessary.
v1.16? :eek: That feels like ages ago...

Can you upload a little sample which works with v1.16 but not with v2.45?

I seem to have run into a consistent problem with certain DVDs that are 480i60. [...] The "stream changed from 60000i to 48000i " is the consistancy. The mkv file produced is jerky during playback and this happens to all that I try to convert where this exact stream change occurs. Is there an option on eac3to that will solve this or is this a bug?
This is why I stated in the v2.45 release notes that I still have to further improve eac3to for MPEG2 clips with such mode changes. For now I recommend to either wait with converting such clips. Or to demux video instead of muxing it to MKV. I'm planning to complete the MPEG2 muxing improvements in the next build, which should then handle such mode changes just fine.

When converting a TrueHD track to a DTS track with a multiparts seamless branching .m2ts file, are two passes really needed?
I cannot do it in one pass. The 2 passes are necessary to even out timecode instabilities.

In my example I try to extract two tracks: an AC3 track and a TrueHD track (converted to DTS). Overlap is only detected on the AC3 track, is this normal?
Yes.

If so, could you automate the two passes
I've already thought about this. Maybe I will.

Do a simple test: Instead of making multi channel wav files make mono wavs. (eac3to input.thd/dtshd/eac3/etc output.wavs). Then check the center channel of all tracks.
Good idea... ;)

What we really need is a program that can accept wavs not an interleaved wav file and mux that with video like scenarist. That way the audio track will be under 4 gigs. either that or maybe madshi could add an option to split the demuxed video and audio file every 30 mins. That way we maybe able to use tsmuxer and append the file and the sound may be correct.
If by dump luck, the TrueHD stream decoded into a working WAV, then why can't I edit the value in the WAV header to make it always work?

I'm just trying to get a working solution to producing working LPCM files.
Then the problem is in tsmuxer, must accept wav > 4GB or multiple monowavs or w64/RF64 wav headers.
I agree with tebasuna51. This is clearly a problem with tsMuxer. So why should I spend hours and hours on adding fancy and complicated features to eac3to just to workaround a simple little "bug" in tsMuxer? Instead you guys should really pester the tsMuxer programmer about adding support for big WAV files and/or for multiple mono WAV files. That will solve all your problems at once and it will furthermore make things much easier for you, as well, cause you won't have to deal with manually splitting and rejoining files, anymore.

madshi
6th May 2008, 08:51
You includes the -extensible parameter to output wav with the WAVE_FORMAT_EXTENSIBLE header (henceforth WFE).
I like this improvement but I have some comments:
- When use WFE header is mandatory a fix channel order.
- The most useful new data (maybe the unique) is the Channel Mask to specify the channels present in the audiodata.
- When is unknown the channels present in the source is recommended use a default Channel Mask based in the number of channels.
- When we know the source channels the channel mask must be set in accord.

1) ABOUT DEFAULTS

I think the default used in eac3to for 4 channels (0x000F = FL FR FC LF) must be changed for 0x0033 = FL FR BL BR (Quadro) more usual and compatible with Flac/Ogg multichannel.
A WFE wav with maskchannel 0x000F is rejected by flac.

The default used for 8 channel (0x00FF = FL FR FC LF BL BR FLC FRC) is not usual, maybe the default can be 0x063F = FL FR FC LF BL BR SL SR

When I try know the default for 7 channels using a 3/3.1 wav file:
eac3to v2.45
command line: "D:\Test\AudioN\eac3to\eac3to.exe" "E:\Test\7_61.wav" "E:\Test\z331.wav" -extensible
------------------------------------------------------------------------------
WAV, 6.1 channels, 0:00:20, 16 bits, 48khz
Doubling 7th channel...
Reading WAV...
Writing WAV...
Creating file "E:\Test\z331.wav"...
eac3to processing took 1 second.
Done.
For what "Doubling 7th channel..."?
Maybe the default for 7 channel can be: 0x013F = FL FR FC LF BL BR BC

2) ABOUT KNOW SOURCE AC3

At least with ac3 source we can obtain perfect WFE wav output:
acmod.lfe ac3 channels Mask and MS channels ordered Detect-MaskCh eac3to libav remap
------------------------- --------------------------------- --------------------- ------------
1 1/0.0 C 0x0004 FC 1.0 0x0004 ok not needed
1 1/0.1 C LFE 0x000C FC LF 2.0 0x0003 (1)(2) not needed
2 2/0.0 L R 0x0003 FL FR 2.0 0x0003 ok not needed
2 2/0.1 L R LFE 0x000B FL FR LF 2.1 0x0007 (2) not needed
4 2/1.0 L R S 0x0103 FL FR BC 2/1 0x0007 (2) not needed
4 2/1.1 L R S LFE 0x010B FL FR LF BC 2/1.1 0x000F (2)(3) -0,1,3,2,4,5
6 2/2.0 L R SL SR 0x0033 FL FR BL BR 2/2 0x000F (2) not needed
6 2/2.1 L R SL SR LFE 0x003B FL FR LF BL BR 2/2.1 0x0037 (2)(3) -0,1,4,2,3,5
3 3/0.0 L C R 0x0007 FL FR FC 3/0 0x0007 (3) -0,2,1,3,4,5
3 3/0.1 L C R LFE 0x000F FL FR FC LF 3/0.1 0x000F (3) -0,2,1,3,4,5
5 3/1.0 L C R S 0x0107 FL FR FC BC 3/1 0x000F (2)(3) -0,2,1,3,4,5
5 3/1.1 L C R S LFE 0x010F FL FR FC LF BC 3/1.1 0x0037 (2)(3) -0,2,1,4,3,5
7 3/2.0 L C R SL SR 0x0037 FL FR FC BL BR 5.0 0x0037 (3) -0,2,1,3,4,5
7 3/2.1 L C R SL SR LFE 0x003F FL FR FC LF BL BR 5.1 0x003F ok already done

(1) Wrong detection, must be 1.1 (not important because mono + LFE is really strange)
(2) Default mask for channel number, the correct mask can be easyly put based in detection
(3) When decoded with libav need remapping channels.
:eek:

That's extremely detailed and helpful information - thanks much!! :)

When I try know the default for 7 channels using a 3/3.1 wav file:
For what "Doubling 7th channel..."?
This is complicated. Let me try to explain: When I tried to convert my "The Descent" Blu-Ray to MKV, I found out that the LPCM track (which was credited as 6.1) was in reality 7.1 with both back channels being identical. I'm not fully sure but I guess that multichannel Blu-Ray LPCM tracks must not be 6.1 but can only be either 5.1 or 7.1. So I thought it'd make sense to convert all 6.1 stuff to 7.1 in eac3to to make it Blu-Ray compatible. Not sure if that is/was the right thing to do. Maybe not...

At least with ac3 source we can obtain perfect WFE wav output: [...]
As your charts clearly show, eac3to currently only handles mono, stereo, 5.1 (and 7.1) correctly. For all other formats eac3to's channel mapping behaviour is more or less "random". The reason for that is that I'm not really having any true channel mapping in my whole processing chain right now. Instead I've hard coded extra code everywhere for the supported channel configurations. This is not good, and I definitely need to change it. It's just that there was always something more important to do first... ;) But I think it might be time now (or soon) to implement "proper" channel mapping support.

BTW, do you have any experience with which WAV format is the more compatible one with most applications/media players? Is it the extensible one or the simpler one? I'm wondering which WAV header format I should make default...

madshi
6th May 2008, 08:55
We DO need to know how to make these files just like the studios are doing cause we are obviously missing something here.
The missing thing is simply that TsMuxer needs to be changed to support either big multichannel WAV files or multiple mono WAV files.

Maybe we should do:

eac3to.exe source.m2ts destination.wavs

then use another encoder to make the multi channel PCM/WAV? But, what encoder and what settings and how do we ensure proper LPCM channel configuration?
That doesn't make any sense at all. Guys, please understand that eac3to is doing all it can. You can try 20 other programs to create the multi channel WAV file and you'll always end up with similar problems. The problem is most probably NOT in eac3to's WAV creation. The problem is in TsMuxer. And unless you get TsMuxer fixed, you can forget about making WAV -> TsMuxer working properly. It's as simple as that.

EPiPH0NE
6th May 2008, 14:46
That doesn't make any sense at all. Guys, please understand that eac3to is doing all it can. You can try 20 other programs to create the multi channel WAV file and you'll always end up with similar problems. The problem is most probably NOT in eac3to's WAV creation. The problem is in TsMuxer. And unless you get TsMuxer fixed, you can forget about making WAV -> TsMuxer working properly. It's as simple as that.


Well if that doesn't make sense then I guess I've hit a brick wall and my axe is dull. I'm taking off the hardhat and I'll let someone else figure it out and in the mean time just use segmented files. I could understand these files not working with tsMuxeR, which I and others have reported it but Roman is not as active here as you, but I can't even get Scenarist to take them either because of improper channel config. What is the proper channel config I need to set in eac3to to get these into Scenarist or will your new "-extensible" option fix this?

madshi
6th May 2008, 14:55
Yeah, the "-extensible" option might things work with Scenarist. Not fully sure though if Scenarist handles big WAV files properly!

EPiPH0NE
6th May 2008, 15:33
Yeah, the "-extensible" option might things work with Scenarist. Not fully sure though if Scenarist handles big WAV files properly!


I would hope a $60,000 muxing app would handle big WAV files properly. It does take WAV as LPCM input so as long as I can get around MUI Generator and actually get the files into Scenarist I think I have a 50/50 shot at actually getting DTS-MA/TrueHD -> LPCM ;) I am re-ripping Hitman for the umpteenth time as we speak and then I'll test it.

jchappo
6th May 2008, 15:39
Hmm, is it not possible to examine one of the studio created LPCM tracks and determine what exactly is making those work?

Edit: From my experience TsMuxer handles the LPCM files that the studio created, because I remux the original M2TS and move the LPCM track to audio track 1.

gregt
6th May 2008, 16:17
Just as a quick follow up:

This is why I stated in the v2.45 release notes that I still have to further improve eac3to for MPEG2 clips with such mode changes. For now I recommend to either wait with converting such clips. Or to demux video instead of muxing it to MKV. I'm planning to complete the MPEG2 muxing improvements in the next build, which should then handle such mode changes just fine.


Ok. No problem. I was just reporting the data for you to use. I have a lot of DVDs for testing.
Here is a new case:
eac3to v2.45
command line: eac3to vts_10_1.vob+vts_10_2.vob 2: sg1sXe16.mkv 3: sg1sXe16.ac3
------------------------------------------------------------------------------
VOB, 1 video track, 1 audio track, 6 subtitle tracks, 0:43:30
1: Joined VOB file
2: MPEG2, 480p30 /1.001 (16:9)
3: AC3, 5.1 channels, 448kbit/s, 48khz, dialnorm: -27dB
4: Subtitle
5: Subtitle
6: Subtitle
7: Subtitle
8: Subtitle
9: Subtitle
[v02] Extracting video track number 2...
[v02] Muxing video to Matroska...
[a03] Extracting audio track number 3...
[a03] Removing dialog normalization...
[v02] The MPEG2 stream changed from 30000p to 24000p at runtime 0:00:01.
[a03] Creating file "sg1sXe16.ac3"...
Added fps value to MKV header.
Video track 2 contains 62598 frames.
eac3to processing took 43 seconds.
Done.

During playback each frame snaps back to the previous one before going on to the next one. Very strange. For some reason not every episode has the "changed from 30000p to 24000p" and the ones that don't play perfectly.

EPiPH0NE
6th May 2008, 16:25
Hmm, is it not possible to examine one of the studio created LPCM tracks and determine what exactly is making those work?

Edit: From my experience TsMuxer handles the LPCM files that the studio created, because I remux the original M2TS and move the LPCM track to audio track 1.

Yes all BluRay LPCM tracks I use are always track 1 in tsMuxeR followed by a secondary AC3/DTS track which necessary for the my target player. But they always work fine. It's just the ones I'm making myself that don't work right.

EPiPH0NE
6th May 2008, 16:28
Ok I just tried this:

eac3to.exe source.m2ts destination.wav -extensible


And this is what I get:

M2TS, 1 video track, 2 audio tracks, 1:34:15
1: Chapters, 25 chapters
2: h264/AVC, 1080p24 /1.001 (16:9)
3: AC3, Spanish, 5.1 channels, 448kbit/s, 48khz, dialnorm: -27dB
4: DTS Master Audio, English, 5.1 channels, 24 bits, 48khz
This audio conversion is not supported.

madshi
6th May 2008, 16:36
Hmm, is it not possible to examine one of the studio created LPCM tracks and determine what exactly is making those work?
How often do I need to explain this? The studio created LPCM track works because it's stored inside of an m2ts container and not inside of the WAV container. If you put the studio created LPCM track into a WAV container, TsMuxer would fail to work correctly, too.

Ok I just tried this:

eac3to.exe source.m2ts destination.wav -extensible

And this is what I get:

M2TS, 1 video track, 2 audio tracks, 1:34:15
1: Chapters, 25 chapters
2: h264/AVC, 1080p24 /1.001 (16:9)
3: AC3, Spanish, 5.1 channels, 448kbit/s, 48khz, dialnorm: -27dB
4: DTS Master Audio, English, 5.1 channels, 24 bits, 48khz
This audio conversion is not supported.
Hmmmm... That's strange. Try "eac3to source.m2ts 4: dest.wav -extensible". Does that work? Or try without "-extensible", then do another pass "eac3to dest.wav dest2.wav -extensible". Does that work?