Skip to content

AC3 (.ac3)

.ac3 file signature | audio/ac3

AC3, also known as Dolby Digital, is an audio compression format developed and maintained by Dolby Laboratories. It is used for multichannel sound in DVD-Video, digital television broadcasts, home theater systems, and some media files. As an established legacy audio format, AC3 is generally safe to play, though untrusted files may still trigger parser bugs in outdated software or hardware.

Safe

Magic Bytes

Offset 0
0B 77

Sources: Apache Tika

Extension

.ac3

MIME Type

audio/ac3

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .ac3 files in Python

Python
def is_ac3(file_path: str) -> bool:
    """Check if file is a valid AC3 by magic bytes."""
    signature = bytes([0x0B, 0x77])
    with open(file_path, "rb") as f:
        return f.read(2) == signature

How to validate .ac3 files in Node.js

Node.js
function isAC3(buffer: Buffer): boolean {
  const signature = Buffer.from([0x0B, 0x77]);
  return buffer.subarray(0, 2).equals(signature);
}

How to validate .ac3 files in Go

Go
func IsAC3(data []byte) bool {
    signature := []byte{0x0B, 0x77}
    if len(data) < 2 {
        return false
    }
    return bytes.Equal(data[:2], signature)
}

API Endpoint

GET /api/v1/ac3
curl https://filesignature.org/api/v1/ac3

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .ac3 file?

A .ac3 file is identified by the magic bytes 0B 77 at byte offset 0. AC3, also known as Dolby Digital, is an audio compression format developed and maintained by Dolby Laboratories. It is used for multichannel sound in DVD-Video, digital television broadcasts, home theater systems, and some media files. As an established legacy audio format, AC3 is generally safe to play, though untrusted files may still trigger parser bugs in outdated software or hardware.

What are the magic bytes for .ac3 files?

The magic bytes for AC3 files are 0B 77 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .ac3 file?

To validate a .ac3 file, read the first bytes of the file and compare them against the known magic bytes (0B 77) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .ac3 files?

The primary MIME type for .ac3 files is audio/ac3.

Is it safe to open .ac3 files?

AC3 (.ac3) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.