Play rtsp stream in WPF (or WinForms)

Is there a way to play the rtsp: // stream in WPF (or, alternatively, WinForms)?

I tried MediaElementand MediaUriElementand none of them worked. I also read a lot about how WMP can play rtsp (which should also translate to MediaElement), but in fact WMP does not play it on Windows 7 x64. I saw this one , but I hope this is not a definite answer.

Is this something related to the video codec used?

VLC plays rtsp stream just fine.

I am looking for a WPF or WinForms component or an alternative solution.

+3
source share
3 answers
+1

Accord.Net(http://accord-framework.net/). nuget (Accord.Video.FFMPEG). Bitmap, WinForms/WPF. , Mono ( , ).

:

VideoFileReader reader = new VideoFileReader();
reader.Open("rtsp://192.168......");

while (true)
{
   Bitmap frame = reader.ReadVideoFrame();
   //Do whatever with the frame...
}

reader.Close();
+5

, ; : http://www.codeproject.com/Articles/885869/Stream-Player-control

FFmpeg, :

  • RTSP/RTMP
  • Get the current frame displayed by the control

The control has no additional dependencies and a minimalist interface.

Requirements

  • WinForms Management Version Implemented Using .NET Framework 2.0
  • The WPF control version is implemented using the .NET Framework 4 client profile.

Both versions are built using the x86 target platform.

+1
source

All Articles