I'm doing a C# application with some image processing from RealSense camera using EmguCv and I want to stream images to RTSP pipeline to allow other (multiple) clients to view RTSP stream.
At the moment I have frames as Mat objects.
I know that it's possible to create an RTSP server using LibVlc or GStreamer but I don't know what is the best way and how to convert Mat frames into a video streaming.
Platform: Windows 10.
In LibVlc
How can I write Mat objets to MemoryStream?
Also this constructor o LibVLC doesn't seems to work and running RTSP server.
var ms = new MemoryStream()
var libVlc = new LibVLC("--sout-rtp-dst=rtsp://:8553/rtsp", "--sout-keep");
var media = new Media(libVlc, new StreamMediaInput(ms));
var player = new MediaPlayer(media);
I have also try to write Mat objects to VideoWriter and I can't create VideoWriter because I don't know which codec I have to use. I have try with MJPG, H264, XVID, DIVX ... no one seems to work on my platform.
Maybe it's possible to use GStreamer instead of LibVlc? Do you have any example of that?