taglib-ts
    Preparing search index...

    Function detectByContent

    • Determine the audio format by inspecting magic bytes in the stream.

      Reads up to the first 36 bytes (and occasionally seeks further for formats such as S3M and MOD). MPEG is matched last because its frame-sync bytes (0xff 0xe*) are prone to false positives.

      Parameters

      • stream: IOStream

        The audio data stream, seeked to any position on entry.

      Returns Promise<string | null>

      A format key string, or null when the format cannot be identified.