我怎样才能在Windows 8地铁C#应用程序XAML播放H.264视频RTSP? [英] How can I play H.264 RTSP video in Windows 8 Metro C# XAML app?

查看:221
本文介绍了我怎样才能在Windows 8地铁C#应用程序XAML播放H.264视频RTSP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从URL像提供了一个H.264视频流的设备:
RTSP://192.168.0.10:554 / videoservice

I have a device that provides an H.264 video stream from a URL like: rtsp://192.168.0.10:554/videoservice

由于这是实时视频我并不需要能够控制它(暂停,倒带,等等),只是玩。这是由的MediaElement 或其他标准类支持,做我需要的东西如平滑流媒体客户端SDK 或这是很多比我想象的更复杂?

Since this is live video I don't need to be able to control it (pause, rewind, etc), just play. Is this supported by MediaElement or another standard class, do I need something like Smooth Streaming Client SDK or is this a lot more complicated than I thought?

更新:
我下载了微软的播放器框架但这并不无论是播放流。我无法找到约RTSP例子什么

Update: I downloaded Microsoft's Player Framework but this doesn't play the stream either. I can't find anything in the examples about RTSP.

更新:
我用的 Wireshark的来的 VLC媒体播放器(工作)与MediaElement的和播放器发送数据包比较框架和他们都不似乎使用RTSP协议。相反,他们正在发送 WPAD 数据包发送到不同的地址,即使我提供的源IP地址。为什么这个必要吗?有没有把这个行为关闭任何方式

Update: I used Wireshark to compare the packets that VLC Media Player (which works) sends with MediaElement and Player Framework and neither of them seemed to use RTSP protocol. Instead they're sending WPAD packets to a different address, even though I've provided the IP address of the source. Why is this necessary? Is there any way of turning this behaviour off?

推荐答案

请参阅后的此处。你需要用的MPEG-4第14部分容器您的数据,然后将它们传递到 MediaElement.SetSource 。看来你不能这样做只是使用记录的API。下面是从链接中的重要信息:

See the post here. You need to wrap your data in MPEG-4 Part 14 containers and then pass them into MediaElement.SetSource. It appears you can't do this just using the documented API. Here is the important information from the link:

我们不支持RTP而是MPEG-4第14部分容器格式。
你需要编写自己的源代码,以便能够解析数据
直接传递到Microsoft解码器。在这个时候,我们没有
如何编写自定义源的任何样本,并将它从$ B $装B的Metro风格应用。遗憾的是,不能简单地用
的文档,以找出如何做到这一点。我一直在讲
斯坦,我们正在试图找出如何以及何时我们可以让
提供这些信息。当此信息可用
我将宣布它在我的博客 http://blogs.msdn.com/mediasdkstuff/

We don't support RTP but rather the MPEG-4 Part 14 container format. You will need to write our own source to be able to parse the data a pass it directly to the Microsoft decoder. At this time we do not have any samples on how to write a custom source and have it loaded from your Metro style app. Unfortunately it is not possible to simply use the documentation to figure out how to do this. I have been talking with Stan and we are trying to figure out how and when we can make this information available. As soon as this information is available I will announce it on my blog http://blogs.msdn.com/mediasdkstuff/.

这里是支持的视频格式的列表

Here is a list of supported video formats.

还有一个例子的这里的如何延长这可能有一个如何做类似的东西一个例子传媒类你问

有一个类似的例子这里

这篇关于我怎样才能在Windows 8地铁C#应用程序XAML播放H.264视频RTSP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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