Redirect stream from HTTP to RTSP

64 Views Asked by At
Hello, please help me, I'm trying to redirect an HTTP stream to rtsp. VLC first opens the link - http://192.168.0.17:5000/stream and there the server redirects it to rtsp://user:[email protected]:8554On the server I do it like this on c#

context.Response.StatusCode = 302; context.Response.Headers["Location"] = "rtsp://user:[email protected]:8554";await context.Response.WriteAsync($"RTSP stream URL: {rtspStreamUrl}");


But with such a redirection, VLC cannot open the stream, although if you open the stream directly, VLC works fine
1

There are 1 best solutions below

0
sudayn On

No, you can't redirect to the RTSP link from http link from your VLC player.

context.Response.Headers["Location"] specially works on client browsers not on VLC player. Could you please explain why do you want to achieve such behaviour? Why not use RTSP url directly to play on VLC player?