Emby Emby Emby Learn
  • Emby Home
  • Video
  • Audio
  • Media Files
    • Subtitles and captions
    • Photos and images
    • Metadata and discovery
    • Libraries and media collections
    • Playback and streaming
    • Media hardware acceleration
    • Displays and AV connections
    • Live TV and recording
  1. Emby Learn
  2. Media files and containers
  3. File packaging details
  4. AAC transport formats
  5. AAC stream packaging
Search Results for

    Show / Hide Table of Contents

    AAC Stream Packaging

    AAC audio can use several framing and container conventions that carry its encoded data and decoder configuration in different ways.

    An AAC decoder needs encoded audio units and configuration. Packaging decides where it obtains the unit boundaries, object type, sampling information, and channel description.

    Packaging Setup and boundaries
    ADTS Repeated transport headers surrounding audio data
    MP4/M4A Track setup plus sample sizes and timing in the container
    LATM Multiplex configuration and audio payload structure

    Follow one ordinary AAC-LC stereo stream at 44.1 kHz from ADTS into MP4. The audio units can stay encoded while the descriptions around them change.

    Translate the setup

    In this AAC-LC case, an ADTS header's profile value is 1, which maps to MPEG-4 audio object type 2. Its sampling-frequency index is 4, meaning 44,100 Hz, and channel configuration 2 represents stereo.

    The writer constructs an AudioSpecificConfig for the destination track. For this simple case, the object type, frequency index, channel configuration, and basic general-audio flags form the familiar two-byte value 0x12 0x10. The decoder receives that setup from the track description rather than deriving it from a repeated ADTS header.

    Those bytes describe this particular AAC configuration. HE-AAC and other variants can need additional signalling and have core and output properties that differ; they must be parsed in their own terms rather than forced into this two-byte example.

    Translate each unit's surrounding structure

    The converter reads an ADTS frame length, separates the header from its encoded audio, and writes the audio unit as a destination sample. It records that sample's size and duration through the container's structures.

    If an invented frame has a seven-byte unprotected header and 100 bytes of audio, the destination sample can hold those same 100 audio bytes. The original framed unit occupied 107 bytes. The MP4 also adds its own track and sample metadata, so removing seven bytes per unit does not by itself predict the total file-size difference.

    No sound has yet been decoded in this route. FFmpeg's aac_adtstoasc filter performs this sort of header/configuration translation for applicable inputs.

    What is preserved?

    The coded sound can be preserved while framing, setup location, and timing description change. A raw source may also lack the album tags or chapter information supplied by a more general container. These are distinct pieces of the result.

    For an Emby source comparison, record the AAC variant and how it is supplied to the decoder. A successful packaging-only route can avoid a new lossy audio generation; a route requiring another audio representation instead passes through decoded samples and an encoder.

    See Also

    • AAC: Audio Data Transport Stream (ADTS)
    • AAC: Low Overhead Audio Transport Multiplex (LATM)
    • M4A and M4B File Conventions
    • Elementary Streams
    • AAC-LC Audio
    • HE-AAC Audio

    References

    • ISO/IEC 14496-3:2019: MPEG-4 Audio
    • ISO/IEC 13818-7:2006: MPEG-2 AAC
    • FFmpeg: aac_adtstoasc bitstream filter
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top