我们一直致力于处理原始H.264和AAC内容的流媒体应用。我们使用MediaStreamSource向MediaElement提供样本,并且在我们使用PC SilverLight(在IE9上)进行音频/视频播放时没有发现问题。只有音频的流在WP7上也能正常工作。但是,我们面临以下WP7上使用的视频播放问题:使用MediaStreamSource进行视频播放,WP7上的MediaElement
•当媒体流的视频流属性不CodecPrivateData,MediaElement的初始化“失败”事件处理函数,错误代码为3100的视频流的属性被初始化为:
Dictionary<MediaStreamAttributeKeys, string> videoStreamAttributes = new Dictionary<MediaStreamAttributeKeys, string>();
videoStreamAttributes[MediaStreamAttributeKeys.VideoFourCC] = "H264";
this.videoStreamDescription = new MediaStreamDescription(MediaStreamType.Video, videoStreamAttributes);
•当媒体流的视频流属性与CodecPrivateData初始化([启动代码] [SPS] [起始码] [PPS])的视频播放,但似乎以更快的速度被打 - 2至3倍指定的FPS。视频流属性被初始化为:
Dictionary<MediaStreamAttributeKeys, string> videoStreamAttributes = new Dictionary<MediaStreamAttributeKeys, string>();
videoStreamAttributes[MediaStreamAttributeKeys.VideoFourCC] = "H264";
videoStreamAttributes[MediaStreamAttributeKeys.CodecPrivateData] = "000000012742000D96540A0FD8080F162EA00000000128CE060C88";
this.videoStreamDescription = new MediaStreamDescription(MediaStreamType.Video, videoStreamAttributes);
注意相同的流播放罚款PC SilverLight的有和无CodecPrivateData与音频以及视频。 视频流属性初始化有问题吗?什么可能导致这个问题,我们如何解决它?
Regards, NKS。
我也有这个问题,你能帮我吗? –
对不起,上面的答案不是描述性的。我只是转换了每个样本的时间戳值。 newTs = oldTS * 90kHz/1MHz。 –