【发布时间】:2015-02-20 11:27:28
【问题描述】:
我们想在 Windows 8.1 应用中播放客户使用 MediaElement 提供的视频。视频使用 H.264 编码:
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Bit rate mode : Variable
Bit rate : 9 300 Kbps
Maximum bit rate : 11.1 Mbps
Width : 1 080 pixels
Height : 1 920 pixels
Frame rate mode : Constant
Frame rate : 30.000 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
从 MSDN 文档(here 和 here)可以看出,应该支持编码。
但是当我将视频 URL 分配给媒体元素时,我会从 MediaFailed 事件中得到以下错误:
MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED:HRESULT - 0xC00D5212
有没有办法调试,视频的实际问题是什么,例如不支持哪种功能?我阅读了很多关于元数据和内容有问题的视频,并尝试了各种不同的编码,但无法找到问题所在。当您从 API 中得不到任何信息时,这有点困难。
【问题讨论】:
-
我倾向于先用 windows 媒体播放器测试视频。我发现如果播放没有问题,媒体元素很可能会播放它。
-
Windows Media Player 确实会播放视频 :(
标签: c# video windows-8.1 h.264 mediaelement