[FFmpeg-devel] [PATCH] RTSP-MS 14/15: ASF packet parsing

Ronald S. Bultje rsbultje
Tue Mar 24 16:25:22 CET 2009


Hi Luca,

On Tue, Mar 24, 2009 at 9:06 AM, Luca Abeni <lucabe72 at email.it> wrote:
> In this case, the payload will be passed to an ASF demuxer instead
> of the framer, and the ASF demuxer surely knows how to split an ASF stream
> in frames...

Well, yes, but...

OK, this is ugly, I know.

MS has different "levels" of "framing"

RTP/TCP spits out one ASF frame per packet ('$' thing), and the ASF
demuxer will do what's needed.

RTP/UDP spits out one RTP packet which can contain any number of ASF
packets. The size of the RTP packet is always RTP_MAX_PACKET_SIZE
(1452 bytes or so). The ASF packets are about 4kb or so.

ASF then has its complete own mechanism of framing. One ASF packet
could contain any number of audio frames, mostly more than one, and
any number of packets coould make up a video frame. For I-frames,
there's usually multiple ASF packets of 4kb (so for UDP, that's
multiple UDP packets per ASF packet x multiple ASF packets per single
video frame). For P-frames, it could be less but it's anything in
between the I-frame and audio case.

So it's not instead of ASF packet parsing or codec frame parsing. It's
in addition to. It's very ugly as a new, separate, completely
different and unneeded layer of indirection. But it's there. :-(.

Quicktime has it too, but QT serves pure data "coded" packets instead
of "quicktime packets. Unfortunately, I haven't found a way of doing
codec-dependent parsing like mpegts, it appears it's not that
simple...

Ronald



More information about the ffmpeg-devel mailing list