Problem of RTSP streaming with Live555 proxyserver

About encoding, codec settings, muxers and filter usage
jedi00
New Cone
New Cone
Posts: 7
Joined: 12 Nov 2013 05:43

Problem of RTSP streaming with Live555 proxyserver

Postby jedi00 » 12 Nov 2013 09:15

I use VLC as rtsp server, and live555 proxyserver (as rtsp client of VLC) 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'm trying to figure out why VLC send "BYE" signal to its client, any idea or suggestion? Do I have to go through the source code of VLC?

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: Problem of RTSP streaming with Live555 proxyserver

Postby Sébastien Escudier » 13 Nov 2013 01:30

maybe a timeout parameter ?

jedi00
New Cone
New Cone
Posts: 7
Joined: 12 Nov 2013 05:43

Re: Problem of RTSP streaming with Live555 proxyserver

Postby jedi00 » 15 Nov 2013 04:31

Update:
I tested with VLC 1.1.11 and VLC 2.1.0, the same problem, it seems VLC server thought the client was dead, then sent a 'BYE' and closed the stream output.
First I doubted the "RR" response from live555 proxyserver to VLC is too late, but after analysed the network traffic with wireshark, it seemed all OK。 VLC sent "SR" packet about every second, and live555 proxyserver replied "RR" packet just after an "SR" packet received.
Then I tested live555 proxyserver with other rtsp source, it worked all OK.
So, the problem is: why VLC received "RR" packet but still thought the client was dead?

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: Problem of RTSP streaming with Live555 proxyserver

Postby Sébastien Escudier » 19 Nov 2013 09:31

is live555 openRTSP client working, instead of the proxy server application ?

jedi00
New Cone
New Cone
Posts: 7
Joined: 12 Nov 2013 05:43

Re: Problem of RTSP streaming with Live555 proxyserver

Postby jedi00 » 22 Nov 2013 06:33

Thank you for reply!
According to your suggestion, I just tested the newest openRTSP with VLC 2.1.0. Still, VLC closed the stream traffic after 60s, here is the log of openRTSP with -V parameter:
(Note I have replaced my IP with XXX.XXX.XXX.XXX)

Code: Select all

Opened URL "rtsp://XXX.XXX.XXX.XXX:8554/1", returning a SDP description: v=0 o=- 15436484369615762705 15436484369615762705 IN IP4 SSOCR16 s=Unnamed i=N/A c=IN IP4 0.0.0.0 t=0 0 a=tool:vlc 2.1.0 a=recvonly a=type:broadcast a=charset:UTF-8 a=control:rtsp://XXX.XXX.XXX.XXX:8554/1 m=audio 0 RTP/AVP 96 b=RR:0 a=rtpmap:96 mpeg4-generic/24000/2 a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=131056e59d4800 ; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1; a=control:rtsp://XXX.XXX.XXX.XXX:8554/1/trackID=0 m=video 0 RTP/AVP 96 b=RR:0 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=640029;sprop-parameter-sets=Z2QA Kaw05gLAQ6EAAZdPAExLQI8YMZo=,aO68sA==; a=control:rtsp://XXX.XXX.XXX.XXX:8554/1/trackID=1 Created receiver for "audio/MPEG4-GENERIC" subsession (client ports 58810-58811) Created receiver for "video/H264" subsession (client ports 58812-58813) Setup "audio/MPEG4-GENERIC" subsession (client ports 58810-58811) Setup "video/H264" subsession (client ports 58812-58813) Created output file: "audio-MPEG4-GENERIC-1" Created output file: "video-H264-2" Started playing session Receiving streamed data... Received RTCP "BYE" on "audio/MPEG4-GENERIC" subsession (after 60 seconds) Received RTCP "BYE" on "video/H264" subsession (after 60 seconds)
The above test is implemented on a single PC, i.e., the VLC (as server) and openRTSP (as client) run on the same PC.
I'll analyse the network traffic later with VLC and openRTSP run on different PCs.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: Problem of RTSP streaming with Live555 proxyserver

Postby Sébastien Escudier » 23 Nov 2013 13:52

Currently, vlc only support RTSP messages (like GET_PARAMETER) as RTSP keepalive. And not RR packets.
One solution could be to disable rtsp timeout vlc side :
--rtsp-timeout
But note that if the client disconnects without notice, vlc will continue to stream to this client forever.

To fix this, you can modify live555 to send those get_parameter :
http://lists.live555.com/pipermail/live ... 12132.html
Or patch vlc to support RR (harder).

jedi00
New Cone
New Cone
Posts: 7
Joined: 12 Nov 2013 05:43

Re: Problem of RTSP streaming with Live555 proxyserver

Postby jedi00 » 25 Nov 2013 06:50

Thanks Escudier!. Yes live555 doesn't send GET_PARAMETER message as liveness notification.
I've modified live555 to send GET_PARAMETER message every 10~20 seconds, however, VLC responded with “RTSP/1.0 451 Client error”, why is this now? (Ps, I've tried configuring live555 to ignore 451 response of VLC and keep sending GET_PARAMETER messages, but still after 60s VLC would close the stream)

Update:
Finally find the problem. It turns out VLC only accepts a GET_PARAMETER message with no body.

RXLA
New Cone
New Cone
Posts: 1
Joined: 04 Dec 2013 02:58

Re: Problem of RTSP streaming with Live555 proxyserver

Postby RXLA » 04 Dec 2013 03:06

Update:
Finally find the problem. It turns out VLC only accepts a GET_PARAMETER message with no body.
Jedi00 glad you found your answer. Have you had success since finding your solution?

jedi00
New Cone
New Cone
Posts: 7
Joined: 12 Nov 2013 05:43

Re: Problem of RTSP streaming with Live555 proxyserver

Postby jedi00 » 09 Dec 2013 07:48

Partly solved.
The modification works for VLC 2.1.0, but not for VLC 1.1.11. The response of VLC 1.1.11 to live555's "GET_PARAMETER" query is OK, but after 60s, it still will send "BYE" and close the stream. It seems that VLC 2.1.0 and VLC 1.1.11 use different signals as liveness notification of client.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: Problem of RTSP streaming with Live555 proxyserver

Postby Sébastien Escudier » 09 Dec 2013 09:39

There was no timeout in vlc 1.1 RTSP server.
Are you sure the BYE comes from vlc, and not live555 ?

jedi00
New Cone
New Cone
Posts: 7
Joined: 12 Nov 2013 05:43

Re: Problem of RTSP streaming with Live555 proxyserver

Postby jedi00 » 10 Dec 2013 03:52

This is weird, I'll analyze the network traffic later.

Gavroche95
New Cone
New Cone
Posts: 1
Joined: 21 Feb 2014 10:39

Re: Problem of RTSP streaming with Live555 proxyserver

Postby Gavroche95 » 21 Feb 2014 10:41

Update:
Finally find the problem. It turns out VLC only accepts a GET_PARAMETER message with no body.
Hello,

Could you please share your diff ?


Regards.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 16 guests