[FFmpeg-devel] Realmedia patch

Ronald S. Bultje rsbultje
Tue Sep 9 16:37:36 CEST 2008

Hi Luca,

On Tue, Sep 9, 2008 at 10:07 AM, Luca Abeni <lucabe72 at email.it> wrote:
>> Only based on either one of those can you detect whether the contained
>> datastream will be RDT or RTP.
> No. You know if the stream is RDT or RTP by looking at the response to
> the SETUP command.
>> As for the transport, it can always be x-pn-tng for Real servers
> Are you really sure about this? I've seen real servers handling this
> properly (that is, accepting requests with the correct "Transport:"
> tag and replying with a correct "Transport:").

SETUP rtsp://streamr.hitpops.jp/ngc/mov/m0609.mov/streamid=0 RTSP/1.0
Transport: x-pn-tng/TCP;mode=play
RealChallenge2: d5273de0821265735b2910a6cbe0406201d0a8e3, sd=d38651c4
CSeq: 5

line='RTSP/1.0 200 OK'
line='CSeq: 5'
line='Date: Mon, 08 Sep 2008 21:11:37 GMT'
line='Session: 276998441-5'
line='Reconnect: true'
line='RealChallenge3: 1f1f861dfc36d2d379d74c951ba1f8bd4f213d09,sdr=18fd741f'
line='RDTFeatureLevel: 2'
line='Transport: x-pn-tng/tcp;interleaved=0'

The resulting stream is RTP, not RDT. So yes, regardless of whether
the server/session streams RDT or RTP, x-pn-tng is accepted and
replied. I didn't test the other way around but my guess is that RDT
accepts only x-pn-tng and RTP accepts both (and thus we should use
RTP/AVP, not x-pn-tng). So Transport: is unrelated to the internal
datastream format, it just distinguishes TCP vs. UDP etc.

> So: if you see the "IsRealDataType" tag set to 1, you can guess that
> the server supports RDT, and you can ask for it. Otherwise, you just
> ask for regular RTP (RTP/AVP, etc...). If the guess is correct, the
> server will reply with a success, otherwise the setup will fail and
> you can try to ask for a different transport.

I will do this. Code change in rtsp.c should be minimal and it will
contain little to no Real-specific code (just the hooks for it). I'll
probably move the relevant code to a new file, real_rtsp.c or
rtsp_real.c or so, just to make it clear in code and everything that
it is unrelated to RDT, but also not related to standard RTSP. Don't
bother with the existing patches, they will change, I'll send new ones
as I create them.


More information about the ffmpeg-devel mailing list