I have a device that provides an H.264 video stream from a URL like: rtsp://192.168.0.10:554/videoservice
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?
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.
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?
In this article The Real-Time Streaming Protocol (RTSP): Windows Media Extensions are used for transmitting real-time multimedia data such as audio and video data from a server to a client. RTSP streams multimedia from Windows Media Services to Windows Media Player or other instances of Windows Media Services.
Step 1: Download and install VLC Player from http://www.videolan.org/vlc/. Step 2: Open VLC player and select“Open Network Stream”from the Media menu. Step 3: Type the network URL in the dialog box below, and then click Play to play the video with RTSP stream.
What is RTSP? Real-Time Streaming Protocol, or RTSP, is a network control protocol designed for use in entertainment and communications systems to control streaming media servers(source), like IP cameras and DVRs. It is by the RTSP stream that an NVR can set up, play, pause, and teardown a video stream.
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:
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.
There is also an example here of how to extend the media class which might have an example of how to do something similar to what you are asking.
There is a similar example here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With