0

I want to build a Silverlight live feed viewer for an IP camera with a proprietary RTP server, i.e. no IIS, no SmoothStreaming extension. Is SmoothStreamingClient (or microsoft media platform) is the best place to start?

THX-1138
  • 21,316
  • 26
  • 96
  • 160

2 Answers2

1

You definitely don't want the SmoothStreamingClient, as that assumes that you're using a SmoothStreaming media source. However, what you can do instead is use a MediaElement and implement your own MediaStreamSource. This requires that you know how to parse the data being spewed by your IP camera and turn it into valid video samples, which is non-trivial, but it's the only supplied mechanism for displaying video data for which there isn't already a built-in streaming source.

However, if the video format that your IP camera sends is already supported by Silverlight, then all you need to do is create a Stream that reads the camera data and pass that as the media source to a MediaElement.

JSBձոգչ
  • 40,684
  • 18
  • 101
  • 169
  • yes. Camera serves an h264 stream RTP. So MediaElement seems to be reasonable. I just wasn't sure if MMP:PF is applicable here. Thank you. – THX-1138 May 10 '11 at 18:49
  • Can Silverlight be used to receive RTP stream over UDP at a given port? UdpClient is not available, and I can't find a way to receive frames pushed by the IP camera. – THX-1138 May 16 '11 at 18:04
  • @user, unfortunately, you'll probably have to implement your own UDP listener using the regular old `Socket` class. This might help you get started: http://blogs.microsoft.co.il/blogs/tamir/archive/2008/03/22/networking-raw-sockets-in-silverlight-and-wpf-messaging-in-general.aspx – JSBձոգչ May 16 '11 at 18:46
  • Silverlight can't use sockets like that, unless you use a signed Silverlight app and users select to trust it. Those have to be installed though for OOB (Out of Browser) use, or they can also run in browser, but admin needs to do some configuration to the machine first to allow it – George Birbilis Jan 25 '14 at 18:53
0

Best way is to have some server-side app that gets the camera data and saves a picture at a certain location on the web server. Then you can have an HTML page refresh periodically to show the new image (trick is to give a url of the style http://someserver/someimage.jpg?dummy=i, where you replace i with a number that changes every time (put a big random number or the current datetime), so that the browser doesn't cache and show the previously downloaded frame all the time

George Birbilis
  • 2,782
  • 2
  • 33
  • 35