Discussion:
An wmv file that can't played by WMASFReader, what should I do?
(too old to reply)
Tomasen
2010-05-28 03:43:06 UTC
Permalink
I wrote a mediaplayer using WMAsfReader.

Now I found some wmv can't be played by WMAsfReader properly, but it does be
able to played by latest windows media player.

What is going on? Is there another reader can replace WMAsfReader?

Sample file can be download via emule
ed2k://|file|wmv_cant_play.wmv|153407649|D2408E6047D4B0B7936E3D9228766694|h=N2KTNAST2Y7XEFJD5FI2X4ERUBC6J6IA|/
--
Thanks

Tomasen
Alessandro Angeli
2010-05-28 20:23:07 UTC
Permalink
From: "Tomasen"
Post by Tomasen
Sample file can be download via emule
ed2k://|file|wmv_cant_play.wmv|153407649|D2408E6047D4B0B7936E3D9228766694|h=N2KTNAST2Y7XEFJD5FI2X4ERUBC6J6IA|/
Not everybody has an eDonkey2000-compatible client and I for one have no
intention of installing one just to check out your file.
--
Alessandro
Tomasen
2010-05-29 06:11:03 UTC
Permalink
The file is just for a reference if anyone wanna to check that out. The
question still stand even without the file.
--
Tomasen
Post by Alessandro Angeli
From: "Tomasen"
Post by Tomasen
Sample file can be download via emule
ed2k://|file|wmv_cant_play.wmv|153407649|D2408E6047D4B0B7936E3D9228766694|h=N2KTNAST2Y7XEFJD5FI2X4ERUBC6J6IA|/
Not everybody has an eDonkey2000-compatible client and I for one have no
intention of installing one just to check out your file.
--
Alessandro
Alessandro Angeli
2010-05-29 20:35:13 UTC
Permalink
From: "Tomasen"
Post by Tomasen
The file is just for a reference if anyone wanna to check that out.
The question still stand even without the file.
But without the sample file I can't think of anything that may be wrong.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Tomasen
2010-05-31 12:36:04 UTC
Permalink
You are right. I just uploaded the sample file to
http://www.tomasen.org/tmp/wmv_cant_play.wmv

Hope that can help the question. The player's source code can reff to the
DSPlay sample from windows media sdk.
--
Tomasen
Post by Alessandro Angeli
From: "Tomasen"
Post by Tomasen
The file is just for a reference if anyone wanna to check that out.
The question still stand even without the file.
But without the sample file I can't think of anything that may be wrong.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Alessandro Angeli
2010-06-01 22:50:13 UTC
Permalink
From: "Tomasen"
Post by Tomasen
You are right. I just uploaded the sample file to
http://www.tomasen.org/tmp/wmv_cant_play.wmv
The file is broken: it is missing the index and the data section is
truncated. Try the ASF parser available on www.gdcl.co.uk: it uses the
same WMReader object the stock WMAsfReader uses, but in a different way
that may work around this issue.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Tomasen
2010-06-03 17:50:47 UTC
Permalink
Thanks. I tried with the source code from gdcl. Still couldn't process the
file correctly.

Thanks to the source code, that I can sort of monitoring where it goes
wrong.

gdcl version of WMV demuxer use WMReader and imeplement IWMReaderCallback
etc.

When reading begin, IWMStatusCallback::OnStatus received notify WMT_ERROR ,
with hr = 0x8000ffff. Then the parsing stoped :(

I tried to remove NotifyEvent(EC_ERRORABORT, hr, 0); after that but it
didn't help.

:(
--
Tomasen
Post by Alessandro Angeli
From: "Tomasen"
Post by Tomasen
You are right. I just uploaded the sample file to
http://www.tomasen.org/tmp/wmv_cant_play.wmv
The file is broken: it is missing the index and the data section is
truncated. Try the ASF parser available on www.gdcl.co.uk: it uses the
same WMReader object the stock WMAsfReader uses, but in a different way
that may work around this issue.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Alessandro Angeli
2010-06-03 19:59:32 UTC
Permalink
From: "Tomasen"
Post by Tomasen
gdcl version of WMV demuxer use WMReader and imeplement
IWMReaderCallback etc.
When reading begin, IWMStatusCallback::OnStatus received notify
WMT_ERROR , with hr = 0x8000ffff. Then the parsing stoped :(
Let me give you the full story of ASF and you'll decide what to do.

MS produced at least 3 ASF parsers used in WMP:

1. The first one was the old WindowsMediaSourceFilter for DirectShow,
used in WMP6.4,which could parse pretty much anything that looked like
an ASF, but was very bad at seeking (it was meant for streaming, not
local file playback). This is available from Win98SE to XP, but it was
dropped in Vista.

2. The second one was the WMReader object provided in the
WindowsMediaFormat runtime. With it came 2 DirectShow filters: the
public WMASFReader and the secret (and better) WMRenderer (or whatever
its exact name) used internally by WMP7 to WMP10. It is also the one
used by the GDCL filter. It seeks very well local files, but it will not
seek at all if the files have no index. And apparently it also refuses
to parse truncated files by throwing an E_UNEXPECTED.

3. Starting with WMP11 on Vista, WMP started using MediaFoundation for
ASF playback instead of DirectShow and so it used the new ASF parser
included in MF. WMP11 installs a private porting of MF on XP as well and
my guess is that it is using the MF ASF parser on XP, too, and that this
new parser is more forgiving than the WMReader in WMF.

You can try using the old WMSF, but it will *not* be avaiable on Vista
or newer.

Or you can try the MF ASF parser (or the MS ASF source in an actual MF
pipeline) but it will *only* be avaiable on Vista or newer. If it works,
you can try using it on XP, too, even though it is not officially
supported (but at least part of MF works on XP as long as WMP11 is
installed).

Or you can write your own ASF parser based on the ASF specs available on
the MS website. Not the easiest solution.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Loading...