C# RTSP player using Gstreamer

Hi,

I’m using Gstreamer to stream media from OpenCv VideoWriter and MediaMtx as RTSP server.

RTSP server is streaming over UDP.

When playing from VLC using --network-cahing=50 or 0, I have tried also with 500… and I’m having latency problems, more or less 1-2 seconds delay and looses and little stops, and also this problems increase with playing time.

When playing from Gstreamer using gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/mystream latency=0 ! decodebin ! autovideosink I can see the stream without notable latency and without losses or little stops.

I don’t understand why Vlc is having such delay problems and what setting may be affecting RTSP playing.

How can I use Gstreamer as player in C# application? I have tried using OpenCv VideoCapture and this pipeline
rtspsrc location=rtsp://127.0.0.1:8554/mystream latency=0 ! decodebin ! appsink and seems to be working ok but maybe it’s better to use Gstreamer-sharp directly?
Is it compatible with Windows? I have seen in project repository that only it’s compatible with Linux and MacOS.

With regards,

You probably need to ask VLC folks about VLC playback issues :slightly_smiling_face:

There’s a typo in your command line option though (cahing), in case that changes anything.

The GStreamer C# bindings should work just fine on Windows. Depending on the version of the bindings you’ll need to use a GStreamer built with MSVC (newer versions) or MingW (older versions).

Yes, it was a typo sorry. I can’t edit the post.

I have asked to VLC community and suggested to use Alpha version 4.0 of libvlc. I have to try.

I’ll try also to use Gstreamer C# bindings searching for an example of a simple player.

Do you know if C# bindings will work also o Xamarin app?

With regards,