Ben Summers
Ben Summers

Reputation: 1

SDP a=control:trackID=2 possible to access control URL from client?

I'm trying to understand how RTSP works for accessing the presentation streams inside of a media object. I've downloaded openRTSP to get a feel for how YouTube (the easiest streaming site I could think of) works with RTSP to stream video to mobile devices. I'm testing out a RTSP stream of this video: http://www.youtube.com/v/U4M5rO1Kd04?version=3&f=videos&app=youtube_gdata

The RTSP link associated is: rtsp://r5---sn-p5qlsu7r.c.youtube.com/CiILENy73wIaGQlOd0rtrDmDUxMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp

If I do the command openRTSP rtsp://r5---sn-p5qlsu7r.c.youtube.m/CiILENy73wIaGQlOd0rtrDmDUxMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp then it gives me this:

Sending request: SETUP rtsp://r5---sn-p5qlsu7r.c.youtube.com/CiILENy73wIaGQlOd0rtrDmDUxMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp/trackID=2 RTSP/1.0 CSeq: 4 User-Agent: openRTSP (LIVE555 Streaming Media v2015.04.22) Transport: RTP/AVP;unicast;client_port=49838-49839

And so on..

I'm wondering how/if I can access the control URL for the RTSP link that the SDP reports back to me. I can see that the setup directly asks for rtsp:// .... /trackID=2 but if I tried to connect to the same URL, I get a bad request.

Basically, I know that the media object has two presentation streams in it - one for audio and one for video - because I can clearly see that openRTSP makes requests for those two streams to get the two aspects of the media object but I cannot seem to MANUALLY request the individual presentation streams. How can I possibly JUST request the a=control: aspects of a media part instead of the session a=control: (which is the base URL)? I've had difficulty just requesting rtsp://r5---sn-p5qlsu7r.c.youtube.com/CiILENy73wIaGQlOd0rtrDmDUxMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp/trackID=2 so is it impossible to access that specific control URL from a client? Or have I just not got the right shape for the request?

Upvotes: 0

Views: 792

Answers (1)

MSalters
MSalters

Reputation: 179799

You seem to have the URL concept flipped. A URL names a resource. Different URL's can name different things, and might need to be accessed in different ways.

In this case, the base URL happens to refer to two streams. It's used in RTSP DESCRIBE. This SDP description is how you know that there are two streams, and what their URL's are.

The idea of using an control URL for a DESCRIBE is unlikely to work. A server would have to return a special SDP document, describing only one stream, and giving that one stream an empty relative URL (as you'd append that relative URL to what is already the control URL).

Consider a simple but valid RTSP security camera. Since it only has live audio and video, it can have a static SDP file that it serves in request to your response. This file can be matched to a single hardcoded SDP URL. You must use that precise URL in the DESCRIBE request.

Of course, you are entirely allowed to use only a single SETUP request. There is no requirement that you set up all streams from the DESCRIBE response.

Upvotes: 0

Related Questions