I have created a custom ASF file using WMFSDK95 and the WMWriter object, of some strange reason the file can be successfully played with mplayer2 while it cannot be played using wmplayer.exe with error “The audio codec identified by the format tag 0x55 is required to play this file …”, why does this happen? Why wmplayer.exe can’t play the file while mplayer2.exe does? ‘l3codeca.acm’ exists on my system directory and is referred to by the registry “HKEY_CLASSES_ROOT\Windows Media\WMSDK\AudioDecode\85”
What is causing this problem ? Is it a WMPlayer BUG?
Nadav wrote: > I have created a custom ASF file using WMFSDK95 and the > WMWriter object, of some strange reason the file can be > successfully played with mplayer2 while it cannot be > played using wmplayer.exe with error "The audio codec > identified by the format tag 0x55 is required to play > this file .", why does this happen? Why wmplayer.exe > can't play the file while mplayer2.exe does? > 'l3codeca.acm' exists on my system directory and is > referred to by the registry "HKEY_CLASSES_ROOT\Windows > Media\WMSDK\AudioDecode\85"
> What is causing this problem ? > Is it a WMPlayer BUG?
While WMP6.4 uses the old WMSourceFilter, WMP7+ uses a private WM reader.
The old WMSourceFilter outputs compressed streams as they are, including their media types, leaving the task of decoding them to DirectShow.
WMP7+'s private reader outputs uncompressed streams, setting the task of decoding them to the WMF runtime, which is far more limited in its capabilities than DirectShow. For it to work, the media types must be set up correctly and there must be WMM or DMO decoders, and it still may not work. If I remember correctly, you are using a WDM-related major type instead of MEDIATYPE_Audio as I suggested (which may or may not solve the problem, but that's the correct value anyway).
-- // Alessandro Angeli // MVP :: Digital Media // a dot angeli at psynet dot net
Thanks for your response, I am using MEDIATYPE_Audio as major type, I wonder Is there any other way to resolve this problem? the codec used by graphedit to decode the audio stream is the "Fraunhofer IISMPEG Layer-3 Decoder" (l3codeca.acm) this is not a DMO nor it is a Windows Media Codec...
I am really desperate about this, any ideas will be apprecited.
P.S. I would rather not to use the AVI container...
bellow is the media type I use: majortype MEDIATYPE_Audio ( the previos post showed the name of COM whose CLSID matched MEDIATYPE_Audio as predented by the debug watch ) subtype {00000055-0000-0011-8000-00AA00389B01} bFixedSizeSamples 1 bTemporalCompression 0 lSampleSize 182 formattype {05589F81-C356-11CE-BF01-00AA0055595A} pUnk 0x00000000 cbFormat 30 pbFormat 0x06b53098
> > I have created a custom ASF file using WMFSDK95 and the > > WMWriter object, of some strange reason the file can be > > successfully played with mplayer2 while it cannot be > > played using wmplayer.exe with error "The audio codec > > identified by the format tag 0x55 is required to play > > this file .", why does this happen? Why wmplayer.exe > > can't play the file while mplayer2.exe does? > > 'l3codeca.acm' exists on my system directory and is > > referred to by the registry "HKEY_CLASSES_ROOT\Windows > > Media\WMSDK\AudioDecode\85"
> > What is causing this problem ? > > Is it a WMPlayer BUG?
> While WMP6.4 uses the old WMSourceFilter, WMP7+ uses a > private WM reader.
> The old WMSourceFilter outputs compressed streams as they > are, including their media types, leaving the task of > decoding them to DirectShow.
> WMP7+'s private reader outputs uncompressed streams, setting > the task of decoding them to the WMF runtime, which is far > more limited in its capabilities than DirectShow. For it to > work, the media types must be set up correctly and there > must be WMM or DMO decoders, and it still may not work. If I > remember correctly, you are using a WDM-related major type > instead of MEDIATYPE_Audio as I suggested (which may or may > not solve the problem, but that's the correct value anyway).
> -- > // Alessandro Angeli > // MVP :: Digital Media > // a dot angeli at psynet dot net
Nadav wrote: > Thanks for your response, I am using MEDIATYPE_Audio as > major type, I wonder Is there any other way to resolve > this problem? the codec used by graphedit to decode the > audio stream is the "Fraunhofer IISMPEG Layer-3 Decoder" > (l3codeca.acm) this is not a DMO nor it is a Windows > Media Codec...
DirectShow, and thus GraphEdit, should use the FhG MP3 decoder filter (l3codecx.ax) and not the FhG ACM codec (l3codeca.acm), while WMF (and thus WMP7+) should use the ACM codec. Those 2 decoder versions (DirectShow filter and ACM codec) do not behave exactly in the same way.
> I am really desperate about this, any ideas will be > apprecited.
Can you provide a short sample ASF with an MP3 stream created by your application? I do not have time to write my own muxer right now just to try.
-- // Alessandro Angeli // MVP :: Digital Media // a dot angeli at psynet dot net
> > Thanks for your response, I am using MEDIATYPE_Audio as > > major type, I wonder Is there any other way to resolve > > this problem? the codec used by graphedit to decode the > > audio stream is the "Fraunhofer IISMPEG Layer-3 Decoder" > > (l3codeca.acm) this is not a DMO nor it is a Windows > > Media Codec...
> DirectShow, and thus GraphEdit, should use the FhG MP3 > decoder filter (l3codecx.ax) and not the FhG ACM codec > (l3codeca.acm), while WMF (and thus WMP7+) should use the > ACM codec. Those 2 decoder versions (DirectShow filter and > ACM codec) do not behave exactly in the same way.
> > I am really desperate about this, any ideas will be > > apprecited.
> Can you provide a short sample ASF with an MP3 stream > created by your application? I do not have time to write my > own muxer right now just to try.
> -- > // Alessandro Angeli > // MVP :: Digital Media > // a dot angeli at psynet dot net
Nadav wrote: > Thanks for your immediate response, I would be happy to > send you a sample ASF file and my code, what mail should > I use?
Last line of the signature at the bottom of this post. It's written that way on purpose, so it's not easily machine-readable: please do not write it in clear in a Usenet message. Try to send something under 1 MiB if possible.
-- // Alessandro Angeli // MVP :: Digital Media // a dot angeli at psynet dot net
Thanks for your help, now wmplayer.exe is able to play my files, I wonder, why does mplayer2.exe and graphedt.exe doesn't have this requierment? do they use a different codec? where does this wBitsPerSample = 0 is written? is it available to everyone or only to MVPs that have access to the source code? -- Nadav http://www.sophin.com
Nadav wrote: > Thanks for your help, now wmplayer.exe is able to play > my files, I wonder, why does mplayer2.exe and > graphedt.exe doesn't have this requierment? > do they use a different codec?
As I said, GE and WMP6.4 use the DirectShow decoder while WMP7+ uses the ACM one: most likely the DirectShow decoder ignores the wBitsPerSample field while the ACM one tries to match it and it expects 0 (which means it is ignored anyway).
> where does this wBitsPerSample = 0 is > written?
You mean where is it written what value to use for a given format? Nowhere.
> is it available to everyone or only to MVPs that > have access to the source code?
I don't have access to the source code of either WMP or the MP3 decoder so, yes it is available to everyone. I found out this way: I used VirtualDub to create a WAV containing an MP3 stream compressed by the system's ACM codec, then I opened both this WAV and your ASF in an hex editor, found the MPEGLAYER3WAVEFORMAT in both and compared them. There were a couple of different fields, so I started modifying your ASF in the hex editor to match the structure in the WAV and this way I discovered that what the ACM decoder didn't like was the wBitsPerSample value set to anything but 0 (which is the correct value for MP3, when you think of it: MP3 itself does not have a fixed bits/sample ratio).
-- // Alessandro Angeli // MVP :: Digital Media // a dot angeli at psynet dot net
> > Thanks for your help, now wmplayer.exe is able to play > > my files, I wonder, why does mplayer2.exe and > > graphedt.exe doesn't have this requierment? > > do they use a different codec?
> As I said, GE and WMP6.4 use the DirectShow decoder while > WMP7+ uses the ACM one: most likely the DirectShow decoder > ignores the wBitsPerSample field while the ACM one tries to > match it and it expects 0 (which means it is ignored > anyway).
> > where does this wBitsPerSample = 0 is > > written?
> You mean where is it written what value to use for a given > format? Nowhere.
> > is it available to everyone or only to MVPs that > > have access to the source code?
> I don't have access to the source code of either WMP or the > MP3 decoder so, yes it is available to everyone. I found out > this way: I used VirtualDub to create a WAV containing an > MP3 stream compressed by the system's ACM codec, then I > opened both this WAV and your ASF in an hex editor, found > the MPEGLAYER3WAVEFORMAT in both and compared them. There > were a couple of different fields, so I started modifying > your ASF in the hex editor to match the structure in the WAV > and this way I discovered that what the ACM decoder didn't > like was the wBitsPerSample value set to anything but 0 > (which is the correct value for MP3, when you think of it: > MP3 itself does not have a fixed bits/sample ratio).
> -- > // Alessandro Angeli > // MVP :: Digital Media > // a dot angeli at psynet dot net
As usual, some bloody useful info there from the MVPs, and not just applicable to this particular situation. I've just done exactly the same thing to solve one of my problems. Cheers Alessandro!