cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl RTSP not using correct control URI?

From: Paul Bergen <bergen.p0_at_gmail.com>
Date: Tue, 12 Nov 2013 21:06:42 -0800

I'm using libcurl 7.33.0 and trying to fetch an RTSP stream from an IP
camera. I compiled the sample app here:
http://curl.haxx.se/libcurl/c/rtsp.html

and am passing in the URL: rtsp://
192.168.2.14/live/av0?user=admin&passwd=admin

It plays fine in VLC, but in curl I get a: 415 unsupported media type, and
it seems to be that the camera's DESCRIBE contains a new control URL in the
"a=control:" tag, and VLC uses it, but curl continues to use the original
URL.

So I captured both VLC and curl's exchanges in wireshark, and here's the
difference:

They both do the describe the same (DESCRIBE rtsp://
192.168.2.14/live/av0?user=admin&passwd=admin RTSP/1.0)

and the camera responds with this:

*RTSP/1.0 200 OKCSeq: 2Date: Wed, 13 Nov 2013 04:39:31 GMTContent-Type:
application/sdpContent-Language: enx-Accept-Dynamic-Rate: 1Content-Length:
397v=0o=- 87197675 782967157 IN IP4 192.168.2.14s=livec=IN IP4 0.0.0.0t=0
0a=control:*m=audio 0 RTP/AVP 8a=control:rtsp://192.168.2.14:554/audio0
<http://192.168.2.14:554/audio0>m=video 0 RTP/AVP 96b=AS:2058a=rtpmap:96
H264/90000a=range:npt=0-a=fmtp:96
profile-level-id=420028;packetization-mode=1;sprop-parameter-sets=Z0IAKOkAoAt1xIADbugAzf5gDYgQlA==,aM4xUg==a=control:rtsp://192.168.2.14:554/video0
<http://192.168.2.14:554/video0>*
At this point VLC calls SETUP and uses the URL that was returned above
(audio0)

*SETUP rtsp://192.168.2.14:554/audio0 <http://192.168.2.14:554/audio0>
RTSP/1.0CSeq: 4User-Agent: LibVLC/2.0.0 (LIVE555 Streaming Media
v2011.12.23)Transport: RTP/AVP;unicast;client_port=62144-62145*
But Curl calls SETUP with the original URL

*SETUP rtsp://192.168.2.14/live/av0?user=admin&passwd=admin/
<http://192.168.2.14/live/av0?user=admin&passwd=admin/> RTSP/1.0CSeq:
3Transport: RTP/AVP;unicast;client_port=1234-1235If-Modified-Since: Thu, 01
Jan 1970 00:00:00 GMT*
Unfortunately my knowledge of rtsp is pretty limited. Am I doing something
wrong?

Thanks

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-11-13