WMA 5.1 in WMV decodes to stereo (1 Viewer)

granx

Portal Member
September 3, 2005
28
0
There seem to be a bug in the way "WMAudio Decoder DMO" decodes WMA Pro audio from WMV files. If the audio is 5.1 channels, it will allways downmix into 2 channel stereo. This is extremely annoying, the result is whenever a WMV file with 6 channel audio is played using direct show, it will be heard as 2 channel only.

In doom9.org (http://forum.doom9.org/showthread.php?t=110449&page=3) they were able to find the reason. It seems that the "WMAudio Decoder DMO" has a property (_HIRESOUTPUT) that forces it to use more then 2 channels. Below is the C++ fix they proposed to Avisynth. Can this be entered to MP as well?

Edit: here is the MSDN article about this issue: http://msdn.microsoft.com/library/d...htm/multichannelaudioplaybackindirectshow.asp

IGraphBuilder *pGraph;
HRESULT hres;
IBaseFilter * pDmoFilter;

hres = CoCreateInstance(CLSID_DMOWrapperFilter, NULL,
CLSCTX_INPROC, IID_IBaseFilter, (void **)&pDmoFilter);

IDMOWrapperFilter *pWrap;
pDmoFilter->QueryInterface(IID_IDMOWrapperFilter, (void **)&pWrap);

hres = pWrap->Init(CLSID_CWMADecMediaObject, CLSID_CWMADecMediaObject);

pWrap->Release();

IPropertyBag *pPropertyBag = NULL;
hres = pDmoFilter->QueryInterface(IID_IPropertyBag, (void**)&pPropertyBag);

hres = SetHiResOutput(pPropertyBag);

hres = pGraph->AddFilter(pDmoFilter, L"WMA Filter");

hres = pGraph->RenderFile(FileName, NULL);


HRESULT SetHiResOutput(IPropertyBag* pBag)
{
HRESULT hr = S_OK;

VARIANT myVar;
VARIANT myVar2;
VariantInit(&myVar);
VariantInit(&myVar2);

myVar.vt = VT_BOOL;
myVar.boolVal = TRUE;

myVar2.vt = VT_I4;
myVar2.iVal = DSSPEAKER_DIRECTOUT;

hr = pBag->Write(g_wszWMACHiResOutput, &myVar);
hr = pBag->Write(g_wszWMACSpeakerConfig, &myVar2);

return hr;
}
 

granx

Portal Member
September 3, 2005
28
0
Come on guys, it can't be that non interesting issue... am I the only one who play mutli channel wmv files in MP?
 

granx

Portal Member
September 3, 2005
28
0
Two weeks already without a response... :(

I'll try a different strategy, can I manipulate the graph thru a process plugin?
 

jawbroken

Portal Pro
August 13, 2005
706
0
Home Country
Afghanistan Afghanistan
Have you tried talking to developers on IRC? It might be easier to get a response there as they probably don't have time to read every post on these forums.
 

talbot3

Portal Member
January 12, 2007
11
0
44
Did you ever resolve this? I have run into the same problem. I can get 5.1 output or spdif to my wma decoding receiver using zoomplayer or wmp11, but I want to use media portal's internal player.

I posted over in the codec forum but received zero response.


According to MS the wma dmo by default down samples 24bit 6 channel audio to 16bit 2 channel audio.

To get it to decode the 24bit 6 channel audio the following setting needs to be set to true.
MFPKEY_WMADEC_HIRESOUTPUT=true. By default this is false.

http://msdn2.microsoft.com/en-us/library/aa964519.aspx

Any ideas how to edit this for playback in media portal?
 

phunqe

Portal Pro
April 28, 2007
236
0
Any news on this? Using SVN and having the same issue. 6-channel WMA file getting downmixed to 2-channel in MP.
Working correctly in WMP 9 & 11 on same machine.

Attached a 6-channel sample file.
 

jimmy06

New Member
May 21, 2007
2
0
51
I get the same problem too, with a player in windows, all my file are played in 5.1, but in mediaportal, it's downmix in 2 channels.

I am looking for an answer too.

If somebody can help us...
 

Users who are viewing this thread

Top Bottom