wpf MediaElement 支持哪些格式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28394220/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What formats does the MediaElement support?
提问by Jermain Defo
In C# what formats does the MediaElementsupport?
在 C# 中MediaElement支持哪些格式?
回答by Nikolay Kostov
Below is a rollup list of formats codecs supported by the MediaElement. These encodings are supported regardless of the file name extension.
以下是MediaElement. 无论文件扩展名如何,都支持这些编码。
Source: https://msdn.microsoft.com/en-us/library/cc189080(v=vs.95).aspx
来源:https: //msdn.microsoft.com/en-us/library/cc189080(v=vs.95).aspx
- Video
- Raw Video
- RGBA format
- Uncompressed 32 bit Alpha Red, Green, Blue.
- On Windows Phone 7, the alpha channel is ignored.
- YV12 format- YCrCb(4:2:0)
- Uncompressed YCrCb(4:2:0).
- Not supported on Windows Phone 7.
- RGBA - 32 bit Alpha Red, Green, Blue
- Windows Media Video and VC-1 formatsWMV1: Windows Media Video 7
- Supports Simple, Main, and Advanced Profiles.
- Supports only progressive (non-interlaced) content.
- WMV2: Windows Media Video 8
- WMV3: Windows Media Video 9
- Supports Simple and Main Profiles.
- Supports only progressive (non-interlaced) content.
- WMVA: Windows Media Video Advanced Profile, non-VC-1
- WVC1: Windows Media Video Advanced Profile, VC-1
- Supports Advanced Profile.
- Supports only progressive (non-interlaced) content.
- H264 (ITU-T H.264 / ISO MPEG-4 AVC) formats
- Supports H.264 and MP43 codecs.
- Supports Base, Main, and High Profiles.
- Windows Phone 7 supports up to Level 3.0.
- Note that level 3.0 defines the maximum supported resolution for 30fps as 720x480. Other frame rates have different maximum supported resolutions.
- Supports only progressive (non-interlaced) content.
- Supports only 4:2:0 chroma subsampling profiles.
- Desktop Silverlight only supports the Annex B NAL format (i.e. start codes).
- Note, that media libraries, such as the SmoothStreamingMediaElement, support the AVC NAL format by programmatically converting AVC NALs to Annex B NALs. As Silverlight supports partial encryption of H.264 samples, this conversion can occur on encrypted content as well if the NAL headers are not encrypted. The Annex B NAL format is described in MPEG-4 Part 10.
- Supports PlayReady DRM with Mp4 (H264 and AAC-LC)
- H.263 format
- Not supported by desktop versions of Silverlight.
- Not supported by the MediaStreamSource class in Windows Phone 7.
- MPEG-4 Part 2 format
- Supports Simple and Advanced Profiles.
- Audio
- PCM / WAV format"1". This is Linear 8 or 16 bit Pulse Code Modulation. Roughly speaking, this is WAV format.
- This is Linear 8 or 16 bit Pulse Code Modulation. Roughly speaking, this is WAV format.
- Microsoft Windows Media Audio Standard formats."353" - Microsoft Windows Media Audio v7, v8 and v9.x Standard (WMA Standard)
- Microsoft Windows Media Audio Professional formats."354" - Microsoft Windows Media Audio v9.x and v10 Professional (WMA Professional)
- Supports full fidelity decoding of WMA 10 Professional Low Bit Rate (LBR) modes in the 32-96 kbps range.
- Multichannel (5.1 and 7.1 surround) audio content is automatically mixed down to stereo.
- 24 bit audio will return silence.
- Sampling Rates beyond 48000 return an invalid format error code in same-domain and a 4001 in cross-domain scenarios.
- MP3 "85" -– (ISO MPEG-1 Layer III) format (MP3).
- AAC"255" - (ISO Advanced Audio Coding) (AAC)format.
- Supports Low Complexity (AAC-LC) decoding at full fidelity (up to 48 kHz).
- High Efficiency (HE-AAC) encoded content. will decode only at half fidelity (up to 24 kHz).
- HE-AAC v1 (AAC+) and HE-AAC v2 (eAAC+) supported.
- Desktop Silverlight will decode only at half fidelity (up to 24 kHz).
- Multichannel (5.1 surround) audio content is not supported.
- AMR-NB (Adaptive Multi-Rate Narrow Band) format
- Not supported by desktop versions of Silverlight.
- Not supported by the MediaStreamSource class.
- PCM / WAV format"1". This is Linear 8 or 16 bit Pulse Code Modulation. Roughly speaking, this is WAV format.
- Additional Restrictions
- The following codec formats are not supported on any Silverlight platform:
- Windows Media Screen
- Windows Media Audio Professional Lossless
- Windows Media Voice
- Windows Phone 7 does not support dynamic changes in video frame size
- The following codec formats are not supported on any Silverlight platform:
- 视频
- 原始视频
- RGBA 格式
- 未压缩的 32 位 Alpha 红、绿、蓝。
- 在 Windows Phone 7 上,Alpha 通道被忽略。
- YV12 格式- YCrCb(4:2:0)
- 未压缩的 YCrCb(4:2:0)。
- Windows Phone 7 不支持。
- RGBA - 32 位 Alpha 红、绿、蓝
- Windows Media Video 和 VC-1 格式WMV1:Windows Media Video 7
- 支持简单、主要和高级配置文件。
- 仅支持渐进(非隔行)内容。
- WMV2:Windows 媒体视频 8
- WMV3:Windows 媒体视频 9
- 支持简单和主要配置文件。
- 仅支持渐进(非隔行)内容。
- WMVA:Windows Media 视频高级配置文件,非 VC-1
- WVC1:Windows Media 视频高级配置文件,VC-1
- 支持高级配置文件。
- 仅支持渐进(非隔行)内容。
- H264(ITU-T H.264 / ISO MPEG-4 AVC)格式
- 支持 H.264 和 MP43 编解码器。
- 支持 Base、Main 和 High Profile。
- Windows Phone 7 最高支持级别 3.0。
- 请注意,级别 3.0 将 30fps 支持的最大分辨率定义为 720x480。其他帧速率具有不同的最大支持分辨率。
- 仅支持渐进(非隔行)内容。
- 仅支持 4:2:0 色度子采样配置文件。
- 桌面 Silverlight 仅支持 Annex B NAL 格式(即开始代码)。
- 请注意,媒体库(例如 SmoothStreamingMediaElement)通过以编程方式将 AVC NAL 转换为 Annex B NAL 来支持 AVC NAL 格式。由于 Silverlight 支持对 H.264 样本进行部分加密,因此如果 NAL 标头未加密,这种转换也可能发生在加密内容上。附件 B NAL 格式在 MPEG-4 Part 10 中描述。
- 支持带有 Mp4(H264 和 AAC-LC)的 PlayReady DRM
- H.263 格式
- Silverlight 的桌面版本不支持。
- Windows Phone 7 中的 MediaStreamSource 类不支持。
- MPEG-4 第 2 部分格式
- 支持简单和高级配置文件。
- 声音的
- PCM/WAV 格式“1”。这是线性 8 位或 16 位脉冲编码调制。粗略地说,这是WAV格式。
- 这是线性 8 位或 16 位脉冲编码调制。粗略地说,这是WAV格式。
- Microsoft Windows Media Audio Standard 格式。"353" - Microsoft Windows Media Audio v7、v8 和 v9.x 标准(WMA 标准)
- Microsoft Windows Media Audio Professional 格式。"354" - Microsoft Windows Media Audio v9.x 和 v10 Professional (WMA Professional)
- 支持 32-96 kbps 范围内的 WMA 10 专业低比特率 (LBR) 模式的全保真解码。
- 多声道(5.1 和 7.1 环绕声)音频内容会自动混合为立体声。
- 24 位音频将返回静音。
- 超过 48000 的采样率在同域中返回无效格式错误代码,在跨域场景中返回 4001。
- MP3 "85" -– (ISO MPEG-1 第三层) 格式 (MP3)。
- AAC"255" - (ISO 高级音频编码) (AAC) 格式。
- 支持全保真(高达 48 kHz)的低复杂度 (AAC-LC) 解码。
- 高效 (HE-AAC) 编码内容。将仅以半保真度(高达 24 kHz)解码。
- 支持 HE-AAC v1 (AAC+) 和 HE-AAC v2 (eAAC+)。
- 桌面 Silverlight 将仅以半保真度(高达 24 kHz)解码。
- 不支持多声道(5.1 环绕声)音频内容。
- AMR-NB(自适应多速率窄带)格式
- Silverlight 的桌面版本不支持。
- MediaStreamSource 类不支持。
- PCM/WAV 格式“1”。这是线性 8 位或 16 位脉冲编码调制。粗略地说,这是WAV格式。
- 附加限制
- 任何 Silverlight 平台都不支持以下编解码器格式:
- 视窗媒体画面
- Windows Media Audio Professional 无损
- 视窗媒体语音
- Windows Phone 7 不支持动态改变视频帧大小
- 任何 Silverlight 平台都不支持以下编解码器格式:

