View Full Version : madFlac - new DirectShow FLAC source filter + decoder
Pages :
1
2
3
4
5
[
6]
7
8
9
10
11
tebasuna51
17th May 2008, 20:29
BTW, I think this discussion is irrelevant. Only when we have a 7.1 surround and a 7.1 audio equipment we need difference the Side and Back channels.
- If we have a 5.1 audio and 7.1 equipment we need send the Surround (not matter if Side or Back) to both Side and Back speakers.
- If we have a 7.1 audio and 5.1 equipment we need mix the Side and Back channels to send to Surround channels
We must be permissive and accept like correct 5.1 both channel mask (like flac do) because the back channels in a 5.1 audio speakers system is not the same than a 7.1 system.
In a 7.1 speakers systems we have at left of listener the Side Left speaker (0), the Front Left at 45 (more or less), the Front Center at 90, Front Right at 135, Side Right at 180, Back Right at 240 and Back Left at 300.
In a 5.1 audio speakers system we have the front channels equal, but the Surround speakers must be at 225 and 315.
I think Surround (5.1) is most similar to Back (7.1) but not equal.
madshi
17th May 2008, 22:15
The latest ksmedia.h contains this:
// DirectSound Speaker Config
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define KSAUDIO_SPEAKER_DIRECTOUT 0
#endif
#define KSAUDIO_SPEAKER_MONO (SPEAKER_FRONT_CENTER)
#define KSAUDIO_SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
#define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
#define KSAUDIO_SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
#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)
The header file claims that KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are obsolete. It seems to me that KSAUDIO_SPEAKER_5POINT1_SURROUND and KSAUDIO_SPEAKER_7POINT1_SURROUND should be used instead. So actually 0x60f looks more correct than 0x3f to me.
Thoughts?
tebasuna51
18th May 2008, 01:14
The latest ksmedia.h contains this:
...
The header file claims that KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are obsolete. It seems to me that KSAUDIO_SPEAKER_5POINT1_SURROUND and KSAUDIO_SPEAKER_7POINT1_SURROUND should be used instead. So actually 0x60f looks more correct than 0x3f to me.
Thoughts?
First time I see the 5.1_Surround definition:
#define KSAUDIO_SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
Well, I can accept the new default of course, not problem for me.
If somebody know the reasons for this change, please, say me.
Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.
But the difference between 5.1 and 5.1_Surround is merely semantic, like I say in precedent post we need process Side or Back channels in same way (same order, same destination).
0x003F FL FR FC LF BL BR
0x060F FL FR FC LF SL SR
And we need maintain the backwards compatibility accepting old 5.1 mask 0x003F.
And the surround ac3/dts channels are Side or Back?
I think the angle is most similar to Back.
Is mandatory decode the surround ac3/dts channels to Side?
If I record a movie with 5 microphones (center and 4 corners) my channels are Side or Back?
I think the name is not important.
Now we have a problem with 6.1 because the channel order is different:
0x013F FL FR FC LF BL BR BC
0x070F FL FR FC LF BC SL SR
Somebody know what we must use?
madshi
18th May 2008, 08:37
First time I see the 5.1_Surround definition:
Same with me! I think the Microsoft "headers changed" link I posted earlier is not fully correct. I believe they wanted to talk about the new definitions, but screwed up.
Well, I can accept the new default of course, not problem for me.
If somebody know the reasons for this change, please, say me.
Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.
But the difference between 5.1 and 5.1_Surround is merely semantic, like I say in precedent post we need process Side or Back channels in same way (same order, same destination).
0x003F FL FR FC LF BL BR
0x060F FL FR FC LF SL SR
And we need maintain the backwards compatibility accepting old 5.1 mask 0x003F.
And the surround ac3/dts channels are Side or Back?
I think the angle is most similar to Back.
Is mandatory decode the surround ac3/dts channels to Side?
If I record a movie with 5 microphones (center and 4 corners) my channels are Side or Back?
Well, in the AC3 and DTS documentation the channels are named "left/right surround". They're neither called "side" nor "back". So both Microsoft constants do not fully fit. However, the additional 2 channels in 7.1 are always called "back" or "rear" in every documentation I found. So it does make sense to use the Microsoft "back" constants for the back channels and the Microsoft "side" constants for the surround channels, I think. Using the Microsoft "back" channels for the surround channels and the Microsoft "side" channels for the back channels sounds "back"wards to me... :) Cause "back" is backer than "side" when talking about the MS constants. And "back" is backer than "surround" when talking about the general language used in the home theater world. So it sounds logical to me to use MS "side" constants for the "surround" channels.
Furthermore I don't think it makes sense to change the constants depending on how many channels we have. It makes no sense to me to name the channels "surround" in 5.1 and "side" in 7.1. Well, ok, the recommended speaker placement might be like that. But in all documentation (AC3, DTS) the name of the side/surround channels is always "surround", no matter whether we have 5.1 or 7.1. The name is never changed to "side". At least I haven't seen that in any specification I've read.
Now we have a problem with 6.1 because the channel order is different:
0x013F FL FR FC LF BL BR BC
0x070F FL FR FC LF BC SL SR
Somebody know what we must use?
Yeah, that's a real trouble! The Sonic decoder outputs 6.1 DTS in this channel order (where "SL/SR" stands for "surround"):
L, R, C, LFE, SL, SR, BC
Channel mask is "-1". Which according to MS means: "The dwChannelMask value 0xFFFFFFFF (or any value in which the most significant bit of the DWORD is set) is pre-defined to indicate that an entity supports all possible channel configurations".
Now maybe eac3to's automatic conversion from 6.1 to 7.1 makes sense again? Because there's no doubt about the right channel mask and channel ordering with 7.1... ;) While with 6.1 I'm not sure about the right ordering. I'd say "FL FR FC LF BC SL SR" sounds like the right channel order to me - but I bet all the applications/drivers accepting 6.1 will have their own interpretation!
Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.
But the difference between 5.1 and 5.1_Surround is merely semantic, like I say in precedent post we need process Side or Back channels in same way (same order, same destination).
I agree if we talk about the channel order. And if we talk about drivers behaving correctly.
And we need maintain the backwards compatibility accepting old 5.1 mask 0x003F.
Yes, definitely. I'm thinking maybe madFlac should offer 3 media types:
(1) extensible with 0x60f
(2) extensible with 0x3f
(3) PCM (no channel mask)
What do you think?
I think I'll post this in the ffdshow thread, too, to get more feedback...
nautilus7
18th May 2008, 11:04
Well, in the AC3 and DTS documentation the channels are named "left/right surround". They're neither called "side" nor "back". So both Microsoft constants do not fully fit. However, the additional 2 channels in 7.1 are always called "back" or "rear" in every documentation I found. So it does make sense to use the Microsoft "back" constants for the back channels and the Microsoft "side" constants for the surround channels, I think. Using the Microsoft "back" channels for the surround channels and the Microsoft "side" channels for the back channels sounds "back"wards to me... :) Cause "back" is backer than "side" when talking about the MS constants. And "back" is backer than "surround" when talking about the general language used in the home theater world. So it sounds logical to me to use MS "side" constants for the "surround" channels.This was/is always the case with me. When you say surround/side i understand 5.1 and when you say back/rear i understand you mean the 2 extra channels in a 7.1 setup. But as tebasuna51 said earlier, naming is not that matters most.
cghebert
31st May 2008, 20:27
Same with me! I think the Microsoft "headers changed" link I posted earlier is not fully correct. I believe they wanted to talk about the new definitions, but screwed up.
Well, in the AC3 and DTS documentation the channels are named "left/right surround". They're neither called "side" nor "back". So both Microsoft constants do not fully fit. However, the additional 2 channels in 7.1 are always called "back" or "rear" in every documentation I found. So it does make sense to use the Microsoft "back" constants for the back channels and the Microsoft "side" constants for the surround channels, I think. Using the Microsoft "back" channels for the surround channels and the Microsoft "side" channels for the back channels sounds "back"wards to me... :) Cause "back" is backer than "side" when talking about the MS constants. And "back" is backer than "surround" when talking about the general language used in the home theater world. So it sounds logical to me to use MS "side" constants for the "surround" channels.
Furthermore I don't think it makes sense to change the constants depending on how many channels we have. It makes no sense to me to name the channels "surround" in 5.1 and "side" in 7.1. Well, ok, the recommended speaker placement might be like that. But in all documentation (AC3, DTS) the name of the side/surround channels is always "surround", no matter whether we have 5.1 or 7.1. The name is never changed to "side". At least I haven't seen that in any specification I've read.
Yeah, that's a real trouble! The Sonic decoder outputs 6.1 DTS in this channel order (where "SL/SR" stands for "surround"):
L, R, C, LFE, SL, SR, BC
Channel mask is "-1". Which according to MS means: "The dwChannelMask value 0xFFFFFFFF (or any value in which the most significant bit of the DWORD is set) is pre-defined to indicate that an entity supports all possible channel configurations".
Now maybe eac3to's automatic conversion from 6.1 to 7.1 makes sense again? Because there's no doubt about the right channel mask and channel ordering with 7.1... ;) While with 6.1 I'm not sure about the right ordering. I'd say "FL FR FC LF BC SL SR" sounds like the right channel order to me - but I bet all the applications/drivers accepting 6.1 will have their own interpretation!
Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.
I agree if we talk about the channel order. And if we talk about drivers behaving correctly.
Yes, definitely. I'm thinking maybe madFlac should offer 3 media types:
(1) extensible with 0x60f
(2) extensible with 0x3f
(3) PCM (no channel mask)
What do you think?
I think I'll post this in the ffdshow thread, too, to get more feedback...
Madshi and others,
Finally coming back to this after a while struggling to get everything going. I now am playing 1080p mkv files fine with the new biostar 8200 board, with the flac audio. Unfortunately, nvidia still only allows 7.1 channel output, as opposed to just 5.1.
I have noticed that whether sound comes out of the side surround or back surrounds depends quite a bit on the codec and player used. It might be a useful feature to add different channel masks to madflac, but I think it is fairly straightforward to just remap the channels using ffdshow or mplayer classic's internal audio switcher.
This does bring me to another question. Is there any way to PLIIx type matrixing of the 5.1 -> 7.1 in mplayer classic using ffdshow or some combination of filters?
If you guys aren't sure, can you suggest a good forum to ask?
Thanks again.
tebasuna51
31st May 2008, 21:23
It might be a useful feature to add different channel masks to madflac, but I think it is fairly straightforward to just remap the channels using ffdshow or mplayer classic's internal audio switcher.
This does bring me to another question. Is there any way to PLIIx type matrixing of the 5.1 -> 7.1 in mplayer classic using ffdshow or some combination of filters?
If you guys aren't sure, can you suggest a good forum to ask?.
With 5.1 don't exist problem at all. 0x3f is the correct channel mask for 5.1 until xp SP2, after the 0x60f is the new 5.1_surround, but we need maintain compatibily then the 0x3f must also be accepted like 5.1.
I'm sure about what do, in BeHappy for instance, the default channel mask for 5.1 is 0x3f, the soft/drivers pre-XP-SP2 work ok and the post-XP-SP2 must accept also 0x3f.
We don't need remap nothing because the order is the same for a 5.1 0x3f or 0x60f, and the behaviour for a 7.1 system when receive a 5.1, 0x3f or 0x60f, is the same also:
- The recommended position for RightSurround speaker is 110 from Center speaker.
- The standard position for RightSide and RightBack are 90 and 150
- Then the Surround channel must go to Side and Back, never to only one.
With ffdshow you can define a custom matrix with the appropriate coeficients to the real position of your Side and Back speakers.
madshi
1st June 2008, 21:37
If you feed a 7.1 setup (receiver + speakers) with 5.1 AC3 bitstream what does the receiver send to the speakers? Are the side and back speakers both fed with exactly the same sound with exactly the same volume in this case? Or does the receiver do some special processing to fill the rear speakers? I'm not sure what receivers are doing in such a case.
I could add an option to madFlac to "upconvert" 5.1 FLAC tracks to 7.1. But I don't want to add something if I'm not sure that it's the right thing to do. So I'd like to know for sure that simple channel copying is what a normal receiver does, too.
Anybody knows that?
cghebert
1st June 2008, 22:24
- The recommended position for RightSurround speaker is 110 from Center speaker.
- The standard position for RightSide and RightBack are 90 and 150
- Then the Surround channel must go to Side and Back, never to only one.
With ffdshow you can define a custom matrix with the appropriate coeficients to the real position of your Side and Back speakers.
I can measure the angle and positions of my speakers, but exactly how do I translate this into the appropriate coefficients for the matrix?
cghebert
1st June 2008, 22:48
If you feed a 7.1 setup (receiver + speakers) with 5.1 AC3 bitstream what does the receiver send to the speakers? Are the side and back speakers both fed with exactly the same sound with exactly the same volume in this case? Or does the receiver do some special processing to fill the rear speakers? I'm not sure what receivers are doing in such a case.
I could add an option to madFlac to "upconvert" 5.1 FLAC tracks to 7.1. But I don't want to add something if I'm not sure that it's the right thing to do. So I'd like to know for sure that simple channel copying is what a normal receiver does, too.
Anybody knows that?
Madshi,
I'm not an expert on the topic, but when I send my AVR 5.1 AC3, the back surrounds are completely silent: only the side surrounds are active and my input lights show up as 5.1.
If I apply processing to the stream, such as Dolby Prologic IIx, it matrixes the side surrounds into the back surrounds in order to fill out all seven channels. It doesn't touch the fronts, center, or LFE.
Whether or not this "matrixing" by PLIIx is simply splitting the channel into equal parts vs. applying some special processing, I don't know.
I do know that certain movie tracks have built in "Flags" that tell the receiver to apply a certain matrixing technology, so there might be something more going on than just splitting the stream.
There is a PL2XDLL.dll file that comes with PowerDVD (has PLIIx ability built in), but I haven't done enough digging to really figure out much about it. The only instance I have found of someone trying to implement it in another player is here (http://www.hydrogenaudio.org/forums/lofiversion/index.php/t50713.html), but it doesn't look like that has been updated for a while.
I'm not sure if one can use cyberlink's audio decoder in mplayer classic to apply PLIIx. I did get it to show up as a filter when I was playing an AC3 track, but I'm not sure if it was actually doing anything, and I don't think it can recognize FLAC files. Do you know if any of the other lossless formats eac3to can output (RAW, PCM, WAV, etc.) can be recognized by Cyberlink's decoder? I suppose I can just try them out myself, but wanted to see if you knew off the top of your head.
Here is some additional information from Dolby on PLIIx, though it isn't terribly technical unfortunately http://www.dolby.com/consumer/technology/prologic_IIx_faq_1.html
I wonder if making 5.1 into 7.1 is rather simple. I would figure the more complex processing would be needed to make 7.1 from 2 channel inputs.
tebasuna51
2nd June 2008, 19:00
If you feed a 7.1 setup (receiver + speakers) with 5.1 AC3 bitstream what does the receiver send to the speakers? Are the side and back speakers both fed with exactly the same sound with exactly the same volume in this case? Or does the receiver do some special processing to fill the rear speakers? I'm not sure what receivers are doing in such a case.
I could add an option to madFlac to "upconvert" 5.1 FLAC tracks to 7.1. But I don't want to add something if I'm not sure that it's the right thing to do. So I'd like to know for sure that simple channel copying is what a normal receiver does, too.
Anybody knows that?
http://img136.imageshack.us/img136/8310/speakerszl3.png (http://imageshack.us)
Maybe we can calculate the 5.1 -> 7.1 upmix with:
The acustic power component in Y axis is produced only for back speaker then:
Back x cos 30 = Surround x sin(110 - 90) = Surround x sin 20
then Back = 0.395 x Surround
The component in X axis is:
Back x sin 30 + Side = Surround x cos 20
then Side = 0.742 x Surround
The coeficients in matrix (electric signal) must be the sqr of the acustic power:
Side = sqr(0.742) x Surround = 0.86 x Surround
Back = sqr(0.395) x Surround = 0.62 x Surround
rickardk
6th July 2008, 21:21
Trying to use madFlac with some mkvs containing Blu-ray concerts (MPEG2).
madFlac connects to subpicture input on cyberlinks decoder instead of the audio renderer (or ffdshow).
Any ideas?
madshi
6th July 2008, 21:43
http://img136.imageshack.us/img136/8310/speakerszl3.png (http://imageshack.us)
Maybe we can calculate the 5.1 -> 7.1 upmix with:
The acustic power component in Y axis is produced only for back speaker then:
Back x cos 30 = Surround x sin(110 - 90) = Surround x sin 20
then Back = 0.395 x Surround
The component in X axis is:
Back x sin 30 + Side = Surround x cos 20
then Side = 0.742 x Surround
The coeficients in matrix (electric signal) must be the sqr of the acustic power:
Side = sqr(0.742) x Surround = 0.86 x Surround
Back = sqr(0.395) x Surround = 0.62 x Surround
Hmmmm... That sounds interesting. But this wouldn't handle Dolby EX and DTS ES Matrix encoded material "properly", would it?
madshi
6th July 2008, 21:44
Trying to use madFlac with some mkvs containing Blu-ray concerts (MPEG2).
madFlac connects to subpicture input on cyberlinks decoder instead of the audio renderer (or ffdshow).
Any ideas?
Can you please post the media type connection information (e.g. by using MPC HC)? I don't think that this is a madFlac problem, but of course I can't be sure. Generally madFlac just reports that it is willing to output audio. Which other filter connects to that does not really bother madFlac...
tebasuna51
6th July 2008, 22:53
Hmmmm... That sounds interesting. But this wouldn't handle Dolby EX and DTS ES Matrix encoded material "properly", would it?
But Dolby EX and DTS ES Matrix encoded are 6.1
And DTS ES decodec with ArcSoft I obtain FL,FR,FC,LF,BL,BR,BC then to convert to 7.1 is enough:
SL = BL
SR = BR
BL = 0.707xBC
BR = 0.707xBC
K1ngp1ng
7th July 2008, 07:21
when decoding 6.1 (-no7doubling in eac3to) with madflac the info in ffdshow says: fl, fr, c, lfe, bl, br, front left of center
does anyone else have this problem? i don't know which software causes this error. i use vista64.
rickardk
11th July 2008, 14:18
Sorry for taking so long. I guess there is no way around the problem with madFlac connecting to Cyberlinks MPEG2 decoder.
Filter : madFlac Decoder - CLSID : {6B257121-CBB6-46B3-ABFA-B14DFA98C4A6}
- Connected to:
CLSID: {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}
Filter: \\unraid\disk1\Filmer\A Knights Tale [Blu-ray]\A Knights Tale.mkv
Pin: Audio
- Connection media type:
Audio: FLAC 48000Hz 6ch 4608Kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {1541C5C0-CDDF-477D-BC0A-86F8AE7F8354}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 104
WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 86 (extra bytes)
pbFormat:
0000: ac f1 06 00 80 bb 00 00 00 ca 08 00 0c 00 10 00 ..€.........
0010: 56 00|66 4c 61 43 00 00 00 22 10 00 10 00 00 01 V.fLaC..."......
0020: 14 00 81 f3 0b b8 0a f0 16 af 50 80 fe 45 bd 68 .....P€Eh
0030: 80 5b 8a b8 54 e9 2f f2 b1 0b 24 19 84 00 00 28 €[ŠT/.$.„..(
0040: 20 00 00 00 72 65 66 65 72 65 6e 63 65 20 6c 69 ...reference li
0050: 62 46 4c 41 43 20 31 2e 32 2e 30 20 32 30 30 37 bFLAC 1.2.0 2007
0060: 30 37 31 35 00 00 00 00 0715....
Filter : madFlac Decoder - CLSID : {6B257121-CBB6-46B3-ABFA-B14DFA98C4A6}
- Connected to:
CLSID: {8ACD52ED-9C2D-4008-9129-DCE955D86065}
Filter: CyberLink Video/SP Decoder (PDVD7)
Pin: SubPicture In
- Connection media type:
Unknown
AM_MEDIA_TYPE:
majortype: MEDIATYPE_DVD_ENCRYPTED_PACK {ED0B916A-044D-11D1-AA78-00C04FC31D60}
subtype: MEDIASUBTYPE_DVD_SUBPICTURE {E06D802D-DB46-11CF-B4D1-00805F6CBBEA}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 136
VIDEOINFOHEADER:
rcSource: (0,0)-(0,0)
rcTarget: (0,0)-(0,0)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 333667
VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000000
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 0
dwPictAspectRatioY: 0
dwControlFlags: 0x00000000
dwReserved2: 0x00000000
MPEG2VIDEOINFO:
dwStartTimeCode: 0
cbSequenceHeader: 0
dwProfile: 0x00000000
dwLevel: 0x00000000
dwFlags: 0x00000000
BITMAPINFOHEADER:
biSize: 0
biWidth: 720
biHeight: 480
biPlanes: 0
biBitCount: 0
biCompression: 0
biSizeImage: 0
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0
pbFormat:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0020: 00 00 00 00 00 00 00 00 63 17 05 00 00 00 00 00 ........c.......
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 d0 02 00 00 ...............
0050: e0 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080: 00 00 00 00|00 00 00 00 ........
- Enumerated media type 0:
Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 6ch 4608Kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40
WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 22 (extra bytes)
WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}
pbFormat:
0000: fe ff 06 00 80 bb 00 00 00 ca 08 00 0c 00 10 00 ..€.........
0010: 16 00 10 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €...8›q
For about 6 months ago I wrote (in the eac3to thread) about a problem I had playing back Sum Of All Fears (AVC, TrueHD->FLAC) . In short the mkv refused to start if I used ffdshow (libav) for FLAC decoding. And the lenght of the movie was not shown in WMP
If I skip forward it starts and lenght is shown.
(and if I use madFlac it starts right away)
Now as I can't use madFlac for FLAC anymore (because I started using Cyberlink MPEG2 decoder) I tested my whole collection for titles not starting.
I found a few and after analysing one of them I think I know why they are not starting.
If the FLAC track is 1 second+ shorter than video the file will not play when using ffdshow for FLAC decoding.
The strange thing is that it does not matter if I cut the end of the final mkv (to even out the lenghts of the tracks).
Does madFlac use a diffrent method to report track length than ffdshow?
You asked me about a sample back then as it might had something to do with eac3to. I was then not able to cut a sample where it could be reproduced but now I have.
www.earselect.se/test.mkv
3 movies of 509 suffers from this. And I know it has nothing to do with madFlac (or eac3to) but as you're the master of FLAC you might see something strange with this clip.
K1ngp1ng
20th July 2008, 16:10
an option to output lpcm big-endian (for powerdvd decoder) would be great.
deathlord
20th July 2008, 18:13
an option to output lpcm big-endian (for powerdvd decoder) would be great.
You think the PowerDVD decoder would do dolby pro logic IIx on multi channel pcm this way? Do you know a working graph, by any chance? Ac3 is no problem, but I can't make lpcm work.
K1ngp1ng
20th July 2008, 18:48
ac3: ac3filter->ffdshow->powerdvd
dts: ffdshow->powerdvd
flac: madflac->ac3filter->ffdshow->powerdvd (ac3filter is necessary for some reason)
i don't have lpcm. but maybe it works like that:
lpcm: ac3filter->ffdshow->powerdvd
for flac 6.1 i have to enable 5.1 downmix in madflac.
if madflac could output big-endian or at least would have an option to downmix 6.1 but not 7.1, it would be nice.
deathlord
26th July 2008, 15:22
Thanks. Now graphedit no longer crashes and I even get a signal!
Unfortunately the decoder does no upmix. The resulting signal is still 5.1. When used in PowerDVD it can upmix i.e. lpcm from 5.1 to 7.1, so there has to be a way.
Any ideas?
ac3: ac3filter->ffdshow->powerdvd
dts: ffdshow->powerdvd
flac: madflac->ac3filter->ffdshow->powerdvd (ac3filter is necessary for some reason)
i don't have lpcm. but maybe it works like that:
lpcm: ac3filter->ffdshow->powerdvd
for flac 6.1 i have to enable 5.1 downmix in madflac.
if madflac could output big-endian or at least would have an option to downmix 6.1 but not 7.1, it would be nice.
K1ngp1ng
26th July 2008, 15:57
open powerdvd audio decoder and select "8 channel", "pl2x movie" and "quiet environment".
deathlord
27th July 2008, 13:05
Yes, that's what I've done, but it will still only play 5.1 with flac as source. Id does produce 7.1 with ac3 as source.
K1ngp1ng
27th July 2008, 18:30
pin info of audio renderer says only 6ch? and what about dts?
i also use swap channels function in ffdshow - but that's it. i have no idea why it doesn't work for you.
front left -> front left
front center -> front right
front right -> front center
side left -> side left
side right -> side right
back left -> LFE
back center -> back right
back right -> back left
LFE -> back center
deathlord
27th July 2008, 19:32
No, it says 8 channels. Two of them are just always zero with flac. Dts works correctly. Enabling "swap channels" doesn't help either...
Mercury_22
22nd August 2008, 16:53
When Delphi supports native 64bit compiling, there's still the problem that the DirectShow base classes I'm using would have to be updated to 64bit, too, before I can even start thinking about a 64bit madFlac. So there's no hope to get madFlac 64bit anytime soon.
Still NO HOPE for 64-bit version ? :( Please ! :helpful:
:thanks:
flyingernst
12th October 2008, 21:35
1) cant play 6.1 flacs with MPC-HC and MadFlac Decoder prefered (FLAC in ffdshow deactivated):
http://img385.imageshack.us/img385/6459/84013286zx2.th.jpg (http://img385.imageshack.us/my.php?image=84013286zx2.jpg)http://img385.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
upside: 6.1 in MPC-HC with madflac prefered (not playing)
downside: 5.1 in MPC with madflac in MPC-HC (playing) same file, other audio
2) without remapping in MPC-HC
-5.1 Files get played through backsurrounds instead of surrounds
-7.1 Files get played with swapped channels
...but like you said this seems to be a problem with the Ati 48XX.
Greetings, Michael
PS: PowerDVD had that problem too, but now at least 5.1 Sources are running in PowerDVD in the right channels (with 5.1 and 7.1 setting in Realtek Driver), sadly I dont have 7.1 m2ts files anymore. The realtek Channel test runs without problems. 5.1 HD-WMVs get played with swapped channel-mapping in MP11-HC...in MPC-HC after remapping not any more
madshi
12th October 2008, 22:02
1) cant play 6.1 flacs with MPC-HC and MadFlac Decoder prefered (FLAC in ffdshow deactivated)
Try different audio renderers. madFlac correctly reports and outputs 7 channels (6.1). If the audio renderer doesn't accept that format, that's not my fault. Of course I could add an option to upconvert to 7.1 on the fly in madFlac. Actually that's already on my to do list.
flyingernst
12th October 2008, 22:51
ok, nice thanks
JustABDFan
18th October 2008, 00:39
Are you considering adding realtime downmixing also? like 7.1->5.1 or even 7.1->2.0 for those limited to stereo (laptops for example).
DJ_Phatic
24th November 2008, 09:56
I cant seem to get this to work in Vista64. Fresh install of vista UAC disabled, I run install.bat it says it has been registered successfully but when I load up a file containing flac it doesnt find the filter.
Checking for the filter manual in MPC-HC it is not listed either.
Any ideas how I can get this to work?
deathlord
24th November 2008, 10:18
Make sure the files are stored on a local harddisk before you execute them, rather than somwhere on the network. This has caused the exact same problem for me once.
DJ_Phatic
24th November 2008, 10:43
yes, they are on my C: in a folder called madflac.
madshi
24th November 2008, 10:47
Make sure you adjust NTFS security settings so that your user (or "Everyone") can read/execute the files.
DJ_Phatic
24th November 2008, 14:41
it seems that my problem was with mpc-hc 64bit. Tried the 32-bit version and it worked straight away.
Thanks for help.
madshi
24th November 2008, 16:02
Well, a 64bit process cannot load 32bit DirectShow filters. It's as easy as that.
yesgrey
3rd December 2008, 11:46
madshi,
Is it possible for you to add 32bit output in madFlac whatever is the source bit depth? a registry key for selecting it would be good enough for me. If it's not a very hard work...
Some sound card drivers (like mine, RME) do not support 24 bit communication modes, only support 16 bit and 32 bit, so, the only way of listening 24 bit files is feeding the drivers the 24 bit files as 32 bit with the 24 bits being the MSB.
Currently, I have to use ffdshow to change the output depth to 32 bit, but if it's not too hard for you I think it would be better sticking with just one filter...
madshi
3rd December 2008, 11:54
To be honest, I'm not sure about all the various wishes of what madFlac should do. Some want upconversion, others downconversion. But what madFlac really is all about is just decoding. Of course I could add 32bit PCM output, 6.1 -> 5.1 downconversion (with proper mixing and maybe even a phase change), 5.1 -> 7.1 upconversion etc etc. But wouldn't it make more sense to use a separate processing filter for such stuff?
My thinking is this: There should be various decoder filters. And there should be one or more processing filters. Why should every decoder reinvent the wheel and implement all those processing options, when there are already (free!) processing filters out there which already do all the necessary work? What sense does it make to have separate up/downconversion functionality in every decoder filter?
I was already thinking about writing a "madProcessing" filter or something like that and put all processing stuff in there. Such a filter could then be used not only for madFlac, but for other decoders, too. Investing the time to implement processing into madFlac just doesn't seem right to me, because whatever funky processing algorithms I add are then limited to madFlac and can't be used with any other decoder. But then I thought: Why should I do a "madProcessing" filter, if there already exists ffdshow which does most of what is needed?
clsid
3rd December 2008, 14:32
The problem with using processing filters (like ffdshow) is that you either let them load always, or never. I for example only have stereo headphones. Why would I want to process MP3 audio that is already stereo? But I would want to process FLAC 5.1 audio, to convert it to 2.0. I agree that all kind of funky processing stuff doesn't belong in your filter. But a basic speaker config selection would be very useful. And since FLAC can be 24bit, selecting the supported bitdepths (16/24/32) of the audio renderer would be nice as well.
madshi
3rd December 2008, 15:11
Why would I want to process MP3 audio that is already stereo?
Shouldn't a "good" processing filter pass the audio data through without any modification (= harm), if input and output parameters are identical? If you e.g. always add the ffdShow raw audio processor to your playback chain and set it to 2.0 output, would that do any harm to 2.0 sources? Would there be any difference between having it in the chain or not?
I'm just still not sure what is the right approach here. I mean downmixing to 2.0 is not too easy, especially if you want to do the phase change that the standard Dolby II downmixing matrix asks for.
clsid
3rd December 2008, 15:40
Sure, it probably won't have an effect on performance. But not everyone uses ffdshow or similar processing filters. So it would still be useful if madflac could do it by itself.
73ChargerFan
4th December 2008, 00:13
madshi,
Is it possible for you to add 32bit output in madFlac whatever is the source bit depth?
IANAP, but could it check the device capabilities of the next module in the audio chain, and make a decision based upon that & source info? If src bitrate isn't supported, then upscale if possible, otherwise downscale.
Also, doesn't AC3Filter also have audio processing features?
:helpful:
yesgrey
4th December 2008, 13:42
madshi,
I agree with your view about this. When we have ffdshow it seems to be a lost of resources using your time to mimic options that already are created and working good with other filters. I requested the 32bit pcm mode only because it's a drivers limitation in some sound cards. I know the right path would be the drivers allowing 24 bit connection modes, but it seems some sound card makers avoid it because the PCI bus prefers connections in multiples of Bytes (2B or 4B). Some people don't know this, and so cannot listen to 24 bit source files. I needed a year (yes, it's correct) to learn this about my sound card. I asked about it in the support foruns and no one answered me. Only recently I discovered this reading one thread in the support forum. After that, I read the user's guide and saw that it was there the driver support of 16 bit and 32 bit (as 2B and 4B), but hard to find to a casual reader.
The upconversion/downconversion/resampling and other kind of stuff I don't feel that should be in the decoder.
For example, DScaler5 audio decoder have some of that options, and I confess it's nice, but it's not essential. The 32 bit output, I believe it is, because if not available, and people don't know how to use ffdshow, they cannot listen to 24 bit sound files in kmixer free mode, because the sound card only give silence.
As I told, I currently use ffdshow to give me 32 bit PCM, and it's bit perfect, I have confirmed it. Just thinking that this could be a very simple thing to add...
Roscoe62
9th December 2008, 05:40
Hi Madshi,
I don't know why, but my Vipre virus/anti-spyware software has recently (as in - over the last few days) latched onto your MadFlac InstallFilter.exe and insists it's a Trojan-Dropper.Delphi.Gen Scanner program. I don't know why it's only just started doing this but it's more than a little annoying.
They can be contacted at sunbeltsoftware.com but, is there any way I can help you with this one? I'd love it if they just called off the dogs!
madshi
9th December 2008, 09:37
Argh, please report this as a false alarm to your anti virus company, so that they can fix it. Which company is that, btw?
Roscoe62
10th December 2008, 08:28
The company is Sunbelt Software - the makers of Counterspy - although this product is Vipre.
It did another scan today and it seemed OK, but if it shows up again I'll contact them.
Thunderbolt8
13th January 2009, 22:00
got a question regarding audio setup: I have a new soundcard and when I now play 5.1 (or higher) FLAC stuff via madflac, then mpc/ffdshow/madflac are using all 6 channels, althoug I only have a 2 speaker setup. my old soundcard onboard instead obviously directed all 6 channels then to left & right channels automatically, but my new one doesnt do it any more (I checkmarked 2 speaker setup everywhere I could, windows, soundcard, ffdshow installation).
now, when I add ac3 filter to it and specify output as 2/0 with rate "as is" and format "pcm 24bit" it works that all flac sound is directed as well to left and right channel. but now Im not sure if the final output sound is still completely lossless. how does it work, madflac sends lossless 5.1 PCM to ac3 filter and ac3 filter then just distributes that lossless PCM to left and right channel? so in that case the final output would still be lossless?
madshi
13th January 2009, 22:08
how does it work, madflac sends lossless 5.1 PCM to ac3 filter and ac3 filter then just distributes that lossless PCM to left and right channel?
I don't know what ac3filter does.
clsid
13th January 2009, 22:44
It mixes the 5.1 to 2.0. Your old soundcard did something similar. Whether this operation can be called lossless is debatable.
Thunderbolt8
14th January 2009, 01:27
in how far?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.