Search code examples
c#wpfdirectshowrtspms-media-foundation

Axis Camera video streaming with C# 64bit


I'm looking for a way to stream video from an AXIS M10 IP camera, and display the feed using windows forms (or better, wpf). However, it need to be running on 64-bit platform.

This means that I can't use the AXIS Media Control ActiveX component. Also, I found that these methods work but only in 32bit environment:

1.Using MediaElement Class for WPF

2.Using embedded media player

3.VlcLib (for dotnet)

So far it looks like my only option is to directly implement RTSP protocol and decode the given RTP/AVP stream using Media Foundation (for .net) and display it somehow. (I was able to get the camera to stream to a UDP port using RTSP calls).

I'm fairly new to RTSP/streaming, so I'm concerned that I might be missing the big picture - Will I be able to use media foundation to render/display videos on winform/wpf, or do I have to look at that functionality elsewhere?(from my research it looked like it could decode H.264 streams, but I did not see any video-playing capabilities). I also came across DirectShow - should I use DirectShow over Media Foundation?

Or better yet, is there a library that is able to handle RTSP streaming that runs in 64bit?


Solution

  • VisioForge Video Capture SDK .Net for example (but commercial), WPF controls included. Decoding using FFMPEG, with DirectShow engine. Really, I don't see any Media Foundation advantages here.

    Also any other way using FFMPEG.

    Or, you can write RTSP source filter (based on DirectShow Push Source sample) with H264 output pin for video and G726/G711/AAC for audio. Also you can made virtual video capture source filter and use it in MF or DirectShow. You can use live555 library for RTSP implementation.

    So, no simple ways here, if you are starting from zero.