[Ffmpeg-devel] MPEG4 over TS

Måns Rullgård mru
Fri Jun 3 11:27:51 CEST 2005

Nico Sabbi <nsabbi at tiscali.it> writes:

> Erik Slagter wrote:
>>On Thu, 2005-06-02 at 17:40 +0200, Nico Sabbi wrote:
>>> this is for AAC in LATM syntax, but since vlc always/mostly uses
>>> ADTS syntax the correct stream_type is 0x0f.
>>>BTW, don't top-post, please
>>I am trying to get a bit of a grip on all mpeg terminology. Am I right
>>that ADTS is the trick to put ac3 sound into a mpeg2 program stream
>>using private_1 stream and then prepending the data with a single byte
>>specifying the actual data?
> no, you are wrong :)

Yes, and ADTS is a syntax for AAC elementary streams with a small (a
few bytes) header on each frame.  This header contains a sync pattern
and some information about the stream (channels, sample rate, etc),
much like MPEG1 audio.  This header can be omitted if the same
information can be conveyed by other means (e.g. "extradata" fields),
and the container can identify the frame boundaries.  AAC in quicktime
is stored this way.

> AC3 is stored in dvd's implementation of mpegps using a technique
> called substreaming: the first bytes of the payload indicates a
> substream_id, the other N-1 bytes (for ac3 N=4) indicate how many
> frames begin in the current pes and where the first byte of the
> first frame starts (in byte offsets) after the 4 bytes. For LPCM N
> is 6 or 7 (not sure). For DTS I don't know.

7 for LPCM, 4 for DTS.

> Overall it's a kind of silly muxing inside the mux that I don't
> like.

It's not so bad.  The regular PES header is used far as possible,
e.g. for timestamps, and there are no really stupid things like
placing more than one substream packet in a single PES packet.  IMHO,
it's a good thing they chose to use MPEG2 instead of inventing
something entirely new.

>>And what would LATM then be (in three words ;-))?
> another syntax for AAC. These aac people seem to get never tired of
> pulling out new dialects


M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list