cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl not receiving rtsp data

From: Chris Conroy <cconroy_at_gmail.com>
Date: Tue, 12 Jul 2011 00:39:42 -0400

Indeed, cURL is not the right tool for receiving RTP data in general.
It only speaks RTSP.

cURL's RTSP stack does support receiving interleaved RTP data (see
CURLOPT_INTERLEAVEFUNCTION). But, note that interleaving carries
negative performance characteristics.

On Mon, Jul 11, 2011 at 10:16 PM, Jim Hollinger <hollinger.jim_at_gmail.com> wrote:
>
> I don't believe cURL was designed for general network socket communication. Here are two simple open source programs that may be helpful.
> http://code.google.com/p/rtsprequest/
> This program issues asequenceof RTSP requests using cURL to initiate a video stream - similar to your code.
> http://code.google.com/p/rtpreceive/
> This program will receive the resulting stream of RTP video and, among other things, decode the RTP data andretransmitit to a local port.
>
> On Mon, Jul 11, 2011 at 12:51 PM, Michael Dale <michaeld_at_bbvcctv.com> wrote:
>>
>> Thankyou for your reply, you are correct the server is sending the data to port 1234 as requested by the transport message and wire shark confirms this again.
>>
>> So would I be right in saying that curl has no means of getting the data via any of its call backs? And if this is the case what would the suggested method be to receive the data?
>>
>> If I use the following
>>
>> sockFd = socket(AF_INET, SOCK_RAW, IP_PROTO_UDP);
>>
>> the connection fails and if I use
>>
>> sockFd = socket(AF_INET, SOCK_DGRAM, 0);
>>
>> the server seems to start a duplicate stream from another port
>>
>>
>>
>> any help would be much appreciated I getting this sorted, as I would really like to get away from live555
>>
>>
>>
>>
>>
>> cURL V7.21.7 loaded
>>
>> request server options
>>
>> RTSP: OPTIONS rtsp://192.168.1.131/live/???
>>
>> RTSP/1.0 200 OK
>>
>> CSeq: 1
>>
>> Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
>>
>>
>>
>> rtsp_describe
>>
>> RTSP: DESCRIBE rtsp://192.168.1.131/live/???
>>
>> Writing SDP to ???.sdp'
>>
>> RTSP/1.0 200 OK
>>
>> CSeq: 2
>>
>> Content-Base: rtsp://192.168.1.131/live/???/
>>
>> Content-Type: application/sdp
>>
>> Content-Length: 327
>>
>>
>>
>> get_media_attribute
>>
>> rtsp_setup
>>
>> RTSP: SETUP rtsp://192.168.1.131/live/???/video
>>
>> TRANSPORT RTP/AVP;unicast;client_port=1234-1235
>>
>> RTSP/1.0 200 OK
>>
>> CSeq: 3
>>
>> Session: 1051070571
>>
>> Transport: RTP/AVP;unicast;client_port=1234-1235;server_port=39500-39501;mode="PLAY";ssrc=25426848
>>
>>
>>
>> rtsp_setup
>>
>> RTSP: PLAY rtsp://192.168.1.131/live/???/
>>
>> RTSP/1.0 200 OK
>>
>> CSeq: 4
>>
>> Session: 1051070571
>>
>> RTP-Info: url=rtsp://192.168.1.131/live/???/video;seqno=33530
>>
>> Range: npt=0.00-
>>
>>
>>
>> Regards Michael Dale
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus signature database 6284 (20110711) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>> -------------------------------------------------------------------
>> List admin: http://cool.haxx.se/list/listinfo/curl-library
>> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

--
Chris Conroy
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-12