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. Common containers
  4. Audio-oriented containers
  5. CAF
Search Results for

    Show / Hide Table of Contents

    CAF: Core Audio Format

    Apple Core Audio Format uses extensible chunks and 64-bit size fields to store audio, packet descriptions, and metadata.

    A recording can outgrow a classic 32-bit chunk length, and compressed audio can contain packets whose byte sizes vary. Core Audio Format (CAF) describes both the large-file storage and the packet information needed to interpret such audio.

    CAF uses 64-bit chunk size fields. The Audio Description identifies the encoding, sample rate, channel count, and packet/sample conventions. The Audio Data holds the actual content. Other chunks can supply layout, markers, metadata, and a Packet Table.

    When a fixed calculation is enough

    For ordinary PCM with a known number of bytes per sample frame, the reader can translate a frame index into a data offset by multiplication. The same logic works for packets when their byte length and frame count are fixed and known.

    Variable packets require more information. Suppose three invented encoded packets occupy 180, 240, and 190 bytes. Their data offsets from the start of this packet sequence are 0, 180, and 420 bytes. A reader cannot locate packet 3 by multiplying one assumed length by two; it needs the intervening sizes or equivalent indexing information.

    Packet Bytes Start offset
    1 180 0
    2 240 180
    3 190 420

    CAF's Packet Table provides packet descriptions as needed for variable-size or variable-duration arrangements. The description and table together let the reader locate and count the audio it will decode.

    Decoded frames and valid frames

    A compressed codec can produce initial priming frames and trailing remainder frames beyond the intended recording. CAF can describe those alongside the number of valid frames.

    For an illustrative 48 kHz case, suppose three packets decode 1,024 frames each, with 256 priming frames and 256 remainder frames. The valid recording contains 3,072 − 256 − 256 = 2,560 frames, lasting approximately 53.333 ms. The encoded packet count alone would instead suggest 64 ms.

    These fields describe which reconstructed samples belong to the presentation. They are not another codec compressing the audio a second time.

    The production file and its listening copy

    CAF's size and packet conventions are useful in capture or editing workflows, including arrangements where data continues to be written. Its description can carry different encodings, so the playback requirements come from the actual encoding and layout inside.

    If a CAF production source is to be used in an Emby collection, preserve its intended valid audio interval when making a more convenient listening copy. Compare the decoded start and end, channels, and sample format—not just the nominal packet duration. Keeping the valid-frame accounting explains why a correct copy can differ in stored structure while containing the same intended sound.

    See Also

    • WAV and RIFF
    • AIFF Container
    • PCM Sample Formats

    References

    • Apple Core Audio Format Specification 1.0
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top