RTSP source not streaming

Topics: Question
Feb 25, 2016 at 3:42 PM
Hey, Julius! Awesome work, thank you so much for this.

Can I ask you for help in this?

This code definitely runs the server, as VLC connects to my own machine. And I know for a fact that my source URL and credentials are also good 'cause if I change anything on the URL or the user/pass the MediaStream stays in the "Stopped" status.

But for some reason, whenever I connect with VLC I get a message saying that no bytes were read in 10 seconds.

Can you help me?

Thank you so much!

        Media.Rtsp.RtspServer server = new Media.Rtsp.RtspServer();
        RtspSource source = new RtspSource("C52", "rtsp://rtspserver/interface/cameras/media?camera=52&profile=visualization");
        source.SourceCredential = new System.Net.NetworkCredential("user", "pass");


        while (true)
            Thread.Sleep(1 * 5 * 1000);
            Console.WriteLine($"State: { server.MediaStreams.FirstOrDefault().State }, Recieved: { server.TotalRtspBytesRecieved }, Streamed: { server.TotalStreamedBytes } ");
Feb 29, 2016 at 8:21 PM
It probably is because the route to client cannot be established via UDP for whatever reason, if you post a Wireshark capture I will take a look.

Try source.m_ForceTCP = true to force the client to transport using TCP or if your still having trouble why don't you attach a logger to the RtspServer so that you can see the individual RTSP requests in and out from the source?

Also 'server.MediaStreams.FirstOrDefault().State' is a waste considering you have 'source.State' :)

Let me know how else I can help!
Marked as answer by juliusfriedman on 2/29/2016 at 1:21 PM