【问题标题】:MediaElement won't play supported video formatMediaElement 不会播放支持的视频格式
【发布时间】: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 文档(herehere)可以看出,应该支持编码。

但是当我将视频 URL 分配给媒体元素时,我会从 MediaFailed 事件中得到以下错误:

MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED:HRESULT - 0xC00D5212

有没有办法调试,视频的实际问题是什么,例如不支持哪种功能?我阅读了很多关于元数据和内容有问题的视频,并尝试了各种不同的编码,但无法找到问题所在。当您从 API 中得不到任何信息时,这有点困难。

【问题讨论】:

  • 我倾向于先用 windows 媒体播放器测试视频。我发现如果播放没有问题,媒体元素很可能会播放它。
  • Windows Media Player 确实会播放视频 :(

标签: c# video windows-8.1 h.264 mediaelement


【解决方案1】:

事实证明,他们向我们发送了 H.264 编码视频,嵌入到 AVI 容器中。这有点丑陋,MediaElement 不支持。切换到合适的 MPEG-4 容器解决了这个问题。

很遗憾,我们无法找到将我们指向正确方向的日志或异常详细信息,因此尝试和错误解决了问题。

【讨论】:

  • 你怎么能告诉容器?
  • 嗯,说不出来 - 可能是 VLC 或其他播放器显示此信息。
  • 我无法从 VLC 获取信息,所以我下载了 GSpot。
猜你喜欢
  • 1970-01-01
  • 2010-11-09
  • 1970-01-01
  • 1970-01-01
  • 2017-02-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-07-08
相关资源
最近更新 更多