I currently have code that returns a valid URI for streaming from an IP Camera. I take that uri and pass it into an object for streaming. Can I configure the objects so they stream over TCP? The VLC application has a setting where I can stream this same URI over TCP so I know the camera has the functionality. When I use the VLC application it just forces RTP over port 554 for a TCP video stream. Currently with this code, it sets up RTSP over 554 and begins streaming RTP over UDP from a different port. What am I missing?
Establish Objects
_libVLC = new LibVLC();
_mp = new MediaPlayer(_libVLC);
videoView.MediaPlayer = _mp;
////GET local uri////
bool check = Uri.IsWellFormedUriString(local_uri.Uri.ToString(), UriKind.RelativeOrAbsolute);
if (check)
{
_mp.Play(new LibVLCSharp.Shared.Media(_libVLC, local_uri.Uri));
check = false;
The uri string comes back formatted as Rtsp://MY-IP
I've tried what a few others have recommended by reformatting it to... rtsp-tcp://MY-IP and it doesn't seem to work (or i'm doing it wrong).
//////////////////////////////// Edit: ////////////////////
LibVLCSharp.Shared.Media media = new Media(_libVLC, local_uri.Uri);
media.AddOption(":rtsp-tcp"); //<---- Is this passing the option correctly.
_mp.Play(media);