[FFmpeg-devel] Realmedia patch

Ronald S. Bultje rsbultje
Sun Aug 31 21:09:46 CEST 2008

Hi Luca,

On Sun, Aug 31, 2008 at 3:00 PM, Luca Abeni <lucabe72 at email.it> wrote:
> Ronald S. Bultje wrote:
> [...]
>>>> (i.e. in the case of audio+video, they
>>>> stream over a separate UDP session with separate port).
>>> I am not sure about this... If I understand well, you will see a single
>>> "m=" line, and both audio and video streams will be muxed inside the RM
>>> stream.
>> No, there's no RM-level muxing going on.
> So, now I am really confused... What is streamed by a real server inside
> RDT? An RA or RV ES? Or a RM stream? I've seen some of your patches use
> code from rmdec.c, so I supposed that an RDT packet contains RM...

Think of it as mashed-up RTP. There's very little RM going on. There's
two pieces of RM for which I use rmdec.c code:
- the MDPR header, part of the RM stream header, containing per-stream
information (compare it with the code inside the vids or auds chunk in
AVI), but only a subset. The remainder (which would be in the
containing RM header) is in the SDP.
- the "RDT" packet chunks start with the RTP-style "$", and then a
header which is different from the 12-byte RTP header, but contains
the same information (sequence, timestamp, etc.). The remainder (which
is the packet in RTP) is a RM packet, which is basically the pure
data, but in a different encoding than in regular RTP (i.e. you need
to re-arrange the byte-order to be able to decode it, and only the
demuxer has the information about packetization etc., see all code in
rmdec.c; this is different from regular RTP).

I use code from rmdec.c because it is real-specific and the real
demuxer uses the same code, so it makes sense to share it. However,
other than these small bits, there is very little similarity between
RDT and RM, it's not like the MMS-ASF vs. file-ASF (which is probably
~99% similar). MMS uses a single stream for all elementary streams,
this is not true for RTP or RDT, they both use the regular RTP
protocol for that, i.e. (UDP) one stream per incoming port or (TCP)
stream-IDs in the RTP packet header (directly after the "$").


More information about the ffmpeg-devel mailing list