Skip to content

MPEG-4 video|QuickTime file (.m4v)

.m4v file signature | video/mp4

ISO Media, MPEG v4 system, or iTunes AVC-LC file

Safe

Magic Bytes

Offset 4
66 74 79 70 4D 34 56 20

Sources: Apache Tika, Gary Kessler

All Known Signatures

5 signature variants are documented for .m4v files across multiple sources.

Hex Signature Offset Sources
66 74 79 70 4D 34 56 20 4 Apache Tika, Gary Kessler
66 74 79 70 4D 34 56 48 4 Apache Tika
66 74 79 70 4D 34 56 50 4 Apache Tika
66 74 79 70 6D 70 34 32 4 Gary Kessler
4D 34 56 20 0 Neil Harvey FileSignatures

Extension

.m4v

MIME Type

video/mp4, video/x-m4v

Byte Offset

4

Risk Level

Safe

Validation Code

How to validate .m4v files in Python

Python
def is_m4v(file_path: str) -> bool:
    """Check if file is a valid M4V by magic bytes."""
    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x56, 0x20])
    with open(file_path, "rb") as f:
        return f.read(8) == signature

How to validate .m4v files in Node.js

Node.js
function isM4V(buffer: Buffer): boolean {
  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x56, 0x20]);
  return buffer.subarray(0, 8).equals(signature);
}

How to validate .m4v files in Go

Go
func IsM4V(data []byte) bool {
    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x56, 0x20}
    if len(data) < 8 {
        return false
    }
    return bytes.Equal(data[:8], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .m4v file?

A .m4v file is a MPEG-4 video|QuickTime file file. ISO Media, MPEG v4 system, or iTunes AVC-LC file

What are the magic bytes for .m4v files?

The magic bytes for MPEG-4 video|QuickTime file files are 66 74 79 70 4D 34 56 20 at byte offset 4. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .m4v file?

To validate a .m4v file, read the first bytes of the file and compare them against the known magic bytes (66 74 79 70 4D 34 56 20) at offset 4. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .m4v files?

The primary MIME type for .m4v files is video/mp4. Additional MIME types include: video/mp4, video/x-m4v.

Is it safe to open .m4v files?

MPEG-4 video|QuickTime file (.m4v) 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.