View Full Version : eac3to - audio conversion tool
piratburner
21st September 2008, 14:52
I'm Intresting to convert TrueHD and DTS-MA to PCM
If using eac3to input.thd output.thd
Is that the correct way to get a prober MultiChanel PCM ? or do I have missed something in the command line ?
I dont want to get a bad track,
Doing this do I got a better soundtrack or should I stay with the original ones ?
So what would the best command be to convert to PCM ?
Have a nice day ALL
Results
[a03] Extracting audio track number 3...
[a03] Extracting TrueHD stream...
[a03] Removing TrueHD dialog normalization...
[a03] Decoding with libav/ffmpeg...
[a03] Swapping endian...
[a03] Creating file "l:\Soundoutput.24bit.pcm"...
[a03] This audio track contains more than 16 bits of information.
Is it not possible to get a 24bit PCM
Is a lot of questions and I hope some one can give me a short Answer :-)
EDIT
One example.... look at the command, to be a good output do I need more commands ?
L:\BT\bd-tg\BDMV\STREAM>eac3to 1)
M2TS, 1 video track, 5 audio tracks, 8 subtitle tracks, 2:57:09
1: Chapters, 23 chapters
2: h264/AVC, 1080p24 /1.001 (16:9)
3: TrueHD/AC3, English, 5.1 channels, 48khz, dialnorm: -27dB
4: AC3, English, 2.0 channels, 192kbps, 48khz, dialnorm: -27dB
5: AC3, French, 5.1 channels, 640kbps, 48khz, dialnorm: -27dB
6: AC3, Spanish, 5.1 channels, 640kbps, 48khz, dialnorm: -27dB
7: AC3, English, 2.0 channels, 192kbps, 48khz, dialnorm: -27dB
8: Subtitle (PGS), English
9: Subtitle (PGS), English
10: Subtitle (PGS), French
11: Subtitle (PGS), Spanish
12: Subtitle (PGS), Portuguese
13: Subtitle (PGS), English
14: Subtitle (PGS), French
15: Subtitle (PGS), Spanish
L:\BT\bd-tg\BDMV\STREAM>eac3to 1) 3: output.pcm
It gives me this info ... Is this right ??
[a03] Extracting audio track number 3...
[a03] Extracting TrueHD stream...
[a03] Removing TrueHD dialog normalization...
[a03] Decoding with libav/ffmpeg...
[a03] Swapping endian...
[a03] Creating file "l:\Soundoutput.24bit.pcm"...
[a03] This audio track contains more than 16 bits of information.
shambles
21st September 2008, 15:56
eac3to v2.64 released
thank you :D
lexor
21st September 2008, 16:05
Lexor,
i don't know even any expensive remuxer which is able to remux HD audio formats with h264 or vc1 videos; do you?
I know of Manzanita MP2TSME (http://lilapple.com/mp2tsme.html) (there are also MS/MM versions of it, they are useless for us without h264 support), but it must cost a metric shit-ton, since I can't even find a price for it. It does offer a full featured demo on their site, so you can try everything, but output file will be limited to 10 sec.
And a request for eac3to, if I may. Can we get something like .ini file, so we can specify a few paths to nero aac encoder and mkvtoolnix? First one I have to move into the folder every time I update eac3to, and I don't use installer for the second, so it's "unavailable".
rica
21st September 2008, 16:41
I know of Manzanita MP2TSME (http://lilapple.com/mp2tsme.html) (there are also MS/MM versions of it, they are useless for us without h264 support), but it must cost a metric shit-ton, since I can't even find a price for it. It does offer a full featured demo on their site, so you can try everything, but output file will be limited to 10 sec.
Thanks, but VC1 support is still missing?
madshi
21st September 2008, 16:58
One example.... look at the command, to be a good output do I need more commands ?
L:\BT\bd-tg\BDMV\STREAM>eac3to 1) 3: output.pcm
It gives me this info ... Is this right ??
Yes, that's just right if you want to get PCM. However, PCM in itself is not very useful. You may want to convert to WAV, FLAC, AC3, AAC or DTS instead. Or, if you plan to mux the PCM track to m2ts again, you may want to check out Pcm2Tsmu + tsMuxeR.
Can we get something like .ini file, so we can specify a few paths to nero aac encoder and mkvtoolnix? First one I have to move into the folder every time I update eac3to, and I don't use installer for the second, so it's "unavailable".
Sorry, but I don't want to add an ini file right now. IIRC you can copy the NeroAAC exe to the system32 folder. And mkvtoolnix is not used by eac3to at all. eac3to just checks whether there's a new version available, that's it. So it's not a big loss if eac3to doesn't find mkvtoolnix.
tebasuna51
21st September 2008, 19:58
eac3to v2.64 released
* changed 5.x channel mask from $03x to $60x
I think is a bad idea. We will see in the future ...
* changed 6.x channel mask from $13x to $70x
I think is a wrong idea. At least you need remap the output from ArcSoft decoder with DTS-ES discrete. I think the DTS Hi-Res, 6.1 channels also need the remap.
* when transcoding 6.1 sources to PCM, 7th channel doubling is activated now
If is automatically activated you need recover the
-no7doubling parameter.
or let the doubling optional using the active parameter
-double7
Nullity
21st September 2008, 20:13
How did you rule that out?
I as able to rule them out because I never got to those steps. I only ever used eac3to. However, it doesn't really matter because...
Does GraphStudio support raw PCM files in the first place? If you want to check whether eac3to is doing everything correctly or not you should ask eac3to to convert the PCM file to WAV (if it's smaller than 2GB) or FLAC (if it's bigger than 2GB) and then try to play that.
I did this test as you suggested by converting the PCM file to FLAC, and it played fine. So, I ran it through pcm2tsmu and then muxed it with the video stream in TsMuxer to m2ts. As I suspected, playing it back on my PC results in just static for audio. However, I tested playing it on my PS3 anyway, and it worked fine!
So it seems that you were correct about GraphStudio, I was not able to get raw PCM to play back correctly on my PC, but the PS3 can handle it fine.
I apologize for the confusion though, I wasn't exactly blaming eac3to. The main point of my previous post was just to show that the problem was not with pcm2tsmu or tsmuxer. But as it turns out, it wasn't eac3to either, just my PC.
I also want to thank you for the development of eac3to, it is definitely the best software of its kind!
Lastly, does anyone know how I can play back raw PCM files on my PC? If anyone wishes to respond, you're welcome to PM me, as I know this subject isn't on topic. Thanks!
madshi
21st September 2008, 20:44
I think is a bad idea. We will see in the future ...
Any other suggestions? Do you agree that $603 is the proper value? As you can see here:
http://msdn.microsoft.com/en-us/library/aa474707.aspx
Microsoft wants 5.1 by default to map to "FL, FR, FC, LFE, SL, SR". And IMHO that's the correct mapping. Do you disagree?
I guess that there might be some trouble. Maybe some applications will complain because they expect $3f. But should I output a wrong mask just because some apps expect a wrong value? I don't like to behave like that...
I think is a wrong idea. At least you need remap the output from ArcSoft decoder with DTS-ES discrete.
Yes, you're right about the remapping, forgot about that. But why do you think that is the wrong idea? For people who do have a 6.1 speaker setup, there's one rear speaker and two side speakers. So using $13f is clearly wrong. Or do you disagree?
If is automatically activated you need recover the -no7doubling parameter. or let the doubling optional using the active parameter -double7
The idea of the "pcm" output is to produce a Blu-Ray compatible PCM stream, similar to what e.g. xport demuxes. But the Blu-Ray spec clearly doesn't allow a 6.1 channel configuration for PCM. So what sense does it make to offer a 6.1 PCM output option?
xkodi
21st September 2008, 20:46
eac3to v2.64 released
* changed 5.x channel mask from $03x to $60x
I think is a bad idea. We will see in the future ...
look at the Microsoft document "Audio Driver Support for Home Theater Speaker Configurations":
http://xkodi.svobodno.com/SpkrConfig5.rar
currently, the only valid channel mask for 5.1 channels is 0x3f.
madshi
21st September 2008, 21:10
look at the Microsoft document "Audio Driver Support for Home Theater Speaker Configurations":
http://xkodi.svobodno.com/SpkrConfig5.rar
currently, the only valid channel mask for 5.1 channels is 0x3f.
Thanks, that a good document. However, I'm not sure if I interpret it to say that 0x3f is the only valid channel mask. The document contains this paragraph:
"In Windows XP with SP2 and Windows Server 2003 with SP1, if the system mixer produces a 5.1-channel output stream, the mixer always sets the stream's channel mask to 0x3F. The system mixer behaves this way even if it receives a 5.1-channel input stream with a channel mask of 0x60F."
So clearly the system mixer supports receiving a 0x60f channel mask.
Fortunately the document contains a Microsoft email address for questions about this topic. I'll write to that address and ask for clarification - also about 6.1.
lexor
21st September 2008, 21:17
The idea of the "pcm" output is to produce a Blu-Ray compatible PCM stream, similar to what e.g. xport demuxes. But the Blu-Ray spec clearly doesn't allow a 6.1 channel configuration for PCM. So what sense does it make to offer a 6.1 PCM output option?
For re-encoding to dts/ac3? But then I think I'd rather have 5.1 option, since people who don't have receivers to accept a lossless 7.1 probably also don't have 7.1 or 6.1 speakers.
xkodi
21st September 2008, 21:21
However, I'm not sure if I interpret it to say that 0x3f is the only valid channel mask.
Microsoft's explanation:
According to the bit definitions in Figure 3, the channel mask for recording the 5.1 stream shown on the left side of Figure 5 should be 0x60F, which assigns the six channels to the following speaker positions: FL, FR, FC, LFE, SL, and SR. (This is the side-speaker 5.1 configuration discussed earlier.) In fact, the channel mask for the 5.1 stream is 0x3F rather than 0x60F for reasons that were mentioned previously and will now be explained in detail.
In earlier versions of Windows (Windows 98/Me, Windows 2000, Windows XP with SP1, and Windows Server 2003), the interpretation of the channel mask 0x3F is that it assigns the six channels in the 5.1 format to the following speaker positions: FL, FR, FC, LFE, BL, and BR. (This is the back-speaker 5.1 configuration.) However, the interpretation in Windows XP with SP2, Windows Server 2003 with SP1, and Windows Vista is different: by convention, the 5.1 format with the channel mask 0x3F is interpreted to mean the side-speaker 5.1 configuration instead of the back-speaker 5.1 configuration.
Interpreting the channel mask in this manner eliminates the requirement to introduce a second 5.1-channel format descriptor to distinguish the side-speaker 5.1 configuration from the back-speaker 5.1 configuration. These two configurations are so similar that typical users might have difficulty distinguishing between them. Although having only a single 5.1-channel format descriptor avoids confusing users, it does require hardware vendors to remember to interpret the 0x3F channel mask to mean that channels 5 and 6 are assigned to the SL and SR speaker positions instead of the BL and BR positions. In return for having to remember this special-case interpretation of the channel mask for a 5.1 stream, vendors can spare users the difficulty of distinguishing between two very similar 5.1-channel format descriptors.
that give me the impression that the mask is always 0x3f.
madshi
21st September 2008, 21:35
Microsoft's explanation:
Interpreting the channel mask in this manner eliminates the requirement to introduce a second 5.1-channel format descriptor
that give me the impression that the mask is always 0x3f.
"eliminates the requirement to" doesn't equal "disallows the option to". But let's wait what Microsoft says. I've asked them a number of funny questions... :)
For re-encoding to dts/ac3?
Why would you ask eac3to to export to PCM if you want to reencode to DTS/AC3? That doesn't make much sense to me. If you want to reencode to DTS/AC3, you should either ask eac3to to do that directly for you. Or alternatively you could ask eac3to to output to WAV or AGM and then use an external AC3/DTS encoder. I'm not aware of any DTS/AC3 encoder which would accept a Blu-Ray style PCM file with the Blu-Ray channel ordering and handle that correctly.
lexor
21st September 2008, 21:42
Why would you ask eac3to to export to PCM if you want to reencode to DTS/AC3? That doesn't make much sense to me. If you want to reencode to DTS/AC3, you should either ask eac3to to do that directly for you. Or alternatively you could ask eac3to to output to WAV or AGM and then use an external AC3/DTS encoder. I'm not aware of any DTS/AC3 encoder which would accept a Blu-Ray style PCM file with the Blu-Ray channel ordering and handle that correctly.
Sorry, I got lost in what we were talking about. I was thinking wav all the time.
DeepBeepMeep
21st September 2008, 22:25
It seems that last version of EAC3TO has broken DTS encoding with surcode. I get the following:
C:\EAC3TO>eac3to "f:\dir" 1) 2: d:\file.mkv 4: d:\file.dts 5: d:\file.ac3 -keepdialnorm
...
[a04] Extracting audio track number 4...
[v02] Extracting video track number 2...
[a05] Extracting audio track number 5...
[a04] Extracting TrueHD stream...
[a04] Removing TrueHD dialog normalization...
[a04] Decoding with libav/ffmpeg...
[a04] Writing WAVs...
[v02] Muxing video to Matroska...
[a04] Creating file "d:\file.L.wav"...
[a04] Creating file "d:\file.R.wav"...
[a04] Creating file "d:\file.LFE.wav"...
[a04] Creating file "d:\file.BR.wav"...
[a04] Creating file "d:\file.BL.wav"...
[a04] Creating file "d:\file.C.wav"...
[a05] Creating file "d:\file.ac3"...
[libav] End of stream indicated
[a04] This audio track has a constant bit depth of 16 bits.
Encoding DTS <1536kbps> with Surcode...
Found Surcode DTS Encoder version 1.0.23.0.
Surcode says/asks: "Invalid Wave File d:\file.SL.wav.".
Surcode says/asks: "Invalid Wave File d:\file.SR.wav.".
Surcode says/asks: "Source file sample rates differ from encoding sample rate.
Cannot encode.".
Pressing the Surcode "Encode" button didn't seem to work...
Closing Surcode...
Fer
21st September 2008, 22:41
Great job madshi!
Where is on the to-do list the cross conversion between 23.976 and 24.000?
:thanks::thanks::thanks:
tebasuna51
21st September 2008, 23:24
Any other suggestions? Do you agree that $603 is the proper value? As you can see here:
http://msdn.microsoft.com/en-us/library/aa474707.aspx
Microsoft wants 5.1 by default to map to "FL, FR, FC, LFE, SL, SR". And IMHO that's the correct mapping. Do you disagree?
In the MS page I only see the 0x3F Channel Mask before and after XP SP2. Never recommend 0x603, I only see: when receive a 0x3F channel mask, and we have a system with Side and Back channels, send the output to "FL, FR, FC, LFE, SL, SR"
I guess that there might be some trouble. Maybe some applications will complain because they expect $3f. But should I output a wrong mask just because some apps expect a wrong value? I don't like to behave like that...
For what is wrong $3f? Must be accepted by old and new soft, then is the best value to use without problems.
The Surround channels (110-120º) aren't the Side (90º) or Back (150º) channels, also $603 is wrong.
Yes, you're right about the remapping, forgot about that. But why do you think that is the wrong idea? For people who do have a 6.1 speaker setup, there's one rear speaker and two side speakers. So using $13f is clearly wrong. Or do you disagree?
We can think than a 6.1 is 3 front speakers and 3 back speakers
FL-FR-FC (LF) BL-BR-BC. Isn't a name question is the channel order here
The idea of the "pcm" output is to produce a Blu-Ray compatible PCM stream, similar to what e.g. xport demuxes. But the Blu-Ray spec clearly doesn't allow a 6.1 channel configuration for PCM. So what sense does it make to offer a 6.1 PCM output option?
Only by coherence. Please, only recover the -no7doubling parameter.
rica
21st September 2008, 23:32
Hi guys, thanks for all those technical discussions since they will make SW better but as far as i remember somebody suggested some time ago opening a new thread on developing eac3to?
rica
22nd September 2008, 01:58
Is anybody who knows making it in a more practical way ? :eek:
F:\>eac3to\eac3to.exe 00000.m2ts+00001.m2ts+00002.m2ts+00006.m2ts+00007.m2ts+00008.m2ts+00009.m2ts+00010.m2ts+00011.m2ts+00012.m2ts+00013.m2ts+00014.m2ts+00015.m2ts+00016.m2ts
+00017.m2ts+00018.m2ts+00019.m2ts+00020.m2ts+00021.m2ts+00022.m2ts+00024.m2ts+00025.m2ts+00026.m2ts+00027.m2ts+00028.m2ts+00032.m2ts+00033.m2ts+00034.m2ts+00036.m2ts+00037.m2ts
+00038.m2ts+00039.m2ts+00040.m2ts+00041.m2ts+00042.m2ts+00043.m2ts+00044.m2ts+00045.m2ts+00046.m2ts+00047.m2ts
1: E:\output\video.h264 2: E:\output\audiothd.thd+ac3 3: E:\output\audiodts.dtshd 4: E:\output\subtitle_en.sup 23: E:\output\subtitle_tr.sup
M2TS, 1 video track, 2 audio tracks, 20 subtitle tracks, 2:39:54
1: h264/AVC, 1080p24 /1.001 (16:9)
2: TrueHD/AC3, 5.1 channels, 48khz
3: DTS Master Audio, 5.1 channels, 24 bits, 48khz
4: Subtitle (PGS)
********
23: Subtitle (PGS)
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a03] Extracting audio track number 3...
[s04] Extracting subtitle track number 4...
[s23] Extracting subtitle track number 23...
[v01] Creating file "E:\output\video.h264"...
[a03] Creating file "E:\output\audiodts.dtshd"...
[a02] Creating file "E:\output\audiothd.thd+ac3"...
[s04] Creating file "E:\output\subtitle_en.sup"...
[s23] Creating file "E:\output\subtitle_tr.sup"...
-------------------------------------
rica
22nd September 2008, 02:26
The rest of the log; what should i do now?
Please don't tell me this:
Please rerun the same eac3to command line. That will correct the gaps/overlaps.
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a03] Extracting audio track number 3...
[s04] Extracting subtitle track number 4...
[s23] Extracting subtitle track number 23...
[v01] Creating file "E:\output\video.h264"...
[a03] Creating file "E:\output\audiodts.dtshd"...
[a02] Creating file "E:\output\audiothd.thd+ac3"...
[s04] Creating file "E:\output\subtitle_en.sup"...
[s23] Creating file "E:\output\subtitle_tr.sup"...
[a02] Audio overlaps for 5ms at playtime 0:46:24.
[a02] Audio overlaps for 5ms at playtime 1:28:23.
[a02] Audio overlaps for 5ms at playtime 2:33:42.
[a02] The audio gaps/overlaps technically can't be removed from the TrueHD bitstream.
[a02] In order to remove them you'll have to transcode the audio to another format.
[a03] Audio overlaps for 12ms at playtime 0:17:55.
[a03] Audio overlaps for 6ms at playtime 0:26:28.
[a03] Audio overlaps for 10ms at playtime 0:28:43.
[a03] Audio overlaps for 6ms at playtime 0:31:42.
[a03] Audio overlaps for 8ms at playtime 0:32:19.
[a03] Audio overlaps for 13ms at playtime 0:37:23.
[a03] Audio overlaps for 10ms at playtime 0:38:37.
[a03] Audio overlaps for 6ms at playtime 0:42:03.
[a03] Audio overlaps for 6ms at playtime 0:45:20.
[a03] Audio overlaps for 7ms at playtime 0:50:38.
[a03] Audio overlaps for 7ms at playtime 0:54:43.
[a03] Audio overlaps for 13ms at playtime 0:58:37.
[a03] Audio overlaps for 11ms at playtime 1:04:12.
[a03] Audio overlaps for 9ms at playtime 1:17:40.
[a03] Audio overlaps for 12ms at playtime 1:26:10.
[a03] Audio overlaps for 7ms at playtime 1:32:06.
[a03] Audio overlaps for 10ms at playtime 1:34:01.
[a03] Audio overlaps for 7ms at playtime 1:35:03.
[a03] Audio overlaps for 6ms at playtime 1:36:00.
[a03] Audio overlaps for 6ms at playtime 1:40:20.
[a03] Audio overlaps for 10ms at playtime 1:43:08.
[a03] Audio overlaps for 9ms at playtime 1:55:53.
[a03] Audio overlaps for 7ms at playtime 1:56:38.
[a03] Audio overlaps for 9ms at playtime 1:57:12.
[a03] Audio overlaps for 10ms at playtime 2:33:42.
[a03] The audio file was demuxed without making use of the gap/overlap information.
[a03] Please rerun the same eac3to command line. That will correct the gaps/overlaps.
Video track 1 contains 230070 frames.
eac3to processing took 3 hours, 13 minutes.
Done.
And this is what i had at the end of the process:
http://img218.imageshack.us/img218/9352/000jf9.th.png (http://img218.imageshack.us/my.php?image=000jf9.png)http://img218.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
_ _ _ __
Duppie
22nd September 2008, 06:36
Here are the results of my tests conducted over the weekend as well as the solution to my post.
http://forum.doom9.org/showpost.php?p=1185710&postcount=6251
The source I tested was BR "I am Legend" with a TrueHD track of 16bit. When I used eac3to 2.57 I also used the Pcm2Tsmu version 1.2 and the command for Pcm2Tsmu was input.pcm output.pcm with no parameters. This worked eventhough the default for Pcm2Tsmu in bit depth is 24 bits. With my tests conducted with eac3to version 2.63 the above did not work until I added the parameter -i 16 for Pcm2Tsmu. So to conclude. Eac3to and Pcm2Tsmu are not at fault and to correctly produce PCM files always use parameters for Pcm2Tsmu.
I see this was also mentioned by tebasuna51 over the weekend.
Hope it helps and clear this issue
Duppie
nautilus7
22nd September 2008, 06:38
@ rica
2 hints:
* proper way of doing these blu-ray discs is eac3to "folder" 1)
* if you press the upper arrow key the last command is shown again
madshi
22nd September 2008, 07:14
In the MS page I only see the 0x3F Channel Mask before and after XP SP2. Never recommend 0x603, I only see: when receive a 0x3F channel mask, and we have a system with Side and Back channels, send the output to "FL, FR, FC, LFE, SL, SR"
For what is wrong $3f? Must be accepted by old and new soft, then is the best value to use without problems.
The Surround channels (110-120º) aren't the Side (90º) or Back (150º) channels, also $603 is wrong.
I'll wait what MS replies about 0x3f vs. 0x60f.
But have you read the document posted by xdoki? The graphics in that document clearly show that Microsoft wants the side speakers to be used for 5.1. So $60f would definitely be the correct value, cause $600 references the side speakers while $30 references BL/BR.
We can think than a 6.1 is 3 front speakers and 3 back speakers FL-FR-FC (LF) BL-BR-BC. Isn't a name question is the channel order here
Have you ever seen a real 6.1 speaker setup? Nobody in the world sets up 3 rear speakers and no side speakers. So BL-BR-BC is as wrong as can be.
Also: What about 5.0? Microsoft has special cased 0x3f. Ok, so for 5.1 we could use 0x3f. But MS has *not* special cased 0x37! So 0x37 still references the back channels, which is wrong. So using 0x37 would be wrong for 5.0. We have to use 0x607 to reference the side speakers (which is what MS wants). What about 2/2.0 and 2/2.1? Again 0x33 and 0x3b are very clearly wrong and we must use 0x603 and 0x60b instead.
Only by coherence. Please, only recover the -no7doubling parameter.
Then tell me into which channel order 6.1 PCM has. 5.1 PCM and 7.1 PCM have a very specific channel order (which is used on Blu-Ray). When outputting 5.1 PCM and 7.1 PCM eac3to remaps the channels into this specific Blu-Ray channel order. But Blu-Ray doesn't know 6.1 PCM. So what channel order should I be using for 6.1 PCM?
I think this question shows that outputting 6.1 PCM does not really make sense. Coherence could only be achieved if there was a specific 6.1 PCM channel mapping known. But it isn't known. Of course I could simply use the WAV channel ordering. But that wouldn't be coherent to how 5.1 and 7.1 PCM export is done, either.
Thoughts?
madshi
22nd September 2008, 07:29
In the MS page I only see the 0x3F Channel Mask before and after XP SP2. Never recommend 0x603, I only see: when receive a 0x3F channel mask, and we have a system with Side and Back channels, send the output to "FL, FR, FC, LFE, SL, SR"
For what is wrong $3f? Must be accepted by old and new soft, then is the best value to use without problems.
The Surround channels (110-120º) aren't the Side (90º) or Back (150º) channels, also $603 is wrong.
Just got a reply from Microsoft. Here's what they're saying:
As of XPSP2, the recommended 5.1 and 7.1 channel masks include the side speakers rather than the back speakers.
I don't know what the 6.1 situation is.
See ksmedia.h in the SDK - you want the _SURROUND masks.
#define KSAUDIO_SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
#define KSAUDIO_SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER)
#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
#define KSAUDIO_SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
#define KSAUDIO_SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
// The following are obsolete 5.1 and 7.1 settings (they lack side speakers). Note this means
// that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are
// similarly obsolete but are unchanged for compatibility reasons).
#define KSAUDIO_SPEAKER_5POINT1_BACK KSAUDIO_SPEAKER_5POINT1
#define KSAUDIO_SPEAKER_7POINT1_WIDE KSAUDIO_SPEAKER_7POINT1
#endif // XP SP2 and later (chronologically)
If I follow what MS just replied then I end up with 0x60f and not with 0x3f (!). I've asked for further clarification, as this seems to slightly contradict the doc that xkodi uploaded. Specifically the doc says that MS wanted to avoid having two different channel masks for 5.1. But that is exactly what ksmedia.h now contains. KSAUDIO_SPEAKER_5POINT (0x3f) is considered obsolete. And KSAUDIO_SPEAKER_5POINT1_SURROUND (0x60f) is considered the right mask to use, according to the latest ksmedia.h.
It seems that last version of EAC3TO has broken DTS encoding with surcode. I get the following:
C:\EAC3TO>eac3to "f:\dir" 1) 2: d:\file.mkv 4: d:\file.dts 5: d:\file.ac3 -keepdialnorm
Surcode says/asks: "Invalid Wave File d:\file.SL.wav.".
Surcode says/asks: "Invalid Wave File d:\file.SR.wav.".
Now that is strange. I'll look into this.
Where is on the to-do list the cross conversion between 23.976 and 24.000?
The to-do list is not sorted in any way... :)
EPiPH0NE
22nd September 2008, 07:36
Nobody in the world sets up 3 rear speakers and no side speakers.
Not true. My brother-in-law has his set up like this cause the way the room is set up there is no space for sides, just rears. Mine is similar but I have room for sides and actually pre-wired for them but my room is 5.1 set up backwards from previous tenant so I just use have speaker stands all the way at each rear end of my couch with the speakers tilted toward the center of the room.:
^ *^
/ \
madshi
22nd September 2008, 07:52
Not true. My brother-in-law has his set up like this cause the way the room is set up there is no space for sides, just rears. Mine is similar but I have room for sides and actually pre-wired for them but my room is 5.1 set up backwards from previous tenant so I just use have speaker stands all the way at each rear end of my couch with the speakers tilted toward the center of the room.
Well, ok. So nobody who has the space for side/surround speakers and knows what he's doing sets up 3 rear speakers and no side/surround speakers.
:)
K1ngp1ng
22nd September 2008, 09:18
dolby recommends 90°-110° for both 5.1 and 7.1, while ITU rec. is 110°.
also, when upmixing 5.1 to 6.1 or 7.1 (with pl2x), back srds on the stereobasis between the srds are beeing extracted,
but that wouldn't move the srds from 110° to the side.
in practice there is no difference between srd and side srd. that beeing said, i don't know about this channel masking thing.
concerning 6.1 to flac:
could you please!! add this -double7 feature to madflac.
flac is not that efficient and doing this on the fly seems to be a much more elegant way instead of wasting space.
also, this way the soundtrack could be stored bit-perfect without alteration.
tebasuna51
22nd September 2008, 11:29
...
could you please!! add this -double7 feature to madflac.
flac is not that efficient and doing this on the fly seems to be a much more elegant way instead of wasting space.
also, this way the soundtrack could be stored bit-perfect without alteration.
I think this is the right way.
The sounds must be adapted to the speakers system at play time, never before encode.
madshi
22nd September 2008, 12:07
I think this is the right way.
The sounds must be adapted to the speakers system at play time, never before encode.
Agreed. But that only works if the storage format supports the channel configuration you're looking for... :) If it doesn't, you either have to use a different storage format or convert the channels.
Anyway, madFlac should (and will) be updated. Sooner or later...
tebasuna51
22nd September 2008, 12:24
...
What about 2/2.0 and 2/2.1? Again 0x33 and 0x3b are very clearly wrong and we must use 0x603 and 0x60b instead.
I can't believe. The quadraphonic sound (http://en.wikipedia.org/wiki/Quadraphonic) was intended to use the four room corners (45º, 135º, ...), clearly the Back channels.
This is the origin of Back channels, and not the absurd BC (180º) from 6.1 or the BL-BR together (179º-181º) like some DTS configs recommend for 7.1. I don't have ears in the nape.
I'm not interested in 6.1 or 7.1 systems. I think a 5.1 system is enough to represent the surround sound (also exist 3D sounds for headphones!) in standard living rooms. More sophisticated systems are only for audiophiles with dedicated rooms or a way to spend money.
This is your tool and you decide. I only warn about possible problems.
And thanks for your job. :)
madshi
22nd September 2008, 13:51
I can't believe. The quadraphonic sound (http://en.wikipedia.org/wiki/Quadraphonic) was intended to use the four room corners (45º, 135º, ...), clearly the Back channels.
But then why do both DTS and AC3 define 2/2 as being intended for the side/surround speakers? Ok, AC3 only knows 5.1, so that's not fair. But DTS knows both surround speakers and back/rear speakers - and still DTS defines 2/2 as being intended for the surround speakers.
I've asked Microsoft about 2/2 channel mask, but the person who replied to me couldn't even give me an advice which 6.1 channel mask to use, let alone 2/2.
I'm not interested in 6.1 or 7.1 systems. I think a 5.1 system is enough to represent the surround sound (also exist 3D sounds for headphones!) in standard living rooms.
You can read in xkodi's doc that the MS system mixer simply drops the back channels when playing a 7.1 source on a 5.1 speaker setup. So in other words it seems that the MS system mixer drops any channels for which it doesn't find a directly matching speaker. That means, if I use the channel mask 0x13f for a 6.1 source with a 5.1 speaker setup, it's quite possible that the system mixer will drop all 3 back channels and leave the surround channels empty. That's one of the reasons why I prefer to use 0x70f. Besides, it's just more correct, too, IMHO.
This is your tool and you decide. I only warn about possible problems.
Yes, and I appreciate that. And I'm willing to continue discussing. I like discussions. I like people not agreeing with me and defending their opinion. Because sometimes only such discussions can end up in a better end result. But I need to be convinced to change my opinion.
madshi
22nd September 2008, 17:26
Another reply from Microsoft:
I notice the white paper [1] also doesn't mention the new _5POINT1_SURROUND constant at all; and yet the constant now exists. Perhaps it was introduced after the white paper was authored. 0x60F should be correct, and 0x3f is only for backcompat.
For 6.1 I agree that 0x70F is correct although 0x13f might be grandfathered in.
What is 2/2? Is it similar to _QUAD?
#define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
So the document posted by xdoki seems to be outdated. 0x60f is the correct mask to use for 5.1 and 0x70f is the correct mask to use for 6.1. That's according to Microsoft.
Still open for discussion seems to be 2/2. Microsoft evidently has a KSAUDIO_SPEAKER_QUAD constant which uses the back channels instead of the surround channels. BUT Microsoft does not have a comparable constant for 2/2.1. Also the DTS spec uses the surround channels instead of the back channels. I guess that might have to do with DTS being more of a home theater format and less of a music format? I mean 2/2 can be seen as Quadraphonic. But it can also be seen as 5.0 with the center channel missing. DTS seems to prefer the latter interpretation.
So which channel mask should eac3to use for 2/2 and 2/2.1 formats? Should it reference the surround channels or the back channels?
Comments?
Inventive Software
22nd September 2008, 18:00
Consider that Quadrophonic 4 or 4.1 was around before 5.1 really took off, so on that basis I think it'd be the back channels, but realistically I'd expect it to change between sources. 4 / 4.1 channels I think would be FL,FR,(LFC),BL,BR.
Atak_Snajpera
22nd September 2008, 18:01
Madshi could you add switch something like "-Automatically repeat audio demuxing if gaps are detected"?
K1ngp1ng
22nd September 2008, 18:31
So which channel mask should eac3to use for 2/2 and 2/2.1 formats? Should it reference the surround channels or the back channels?
there is only one valid multichannel setup which is described in ITU-R BS.775-1.
so 2/2/1 should be treated like 3/2/1 without center.
page 12: http://www.tonmeister.de/foren/surround/texte/SSF_01_1_E_2002_v2a.PDF
fib0by
22nd September 2008, 18:40
Madshi could you add switch something like "-Automatically repeat audio demuxing if gaps are detected"?
I wouldn't mind if that was the default behavior, unless there's something non-obvious which would make that not the best choice.
EPiPH0NE
22nd September 2008, 19:04
Madshi could you add switch something like "-Automatically repeat audio demuxing if gaps are detected"?
Eac3to_and_More_GUI does this but it would be nice to have it built-in to eac3to.
fib0by
22nd September 2008, 19:32
Eac3to_and_More_GUI does this but it would be nice to have it built-in to eac3to.
Actually, I either run it manually, or from a small Bash script that I put together one evening (running under Cygwin on Windows, since I'm too lazy to learn Windows scripting). It provides all I need in terms of demuxing.
When people use your command-line application directly (manually), you know you're doing something right. :) Good job, madshi.
xkodi
22nd September 2008, 20:22
Another reply from Microsoft:
I notice the white paper [1] also doesn't mention the new _5POINT1_SURROUND constant at all;...
i assume that "white paper [1]" is the SpkrConfig5.doc and if so this isn't true at all, because KSAUDIO_SPEAKER_5POINT1_SURROUND is equal to 0x60F and that number is all over the document.
actually, AFAIU the paper states that with WinXP SP2 0x60F is always changed to 0x3F (on the fly from the kernel mixer).
Another reply from Microsoft:
...and yet the constant now exists. Perhaps it was introduced after the white paper was authored. ...
in the "Windows Driver Development Kit" (DDK) there is a sample of simple WDM audio driver and that sample contains "KSAUDIO_SPEAKER_5POINT1_SURROUND", but according to the copyright notice it's from year 2000. the SpkrConfig5.doc is from year 2006.
also, AFAIU SpkrConfig5.doc states that before WinXP SP2, there are 0x3F and 0x60F.
so, i can't see why 0x60F is newer than 0x3F, i.e. defined later than 0x3F.
Another reply from Microsoft:
... 0x60F should be correct, and 0x3f is only for backcompat. So the document posted by xkodi seems to be outdated.
because of the comments i made above i'm not so sure that these statement are correct.
the whole channel mask thing is a huge mess.
and what about if we look to the problem from the WDM audio driver point of view:
what will happen if the WDM audio driver knows about 0x60F, but doesn't know about 0x3f, which is the case with the MS sample driver from 2000, then maybe 0x3f won't work correctly and if the real WDM audio drivers are based on the old sample then that will explain why 0x60f is more better than 0x3f, but it doesn't make it more right.
EPiPH0NE
22nd September 2008, 20:56
Actually, I either run it manually, or from a small Bash script that I put together one evening (running under Cygwin on Windows, since I'm too lazy to learn Windows scripting). It provides all I need in terms of demuxing.
When people use your command-line application directly (manually), you know you're doing something right. :) Good job, madshi.
I run it manually sometimes but usually use the GUI and most people are too lazy to hit ^ -> ENTER so including a repeat switch would be ideal.
rica
22nd September 2008, 21:39
Madshi could you add switch something like "-Automatically repeat audio demuxing if gaps are detected"?
One of the best feature requests i've heard after my last night trial :)
(Btw, TrueHD gaps can not be repaired :eek: )
rica
22nd September 2008, 22:37
Second pass:
Audio gap description file detected, can't be used for TrueHD/MLP, though.
Audio gap description file detected, will be used for processing...
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a03] Extracting audio track number 3...
[a03] Realizing DTS gaps...
[v01] Creating file "E:\output\video.h264"...
[a03] Creating file "E:\output\audiodts.dtshd"...
[a02] Creating file "E:\output\audiothd.thd+ac3"...
[a02] Audio overlaps for 5ms at playtime 0:46:24.
[a02] Audio overlaps for 5ms at playtime 1:28:23.
[a02] Audio overlaps for 5ms at playtime 2:33:42.
[a02] The audio gaps/overlaps technically can't be removed from the TrueHD bitstream.
[a02] In order to remove them you'll have to transcode the audio to another format.
Video track 1 contains 230070 frames.
eac3to processing took 31 minutes, 57 seconds.
Done.
The question here is:
Shall i re-encode to another format after or before merging?
_ _ _ _ _
Henry The Ripper
23rd September 2008, 16:47
@Madshi
The TrueHD to DTS isn't working in the 2.64 version. 2.60 that I have works fine.
The new version names the surround channels as BR/BL and Surcode gets confused cause it doesn't find SR/SL named channels and closes.
himan2001
24th September 2008, 14:05
@madshi:
Can you implement a missing Option? :
-slowdown24 and -speedup24
for 24.000 -> 23.976 and 23.976 -> 24.000 conversions ;-) ?
avivahl
24th September 2008, 15:13
@madshi:
Can you implement a missing Option? :
-slowdown24 and -speedup24
for 24.000 -> 23.976 and 23.976 -> 24.000 conversions ;-) ?
+1. Would be a great feature.
Atak_Snajpera
24th September 2008, 16:50
eac3to reports insane audio delay. DGIndex demuxes audio without problems.
eac3to v2.64
command line: "C:\temp\Ripbot264\Tools\eac3to\eac3to.exe" "C:\VTS_02_1.VOB" 2: "D:\temp\RipBot264temp\job1\audio.1.ac3" -progressnumbers
------------------------------------------------------------------------------
VOB, 1 video track, 5 audio tracks, 9 subtitle tracks, 0:02:16
1: MPEG2, 576i50 (16:9)
2: AC3, 5.1 channels, 448kbps, 48khz, dialnorm: -24dB, 60525ms
3: AC3, 5.1 channels, 448kbps, 48khz, dialnorm: -28dB, 60525ms
4: AC3, 5.1 channels, 448kbps, 48khz, dialnorm: -29dB, 60525ms
5: AC3, 2.0 channels, 192kbps, 48khz, dialnorm: -25dB, 60525ms
6: AC3, 2.0 channels, 192kbps, 48khz, dialnorm: -28dB, 60525ms
7: Subtitle
8: Subtitle
9: Subtitle
10: Subtitle
11: Subtitle
12: Subtitle
13: Subtitle
14: Subtitle
15: Subtitle
[a02] Extracting audio track number 2...
[a02] Removing AC3 dialog normalization...
[a02] Applying (E-)AC3 delay...
[a02] Creating file "D:\temp\RipBot264temp\job1\audio.1.ac3"...
[a02] The last (E-)AC3 frame is incomplete and thus gets skipped.
Video track 1 contains 1919 frames.
eac3to processing took 1 second.
Done.
source .VOB
http://www.mediafire.com/?zdymif14jyg
saint-francis
24th September 2008, 16:55
Hi guys, thanks for all those technical discussions since they will make SW better but as far as i remember somebody suggested some time ago opening a new thread on developing eac3to?
That was me. I have spent several months working on that and I think it's impossible. I have so far gone through the thread three times and compiled lists of what posts I think should go where, and they are different each time. The development posts and usage questions are inextricably linked. Really I think that we as eac3to users should just focus on making the eac3to wiki comprehensive to alleviate the enormous amount of usage questions that pop up in this thread. Or we could just start a new eac3to usage thread.
saint-francis
24th September 2008, 16:58
Eac3to_and_More_GUI does this but it would be nice to have it built-in to eac3to.
That feature is broken for me in the GUI.
rica
25th September 2008, 00:33
That was me. I have spent several months working on that and I think it's impossible. I have so far gone through the thread three times and compiled lists of what posts I think should go where, and they are different each time. The development posts and usage questions are inextricably linked. Really I think that we as eac3to users should just focus on making the eac3to wiki comprehensive to alleviate the enormous amount of usage questions that pop up in this thread. Or we could just start a new eac3to usage thread.
I do agree.... Lets start a new eac3to usage thread?
I think you have a collected FAQs on eac3to as well?
So i think you are the one who should start this thread.
I suppose nautilus7 will contribute as well.
saint-francis
25th September 2008, 04:40
I do agree.... Lets start a new eac3to usage thread?
I think you have a collected FAQs on eac3to as well?
So i think you are the one who should start this thread.
I suppose nautilus7 will contribute as well.
Then I propose a new thread for usage with an opening post linking to the WIKI and to several posts in this thread that address frequently asked questions. Unfortunately my lists of posts from this thread that I made are all about development so I'm not currently in a position to supply the list of FAQ posts. I suppose I could whip something up though.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.