home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
WMA 5.1 in WMV decodes to stereo
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="granx" data-source="post: 78089" data-attributes="member: 14760"><p>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.</p><p></p><p>In doom9.org (<a href="http://forum.doom9.org/showthread.php?t=110449&page=3" target="_blank">http://forum.doom9.org/showthread.php?t=110449&page=3</a>) 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?</p><p></p><p>Edit: here is the MSDN article about this issue: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform95/htm/multichannelaudioplaybackindirectshow.asp" target="_blank">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform95/htm/multichannelaudioplaybackindirectshow.asp</a></p><p></p><p>IGraphBuilder *pGraph;</p><p>HRESULT hres;</p><p>IBaseFilter * pDmoFilter;</p><p></p><p>hres = CoCreateInstance(CLSID_DMOWrapperFilter, NULL, </p><p>CLSCTX_INPROC, IID_IBaseFilter, (void **)&pDmoFilter);</p><p></p><p>IDMOWrapperFilter *pWrap;</p><p>pDmoFilter->QueryInterface(IID_IDMOWrapperFilter, (void **)&pWrap);</p><p></p><p>hres = pWrap->Init(CLSID_CWMADecMediaObject, CLSID_CWMADecMediaObject);</p><p></p><p>pWrap->Release();</p><p></p><p>IPropertyBag *pPropertyBag = NULL;</p><p>hres = pDmoFilter->QueryInterface(IID_IPropertyBag, (void**)&pPropertyBag);</p><p></p><p>hres = SetHiResOutput(pPropertyBag);</p><p></p><p>hres = pGraph->AddFilter(pDmoFilter, L"WMA Filter");</p><p></p><p>hres = pGraph->RenderFile(FileName, NULL); </p><p></p><p></p><p>HRESULT SetHiResOutput(IPropertyBag* pBag)</p><p>{ </p><p>HRESULT hr = S_OK;</p><p></p><p>VARIANT myVar;</p><p>VARIANT myVar2;</p><p>VariantInit(&myVar);</p><p>VariantInit(&myVar2);</p><p></p><p>myVar.vt = VT_BOOL;</p><p>myVar.boolVal = TRUE;</p><p></p><p>myVar2.vt = VT_I4;</p><p>myVar2.iVal = DSSPEAKER_DIRECTOUT;</p><p></p><p>hr = pBag->Write(g_wszWMACHiResOutput, &myVar);</p><p>hr = pBag->Write(g_wszWMACSpeakerConfig, &myVar2);</p><p></p><p>return hr;</p><p>}</p></blockquote><p></p>
[QUOTE="granx, post: 78089, member: 14760"] 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 ([url]http://forum.doom9.org/showthread.php?t=110449&page=3[/url]) 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: [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform95/htm/multichannelaudioplaybackindirectshow.asp[/url] 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; } [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
WMA 5.1 in WMV decodes to stereo
Contact us
RSS
Top
Bottom