Search code examples
c#vlcvlc.dotnet

How to play RTSP from VLC on C#


I'm new to using the VLC on C# winforms. I installed or added a vlcControl on my C# Project using Vlc.DotNet.Forms.dll. Below is the guide on how did I install the vlcControl on my Project:

https://github.com/ZeBobo5/Vlc.DotNet/wiki/Using-Vlc.DotNet-in-WinForms

I also tested my RTSP video on my installed VLC player and it's working and I have the RTSP link.

I would like to know how can I play the RTSP on my added vlcControl? Also my RTSP has authentication.


Solution

    1. Open VLC Media Player
    2. Turn on Debug logging
    3. Play your stream
    4. Enter credentials
    5. Write down the URL used by VLC displayed in the logging window (something like "rtsp://192.168.1.62:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif&user=admin&password=xxx").
    6. Give that URL to the Vlc.DotNet mediaplayer and call Play.
    7. Profit.