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. Audio
  3. Audio formats and codecs
  4. Lossless audio codecs
  5. FLAC
Search Results for

    Show / Hide Table of Contents

    FLAC Audio

    FLAC is an open lossless audio format for preserving integer PCM samples in compressed form.

    A FLAC frame can describe a waveform with a predictor and exact residuals rather than storing every PCM sample literally. The decoder reconstructs those samples exactly. RFC 9639 defines the format, including integer PCM precision from 4 to 32 bits and one to eight channels.

    The residual coding makes its lossless promise easier to understand.

    Predicting a rising sample sequence

    Consider the sequence 100, 104, 108, 112 within a channel. A previous-sample predictor stores the initial value 100 and residuals +4, +4, +4.

    Decoder state Residual Restored next sample
    100 +4 104
    104 +4 108
    108 +4 112

    FLAC can use fixed predictors, transmitted linear-predictor coefficients, constant subframes, or direct sample storage. The encoder chooses an efficient representation for the data; every valid choice still supplies what the decoder needs to restore it.

    Give the residuals compact codes

    FLAC's Rice coding first maps signed residuals to nonnegative integers. Under its folding rule, 0 becomes 0, −1 becomes 1, +1 becomes 2, and +4 becomes 8.

    For an illustrative Rice parameter k=2, split 8 into quotient 2 and a two-bit remainder 0. Encode the quotient as two zero bits followed by one, then the remainder as 00. The code is 00100, five bits.

    A decoder reads the zero run, obtains quotient 2, reads remainder 0, reconstructs 2 × 4 + 0 = 8, and unfolds that to +4.

    The initial 8-bit sample plus three five-bit residual codes would use 23 bits, compared with 32 bits for four direct 8-bit samples. This is only the illustrated payload arithmetic within an excerpt. Real subframe/frame headers, parameters, block sizing, and checks also take space; it is not a claimed four-sample FLAC file.

    Frames make the audio readable and checkable

    Frame information identifies sample/block properties and position. Checks help detect corrupted frame data. File-level metadata describes stream properties and can contain tags, artwork, seek information, and an MD5 for the decoded audio.

    A seek table assists finding an audio position; it is separate from the prediction that makes the audio smaller. Tags can change while the audio frames remain the same.

    The reference tool's verification/test facilities decode and validate the stream. A stored audio MD5, when present, is useful for comparing the reconstruction to the encoded signature. It confirms consistency with that signature, not the accuracy of the original recording or disc rip.

    Choose compression effort without choosing audio quality

    FLAC's usual presets 0 through 8 select groups of encoding decisions. Greater search effort can find a smaller reversible description. The restored samples are unchanged by choosing another valid lossless preset.

    A dense or noisy passage can have a higher encoded bitrate than a simpler passage from the same recording. Both remain exact descriptions; the difference is how predictable the samples were.

    During playback, those samples normally become PCM for processing/output. An Emby receiver displaying PCM can therefore be showing a correctly decoded FLAC. Any subsequent rate or layout conversion is another stage, rather than a quality setting inside FLAC.

    See Also

    • Lossless Audio Compression
    • Linear PCM (LPCM)
    • Apple Lossless (ALAC)
    • Audio Resampling

    References

    • RFC 9639: Free Lossless Audio Codec (FLAC)
    • Xiph.Org: FLAC FAQ
    • Xiph.Org: FLAC compression presets and verification
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top