Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Calendar Today's Posts Search

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 22nd September 2008, 06:36   #6321  |  Link
Duppie
Registered User
 
Join Date: Jun 2007
Posts: 58
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?...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
Duppie is offline  
Old 22nd September 2008, 06:38   #6322  |  Link
nautilus7
Registered User
 
nautilus7's Avatar
 
Join Date: Jan 2006
Location: Athens, Greece
Posts: 1,518
@ rica

2 hints:

* proper way of doing these blu-ray discs is
Code:
eac3to "folder" 1)
* if you press the upper arrow key the last command is shown again
nautilus7 is offline  
Old 22nd September 2008, 07:14   #6323  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by tebasuna51 View Post
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.

Quote:
Originally Posted by tebasuna51 View Post
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.

Quote:
Originally Posted by tebasuna51 View Post
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 is offline  
Old 22nd September 2008, 07:29   #6324  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by tebasuna51 View Post
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:

Quote:
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.

Code:
#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.

Quote:
Originally Posted by DeepBeepMeep View Post
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

Code:
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.

Quote:
Originally Posted by Fer View Post
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...
madshi is offline  
Old 22nd September 2008, 07:36   #6325  |  Link
EPiPH0NE
b4k3d
 
Join Date: Sep 2007
Posts: 310
Quote:
Originally Posted by madshi View Post

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


Code:
^           *^



/              \

Last edited by EPiPH0NE; 22nd September 2008 at 07:39.
EPiPH0NE is offline  
Old 22nd September 2008, 07:52   #6326  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by EPiPH0NE View Post
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.
madshi is offline  
Old 22nd September 2008, 09:18   #6327  |  Link
K1ngp1ng
Registered User
 
Join Date: Jun 2008
Posts: 29
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.

Last edited by K1ngp1ng; 22nd September 2008 at 09:20.
K1ngp1ng is offline  
Old 22nd September 2008, 11:29   #6328  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by K1ngp1ng View Post
...
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.
tebasuna51 is offline  
Old 22nd September 2008, 12:07   #6329  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by tebasuna51 View Post
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...
madshi is offline  
Old 22nd September 2008, 12:24   #6330  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by madshi View Post
...
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 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.
tebasuna51 is offline  
Old 22nd September 2008, 13:51   #6331  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by tebasuna51 View Post
I can't believe. The quadraphonic sound 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.

Quote:
Originally Posted by tebasuna51 View Post
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.

Quote:
Originally Posted by tebasuna51 View Post
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 is offline  
Old 22nd September 2008, 17:26   #6332  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Another reply from Microsoft:

Quote:
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?
madshi is offline  
Old 22nd September 2008, 18:00   #6333  |  Link
Inventive Software
Turkey Machine
 
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
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.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld
Inventive Software is offline  
Old 22nd September 2008, 18:01   #6334  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,815
Madshi could you add switch something like "-Automatically repeat audio demuxing if gaps are detected"?
Atak_Snajpera is offline  
Old 22nd September 2008, 18:31   #6335  |  Link
K1ngp1ng
Registered User
 
Join Date: Jun 2008
Posts: 29
Quote:
Originally Posted by madshi View Post
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/surro...E_2002_v2a.PDF
K1ngp1ng is offline  
Old 22nd September 2008, 18:40   #6336  |  Link
fib0by
Registered User
 
Join Date: Feb 2008
Posts: 78
Quote:
Originally Posted by Atak_Snajpera View Post
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.
fib0by is offline  
Old 22nd September 2008, 19:04   #6337  |  Link
EPiPH0NE
b4k3d
 
Join Date: Sep 2007
Posts: 310
Quote:
Originally Posted by Atak_Snajpera View Post
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.
EPiPH0NE is offline  
Old 22nd September 2008, 19:32   #6338  |  Link
fib0by
Registered User
 
Join Date: Feb 2008
Posts: 78
Quote:
Originally Posted by EPiPH0NE View Post
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.
fib0by is offline  
Old 22nd September 2008, 20:22   #6339  |  Link
xkodi
Registered User
 
Join Date: Aug 2002
Posts: 221
Quote:
Originally Posted by madshi View Post
Another reply from Microsoft:

Quote:
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).

Quote:
Originally Posted by madshi View Post
Another reply from Microsoft:

Quote:
...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.

Quote:
Originally Posted by madshi View Post
Another reply from Microsoft:

Quote:
... 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.

Last edited by xkodi; 22nd September 2008 at 20:39.
xkodi is offline  
Old 22nd September 2008, 20:56   #6340  |  Link
EPiPH0NE
b4k3d
 
Join Date: Sep 2007
Posts: 310
Quote:
Originally Posted by fib0by View Post
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.
EPiPH0NE is offline  
Closed Thread

Tags
eac3to


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:05.


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