Page 1 of 1

Restreaming Live stream

Posted: 28 Mar 2013 19:59
by rtspuser
Hi,
I use libvlc to restream a live mjpeg stream using rtsp broadcast. My client is live555 proxyserver. The live555 proxy client sends play and receives video feed but after about 60 secs receives RTCP bye message. Now the input is not a file but live stream itself. I have tried --sout-keep, gather and loop enabled. It seems that RTSP session timeout is hardcoded to 60 secs and no way i can change that. The VLC RTSP server does support GET_PARAMETER and PAUSE as shown in OPTIONS. But when live555 sends it a GET_PARAMETER the response is a 451 client error and on sending PAUSE sends backs 405 error. Fyi, I use LIVE555 proxy server to tunnel over http as VLC doesnt support it yet at the server end.

libvlc_vlm_add_broadcast(VLC.Instance, "STREAM 1","http://10.0.0.23:8084","#gather:transcode{venc=x264{keyint=60,profile=baseline,level=3.0,no-cabac,vbv-maxrate=2000},vcodec=x264,vb=2000,scale=1}:rtp{sdp= ":5554/test.sdp"}",
0,null, 1, 1, ref ex);
Thread.Sleep(1000);
libvlc_vlm_play_media(VLC.Instance, "STREAM 1", ref ex);

Re: Restreaming Live stream

Posted: 29 Mar 2013 00:05
by Jean-Baptiste Kempf
PLease share the logs.

Re: Restreaming Live stream

Posted: 29 Mar 2013 16:38
by rtspuser
Please see log below. Let me know if you need anything else. Thanks for your help.........

Code: Select all

ProxyServerMediaSession["rtsp://10.0.0.27:5554/codec-h264/channel0.sdp"] added n ew "ProxyServerMediaSubsession" for RTP/video/H264 track ProxyServerMediaSubsession["H264"]::createNewStreamSource(session id 0) Initiated: ProxyServerMediaSubsession["H264"] ProxyServerMediaSubsession["H264"]::createNewRTPSink() ProxyServerMediaSubsession["H264"]::closeStreamSource() ProxyServerMediaSubsession["H264"]::createNewStreamSource(session id 1872477815) Sending request: SETUP rtsp://10.0.0.27:5554/codec-h264/channel0.sdp/trackID=0 R TSP/1.0 CSeq: 10 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media v2013.02.11) Transport: RTP/AVP;unicast;client_port=54436-54437 ProxyServerMediaSubsession["H264"]::createNewRTPSink() Received 271 new bytes of response data. Received a complete SETUP response: RTSP/1.0 200 OK Server: VLC/2.0.5 Date: Fri, 29 Mar 2013 15:28:37 GMT Transport: RTP/AVP/UDP;unicast;client_port=54436-54437;server_port=54439-54440;s src=CDBA1C3B;mode=play Session: 1fad1ff99c0ec36d;timeout=60 Content-Length: 0 Cache-Control: no-cache Cseq: 10 ProxyRTSPClient["rtsp://10.0.0.27:5554/codec-h264/channel0.sdp"]::continueAfterS ETUP(): head codec: H264; numSubsessions 1 queue: H264 Sending request: PLAY rtsp://10.0.0.27:5554/codec-h264/channel0.sdp RTSP/1.0 CSeq: 11 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media v2013.02.11) Session: 1fad1ff99c0ec36d Received 289 new bytes of response data. Received a complete PLAY response: RTSP/1.0 200 OK Server: VLC/2.0.5 Date: Fri, 29 Mar 2013 15:28:37 GMT RTP-Info: url=rtsp://10.0.0.27:5554/codec-h264/channel0.sdp/trackID=0;seq=36515; rtptime=223888494 Range: npt=48.258908- Session: 1fad1ff99c0ec36d;timeout=60 Content-Length: 0 Cache-Control: no-cache Cseq: 11 Sending request: OPTIONS rtsp://10.0.0.27:5554/codec-h264/channel0.sdp RTSP/1.0 CSeq: 12 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media v2013.02.11) Received 125 new bytes of response data. Received a complete OPTIONS response: RTSP/1.0 200 OK Server: VLC/2.0.5 Content-Length: 0 Cseq: 12 Public: DESCRIBE,SETUP,TEARDOWN,PLAY,PAUSE,GET_PARAMETER ProxyServerMediaSubsession["H264"]: received RTCP "BYE" ProxyServerMediaSubsession["H264"]::closeStreamSource() Sending request: PAUSE rtsp://10.0.0.27:5554/codec-h264/channel0.sdp RTSP/1.0 CSeq: 13 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media v2013.02.11) Session: 1fad1ff99c0ec36d Received 193 new bytes of response data. Received a complete PAUSE response: RTSP/1.0 405 Method not allowed Server: VLC/2.0.5 Date: Fri, 29 Mar 2013 15:29:37 GMT Allow: DESCRIBE, TEARDOWN, PLAY, GET_PARAMETER Content-Length: 0 Cache-Control: no-cache Cseq: 13 Sending request: GET_PARAMETER rtsp://10.0.0.27:5554/codec-h264/channel0.sdp RTS P/1.0 CSeq: 14 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media v2013.02.11) Session: 1fad1ff99c0ec36d Content-Length: 2 Received 139 new bytes of response data. Received a complete GET_PARAMETER response: RTSP/1.0 451 Client error Server: VLC/2.0.5 Date: Fri, 29 Mar 2013 15:29:38 GMT Content-Length: 0 Cache-Control: no-cache Cseq: 14 ProxyServerMediaSubsession["H264"]::closeStreamSource() ProxyServerMediaSubsession["H264"]::~ProxyServerMediaSubsession()

Re: Restreaming Live stream

Posted: 01 Apr 2013 18:59
by Jean-Baptiste Kempf
Those are not vlc logs

Re: Restreaming Live stream

Posted: 01 Apr 2013 20:12
by rtspuser
How do i capture logs since i use libvlc and if I'm not mistaken libvlc logging is not supported in latest releases.

Re: Restreaming Live stream

Posted: 01 Apr 2013 21:20
by Jean-Baptiste Kempf
Run the app from the command line.

Re: Restreaming Live stream

Posted: 04 Apr 2013 23:35
by rtspuser
It seems that this particular line in rtsp.c under modules/stream out is causing an issue for me, didn't quite understand its purpose here. Is there a way my live555 client can avoid this by formatting the GET_PARAMETER in a different way and not get a 451 error. Thanks

Code: Select all

case HTTPD_MSG_GETPARAMETER: if( query->i_body > 0 ) { answer->i_status = 451; break; }

Re: Restreaming Live stream

Posted: 12 Nov 2013 05:56
by jedi00
Similar problem here. I use VLC as rtsp server, and live555 proxyserver to proxy the rtsp stream. From the log generated by live555 proxyserver, every about 20s, VLC will send a "BYE" signal to live555 proxyserver, this will cause the rtsp proxy process broken.

I still can't figure out why VLC send "BYE" signal to its client