View Full Version : Comparison ASF versus other containers
stiedzjen
30th November 2005, 09:15
How does ASF compare to other modern containers like Matroska and .mp4 in features, stability, file size, etc? I'm not looking for a good-bad opinion (I can make up my own mind about that), but rather for some information about whether ASF is suitable for storing video (probably with some custom non-media streams and metadata) and streaming it over networks.
As you might have guessed, I'm not exactly using it for entertainment :-), but rather for professional "industry" video information.
I'm also especially interested in the support for ASF from players and other tools. How widly spread is ASF?
I found this article (http://www.advogato.org/article/101.html) which explains that ASF is patented and that this probably prohibits the use of ASF outside of the Microsoft tools or commercial products. The article is already 5 years old, so I don't know how actual this issue still is. Does this affect at all the distribution of ASF in tools and players?
I did a little search on this forum, but mostly I found only comments that say that ASF sucks. However, very few people say why ;-)
Caroliano
30th November 2005, 14:45
In wikipedia:
http://en.wikipedia.org/wiki/Advanced_Streaming_Format
http://en.wikipedia.org/wiki/Comparison_of_container_formats
It is a good format for streaming purposes, but are better alternatives for storage. Also the patent issue prohibits you see it in 3rd part players in US as they reverse-enginered that (If I understand correctly). So american linux and other OS users cant play legaly that.
zambelli
30th November 2005, 21:27
Here are the Windows Media licensing fees:
http://www.microsoft.com/windows/windowsmedia/licensing/licensing.aspx
Basically, on Windows anyone can use Windows Media Format SDK for free.
Dmitry Vergheles
1st December 2005, 13:39
How does ASF compare to other modern containers like Matroska and .mp4 in features, stability, file size, etc? I'm not looking for a good-bad opinion (I can make up my own mind about that), but rather for some information about whether ASF is suitable for storing video (probably with some custom non-media streams and metadata) and streaming it over networks.
As you might have guessed, I'm not exactly using it for entertainment :-), but rather for professional "industry" video information.
I'm also especially interested in the support for ASF from players and other tools. How widly spread is ASF?
I found this article (http://www.advogato.org/article/101.html) which explains that ASF is patented and that this probably prohibits the use of ASF outside of the Microsoft tools or commercial products. The article is already 5 years old, so I don't know how actual this issue still is. Does this affect at all the distribution of ASF in tools and players?
I did a little search on this forum, but mostly I found only comments that say that ASF sucks. However, very few people say why ;-)
Without considering of ASF as a native format for WMV and WMA, since it was made for these purposes first of all, there are some disagreeable things with ASF as an universal container.
Here are some points:
1. Issues with playing ASF files containing video data encoded by third-party codecs (not WindowsMedia) by standard WindowsMediaPlayer 7.0 and above(up to current - 10.0):
Though ASF is fully DirectShow comatible (DirectX Runtime ships asf demultiplexer called WMASF Reader) WM Player doesn't use DirectShow to play Windows Media Files.
That means for playing ASF files with a third-party content one has to have a corresponding decoder as either VFW or DMO and not as an ordinary DirectShow filter.
There are very few DMO decoders by not Microsoft vendors..
As for VFW - nearly all VFW decoders, including ffdshow and native divx ones, don't operate within WMP properly... This is just an experience.
Nevertheless all the players using DirectShow play such files ok.
2. As http://en.wikipedia.org/wiki/Comparison_of_container_formats says:
ASF supports B Frames but AVI does only through hacks.
That's not a true (or not a fully true).
I don't know whether ASF is ok with WMV B frames but to save third-party ones there is needed a slynes.
Micrsoft says for this theme the following:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform95/htm/tocreateasffilesusingthirdpartycodecs.asp
When writing the file:
Add a fixed-size data unit extension (DUE) to each input sample that will hold a structure that contains the actual MPEG time-stamp start-time and stop-time values for the sample. Use -1 for these values if the sample has no time stamp.
Give the writer object "dummy" input time stamps that are always increasing so that it will write the samples to the file in exactly the same order as they are received. The dummy time stamps should correspond approximately to the actual presentation times, as averaged over time. The dummy time stamps will form the seeking timeline, so if they diverge relative to the real time stamps, seek operations on the file will produce unexpected results. However, a limited amount of jitter between the sample times will not seriously affect seek operations.
When reading the file:
For each sample read from the file, examine the DUE. If it contains a start time that is greater than or equal to zero, copy that value to the time stamp for the output sample before it is delivered to the decoder. Set all other time stamps on the output samples to NULL. In DirectShow, this is done by calling IMediaSample::SetTime(NULL,NULL).
This approach implies using of additional software for playing such files.
And this means it will be a bit difficult to force any player e.g. WMP play such files.
3. ASF only supports FourCC based decoders mediatypes.
Not all the compressed video formats have such mediatypes.
E.g. MPEG2 video doesn't.
Though there are some more technical troubles with ASF I suppose that's enough to understand that ASF is not an ideal media format.
Although I don't think anywhere such one can appear :) ;)
Valeron
2nd December 2005, 01:07
Without considering of ASF as a native format for WMV and WMA, since it was made for these purposes first of all, there are some disagreeable things with ASF as an universal container.
Here are some points:
1. Issues with playing ASF files containing video data encoded by third-party codecs (not WindowsMedia) by standard WindowsMediaPlayer 7.0 and above(up to current - 10.0):
Though ASF is fully DirectShow comatible (DirectX Runtime ships asf demultiplexer called WMASF Reader) WM Player doesn't use DirectShow to play Windows Media Files.
That means for playing ASF files with a third-party content one has to have a corresponding decoder as either VFW or DMO and not as an ordinary DirectShow filter.
There are very few DMO decoders by not Microsoft vendors..
As for VFW - nearly all VFW decoders, including ffdshow and native divx ones, don't operate within WMP properly... This is just an experience.
Nevertheless all the players using DirectShow play such files ok.
.
But why I can play asf with MPEG-4 ASP codecs stream so well with your muxer?
2. As http://en.wikipedia.org/wiki/Comparison_of_container_formats says:
ASF supports B Frames but AVI does only through hacks.
That's not a true (or not a fully true).
I don't know whether ASF is ok with WMV B frames but to save third-party ones there is needed a slynes.
Micrsoft says for this theme the following:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform95/htm/tocreateasffilesusingthirdpartycodecs.asp
This approach implies using of additional software for playing such files.
And this means it will be a bit difficult to force any player e.g. WMP play such files.
This is an issue I'm also interested. Thanks for the link.
3. ASF only supports FourCC based decoders mediatypes.
Not all the compressed video formats have such mediatypes.
E.g. MPEG2 video doesn't.
afaik, in WM Format SDK docs, there's an article describe how to place MPEG-2 stream in ASF.
Dmitry Vergheles
2nd December 2005, 07:23
But why I can play asf with MPEG-4 ASP codecs stream so well with your muxer?
Because Microrsoft ships MPEG4 ASP DMO decoders with DX Runtime
Valeron
2nd December 2005, 14:22
Because Microrsoft ships MPEG4 ASP DMO decoders with DX Runtime
NO, I mean DivX5 stream decode with ffdshow.
The whole process really perform so well with MPC in my PC.
zambelli
3rd December 2005, 01:56
The whole process really perform so well with MPC in my PC.
I believe MPC uses DirectShow all the way. Dmitry's point was that if you're using the WMF SDK, the decoder needs to be VfW or DMO. WMP7,8,9,10 use WMF SDK for playback of ASF and MP3, and fall back on DShow for everything else.
There's also the possibility that you have FFdshow enabled for VfW MPEG-4 decoding.
Edit:
You can check this out for yourself. Download DivX_MP3.asf (http://www.citizeninsomniac.com/video/DivX_MP3.asf). In ffdshow config, enable DX50 decoding for DirectShow but disable it for VfW (that's probably your default setting anyway). If you play the file in WMP, you'll get a codec error. If you play the file in MPC or GraphEdit, it will play fine. Now go and enable VfW decoding for DX50 in ffdshow and try playing the file again in WMP. It will play without errors this time (although my build of ffdshow from Nov 2005 seems to be broken - it just renders black - I've verified that this does not repro with official DivX decoder so it's likely a ffdshow bug). This shows that a DirectShow pipeline can handle any decoder type (VfW, DShow or DMO) while a WMF SDK pipeline can only handle VfW and DMO decoders.
bond
3rd December 2005, 03:02
You can check this out for yourself. Download DivX_MP3.asf (http://www.citizeninsomniac.com/video/DivX_MP3.asf). In ffdshow config, enable DX50 decoding for DirectShow but disable it for VfW (that's probably your default setting anyway). If you play the file in WMP, you'll get a codec error. If you play the file in MPC or GraphEdit, it will play fine. Now go and enable VfW decoding for DX50 in ffdshow and try playing the file again in WMP. It will play without errors this time (although my build of ffdshow from Nov 2005 seems to be broken - it just renders black - I've verified that this does not repro with official DivX decoder so it's likely a ffdshow bug). This shows that a DirectShow pipeline can handle any decoder type (VfW, DShow or DMO) while a WMF SDK pipeline can only handle VfW and DMO decoders.whats the reason for this?
zambelli
3rd December 2005, 23:14
whats the reason for this?
No idea. It does seem odd that 1st and 3rd generation of decoder technologies would be supported but not the 2nd. My guess is that it was an implementation obstacle of some sort and not necessarily a conscious design decision.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.