Silverlight Media Player视频格式 [英] Silverlight Media Player video formats

查看:109
本文介绍了Silverlight Media Player视频格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

Silverlight媒体播放器是否仅采用wmv格式,为什么它不能播放avi,mp4等其他格式的文件...

Hi all,

Does Silverlight media player takes only wmv formats, why it cannot play other format files like avi,mp4 etc...

推荐答案

请参见
See here[^] for a list of supported formats.


为回答您的问题,我将首先从《问题解决方法Silverlight食谱》 一书中引用:"Silverlight支持Microsoft ASF和MP4文件格式(也称为MPEG-4文件格式第2版) "

WMV和WMA文件遵循ASF文件容器结构. MP4和MOV也可以由Silverlight解码,因为它们是MP4容器结构的常见变体.

因此,基于这种理解,我可以说Silverlight可以采用WMV,WMA,MP4和MOV.

但是几乎总是有一个"BUT",即使Silverlight可以使用上述容器格式或结构,也只有在使用Windows Media VC-1/H.264(或MPEG-4等效格式)对那些文件格式进行编码的情况下,它才能进行解码.第10部分和MPEG-4高级视频编解码器)标准.

现在,根据Author的说法,Silverlight具有开箱即用的支持.

是的,Silverlight不支持现成的AVI文件结构.对于这些类型,您将必须编写自己的代码,然后可以将其与Silverlight挂钩,以从avi视频渲染帧,如下面的代码项目文章链接所示:

使用MediaElement和MediaStreamSource在Silverlight 4中播放AVI文件 [
To answer your question I will first quote from a book Silverlight Recipes, A Problem Solution Approach that "Silverlight supports the Microsoft ASF and MP4 File Formats (also known as MPEG-4 File Format version 2)"

WMV and WMA files follows the ASF file container structures. MP4 and MOV can also be decoded by Silverlight as they are common variants of the MP4 container structure.

So, based on that understanding I can say Silverlight can take WMV, WMA, MP4 and MOV.

But there is almost always a "BUT", that even though Silverlight can consume the above container formatsor structures, it can only decode if those file formats are encoded using Windows Media VC-1/H.264 (or equiv. in MPEG-4 part 10 and the MPEG-4 Advanced Video Codec) standards.

Now, that is according to the Author, out-of-the-box support in Silverlight.

And yes, Silverlight does not support out-of-the-box AVI file structures. For these types you will have to write your own code which you can then hook up with Silverlight to render frames from an avi video as in the code project article link below:

Play AVI files in Silverlight 4 using MediaElement and MediaStreamSource[^]


这篇关于Silverlight Media Player视频格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆