After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 537832 - rtsp is broken
rtsp is broken
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.8
Other Linux
: Normal normal
: 0.10.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-06-11 17:42 UTC by Levente Farkas
Modified: 2009-06-15 20:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the good (8.65 KB, text/plain)
2008-06-11 17:43 UTC, Levente Farkas
Details
the bad (10.01 KB, text/plain)
2008-06-11 17:43 UTC, Levente Farkas
Details
the ugly (15.43 KB, text/plain)
2008-06-11 17:43 UTC, Levente Farkas
Details
the logfile (5.81 KB, application/gzip)
2008-06-12 11:41 UTC, Levente Farkas
Details
the 2nd log (8.98 KB, application/gzip)
2008-06-12 13:41 UTC, Levente Farkas
Details

Description Levente Farkas 2008-06-11 17:42:25 UTC
we now test 6 different ip camera which support rtsp with similar
command line:
gst-launch playbin uri=rtsp://192.168.2.90/live.sdp
unfortunately only one working with all other crash with different
errors. the biggest problem is that's not the cameras fault or at least
all camera's rtsp works with vlc and mplayer. so only gstreamer fails:-( 
gst-launch rtspsrc debug=1 location=rtsp://192.168.2.90/live.sdp ! decodebin ! queue ! xvimagesink &>good.txt

gst-launch rtspsrc debug=1 location=rtsp://192.168.2.100/live.sdp ! decodebin ! queue ! xvimagesink &>bad.txt

gst-launch rtspsrc debug=1 location=rtsp://admin:admin@192.168.2.109/ ! decodebin ! queue ! xvimagesink &>ugly.txt

anc ctrl-c to stop. the good working the last two case (bad, ugly), there was not any xv window at all so we just hit ctrl-c after about 1 minutes.
all of the above url working with vlc and mplayer from the same host.
Comment 1 Levente Farkas 2008-06-11 17:43:17 UTC
Created attachment 112563 [details]
the good
Comment 2 Levente Farkas 2008-06-11 17:43:34 UTC
Created attachment 112564 [details]
the bad
Comment 3 Levente Farkas 2008-06-11 17:43:51 UTC
Created attachment 112565 [details]
the ugly
Comment 4 Wim Taymans 2008-06-12 10:59:16 UTC
It seems to be related to how the multicast connection is supposed to be set up for those last 2 cameras.
Comment 5 Wim Taymans 2008-06-12 11:22:47 UTC
Can you make a log like this for the third camera:

GST_DEBUG=*rtspsrc*:5 gst-launch ...  >debug.log 2>&1

gzip and attach it here?
Comment 6 Levente Farkas 2008-06-12 11:41:12 UTC
Created attachment 112609 [details]
the logfile

anyway this camera is a Linksys PVC2300
Comment 7 Wim Taymans 2008-06-12 13:05:34 UTC
It seems the udpsrc cannot allocate the socket for some reason. Can you make a new log with more debug info like this:

GST_DEBUG=*rtspsrc*:5,*udp*:5 gst-launch ...  >debug.log 2>&1

Comment 8 Levente Farkas 2008-06-12 13:41:23 UTC
Created attachment 112617 [details]
the 2nd log
Comment 9 Wim Taymans 2008-06-12 17:31:11 UTC
Thanks, it turned out the udp sources did not make it to PAUSED so they didn't join the multicast group. I could not test it but this should fix it:

        * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_stream_configure_mcast):
        Set udpsrc for receiving data from multicast groups to PAUSED instead of
        leaving them in READY. Fixes #537832.
Comment 10 Levente Farkas 2008-06-12 20:32:31 UTC
which version will include this fix?
or how can i test it? eg. is there a patch with which i can recompile fedora packages?
Comment 11 Levente Farkas 2008-08-22 16:13:27 UTC
hi,
we retest rtsp with the latest gstreamer-plugins-good-0.10.9 and still broken. here are a more detaild description why compared vlc with gstreamer (since vlc is working):

1. 
Wrong initiation:
GStreamer session (+: GSrtreamer -: Camera)

+OPTIONS rtsp://192.168.150.200/live.sdp RTSP/1.0
+CSeq: 0
+Date: Fri, 22 Aug 2008 10:55:28 GMT

-RTSP/1.0 200 OK
-CSeq: 0
-Date: Fri, 22 Aug 2008 12:55:31 GMT
-Public: OPTIONS, DESCRIBE, PLAY, SETUP, TEARDOWN

+DESCRIBE rtsp://192.168.150.200/live.sdp RTSP/1.0
+CSeq: 1
+Accept: application/sdp
+Date: Fri, 22 Aug 2008 10:55:28 GMT

-RTSP/1.0 200 OK
-CSeq: 1
-Date: Fri, 22 Aug 2008 12:55:31 GMT
-Content-Base: rtsp://192.168.150.200/live.sdp/
-Content-Type: application/sdp
-Content-Length: 343
-
-v=0
-o=RTSP 1219409731 337 IN IP4 0.0.0.0
-s=RTSP server
-c=IN IP4 0.0.0.0
-t=0 0
-a=charset:Shift_JIS
-a=range:npt=0-
-a=control:*
-a=etag:1234567890
-m=video 0 RTP/AVP 96
-b=AS:0
-a=rtpmap:96 MP4V-ES/30000
-a=control:trackID=1
-a=fmtp:96 
-profile-level-id=3;config=000001B003000001B509000001000000012000C48881F4514043C1463F;decode_buf=76800
+SETUP rtsp://192.168.150.200/live.sdp/trackID=1 RTSP/1.0
+CSeq: 2
+Transport: 
+RTP/AVP/UDP;unicast;client_port=39498-39499,RTP/AVP/UDP;multicast,RTP/AVP/TCP;unicast;interleaved=0-1
+Date: Fri, 22 Aug 2008 10:55:28 GMT

-RTSP/1.0 503 Service Unavailable
-CSeq: 2

VLC session ( +:VLC, - :Camera)
-----------------------------
+OPTIONS rtsp://192.168.150.200/live.sdp RTSP/1.0
+CSeq: 1
+User-Agent: VLC media player (LIVE555 Streaming Media v2008.04.02)

-RTSP/1.0 200 OK
-CSeq: 1
-Date: Tue, 19 Aug 2008 16:42:30 GMT
-Public: OPTIONS, DESCRIBE, PLAY, SETUP, TEARDOWN

+DESCRIBE rtsp://192.168.150.200/live.sdp RTSP/1.0
+CSeq: 2
+Accept: application/sdp
+User-Agent: VLC media player (LIVE555 Streaming Media v2008.04.02)

-RTSP/1.0 200 OK
-CSeq: 2
-Date: Tue, 19 Aug 2008 16:42:30 GMT
-Content-Base: rtsp://192.168.150.200/live.sdp/
-Content-Type: application/sdp
-Content-Length: 343
-
-v=0
-o=RTSP 1219164150 610 IN IP4 0.0.0.0
-s=RTSP server
-c=IN IP4 0.0.0.0
-t=0 0
-a=charset:Shift_JIS
-a=range:npt=0-
-a=control:*
-a=etag:1234567890
-m=video 0 RTP/AVP 96
-b=AS:0
-a=rtpmap:96 MP4V-ES/30000
-a=control:trackID=1
-a=fmtp:96 
-profile-level-id=3;config=000001B003000001B509000001000000012000C48881F4514043C1463F;decode_buf=76800
+SETUP rtsp://192.168.150.200/live.sdp/trackID=1 RTSP/1.0
+CSeq: 3
+Transport: RTP/AVP;unicast;client_port=36774-36775
+User-Agent: VLC media player (LIVE555 Streaming Media v2008.04.02)

-RTSP/1.0 200 OK
-CSeq: 3
-Date: Tue, 19 Aug 2008 16:42:30 GMT
-Session: 2579728;timeout=80
-Server: PVSS
-Transport: RTP/AVP;unicast;client_port=36774-36775;server_port=5556-5557

+PLAY rtsp://192.168.150.200/live.sdp/ RTSP/1.0
+CSeq: 4
+Session: 2579728
+Range: npt=0.000-
+User-Agent: VLC media player (LIVE555 Streaming Media v2008.04.02)

-RTSP/1.0 200 OK
-CSeq: 4
-Date: Tue, 19 Aug 2008 16:42:30 GMT
-Session: 2579728;timeout=80
-Server: PVSS
-RTP-Info: url=rtsp://192.168.150.200/live.sdp/trackID=1;seq=0;rtptime=0
-Range: npt=0-
-RTCP-Interval: 250

+TEARDOWN rtsp://192.168.150.200/live.sdp/ RTSP/1.0
+CSeq: 5
+Session: 2579728
+User-Agent: VLC media player (LIVE555 Streaming Media v2008.04.02)

-RTSP/1.0 200 OK
-CSeq: 5
-Session: 2579728

The camera type is Vivotek IP7138. I think the main difference is that 
the VLC client doesn't use the interleaved parameter in the SETUP 
command

----------------------------------------------------------------------------

2. 
Missing TEARDOWN when the program is closed. Only a PAUSE is sent. On 
some cameras this prevents the start of the next session for a while.
Comment 12 Wim Taymans 2008-08-22 16:22:02 UTC
Yeah, we send all possible protocols we can accept with the first SETUP request. The server is supposed to select one protocol. This is completely according to the RTSP specs but it seems too many servers don't handle this correctly. It needs some fixing...
Comment 13 Levente Farkas 2008-08-22 17:21:01 UTC
and imho the missing teardown (problem 2.) cause most of our problems!
Comment 14 Wim Taymans 2008-08-25 13:30:23 UTC
Can you describe exactly what goes wrong and what you think should happen instead in the case of the teardown? AFAIK the RFC says you should do a TEARDOWN after a successfull SETUP.
Comment 15 Levente Farkas 2008-08-28 12:01:31 UTC
in #11 i describe 2 different problem (i should have to open another ticket?). 
1. the first is the interleaved parameter in the SETUP (which differs from vlc).
2. when i run gst-launch... and stop it with ctrl-c then gstreamer do _not_ send teardown which not cause problem in the client side, but may cause problems in the server side. and gstreamer only pause (not even stop) the pipeline and not send teardown. which is imho a bug in gstreamer.
Comment 16 Levente Farkas 2008-09-08 11:09:44 UTC
any progress which the two rtsp bug?
Comment 17 Wim Taymans 2008-11-11 16:02:56 UTC
I made so that it only sends 1 transport string at a time.

        * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_create_transports_string),
        (gst_rtspsrc_change_state):
        Only send one transport at a time for improved compatibility with some
        broken servers. See #537832.
Comment 18 Levente Farkas 2008-11-11 16:28:31 UTC
which version will include this fix?
or it's already in a released version?
Comment 19 Wim Taymans 2008-11-11 16:32:39 UTC
next version of gst-plugins-good, version 0.10.12 to be released somewhere next year.
Comment 20 Jan Schmidt 2008-11-11 19:46:35 UTC
-good comes after core/base, Wim - which makes it January :)
Comment 21 Chris Shoemaker 2009-05-05 21:26:27 UTC
January came and went.  Can we presume this is fixed?
Comment 22 Jan Schmidt 2009-05-05 21:41:09 UTC
There's been a (several, actually) new release of the gst-plugins-good module that included Wim's commit:

http://gstreamer.freedesktop.org/releases/gst-plugins-good/0.10.14.html

Comment 23 Edward Hervey 2009-05-06 07:55:41 UTC
Levente, could you confirm this issue is fixed ?
Comment 24 Tim-Philipp Müller 2009-06-15 20:22:48 UTC
Let's close this as FIXED. Lots of RTSP progress in the last few months in various modules.

I'm sure there are still RTSP issues, but please just file new bugs about them - one per URI preferably, thanks!