Difference between revisions of "ADTS"

From MultimediaWiki
Jump to navigation Jump to search
 
Line 29: Line 29:


ADTS frames goes one by one in TCP stream. Look for syncword, parse header and look for next syncword after.
ADTS frames goes one by one in TCP stream. Look for syncword, parse header and look for next syncword after.
[[Category:Container Formats]]

Revision as of 11:47, 14 February 2010

Audio Data Transport Stream (ADTS) is a format, used by MPEG TS or Shoutcast to stream audio, usually AAC.

Structure

Header consists of 7 or 9 bytes (with or without CRC).

  • 12 bits of syncword 0xFFF, all bits must be 1
  • 1 bit of field ID. Don't know meaning, set to 0
  • 2 bits of MPEG layer. If you send AAC in MPEG-TS, set to 0
  • 1 bit of protection absense. Warning, set to 1 if there is no CRC and 0 if there is CRC
  • 2 bits of profile code. Look further what is it
  • 4 bits of sample rate code.
  • 1 bit of private stream. Set to 0
  • 3 bits of channels code
  • 1 bit of originality. Set to 0
  • 1 bit of home. Set to 0
  • 1 bit of copyrighted stream. Ignore it on read and set to 0
  • 1 bit of copyright start. Set to 0
  • 13 bits of frame length. This value must include 7 or 9 bytes of header length: FrameLength = (ProtectionAbsent == 1 ? 7 : 9) + size(AACFrame)
  • 11 bits of some data. unknown yet
  • 2 bits of frames count in one packet. Set to 0
  • aac frame going.

Usage in MPEG-TS

ADTS packet must be a content of PES packet. Pack AAC data inside ADTS frame, than pack inside PES packet, then mux by TS packetizer.

Usage in Shoutcast

ADTS frames goes one by one in TCP stream. Look for syncword, parse header and look for next syncword after.