MPE
video/mpeg
Magic Bytes
Offset: 0
00 00 01 B3
The MPE file format is a digital video container standard developed by the Moving Picture Experts Group (MPEG) for compressed multimedia data. It functions identically to standard MPEG-1 or MPEG-2 files and is primarily used for storing synchronized audio and video streams on storage media. While this legacy format has been largely superseded by more efficient modern standards like H.264, it remains universally supported by media players and presents minimal security risks to users.
Validation Code
How to validate .mpe files in Python
Python
def is_mpe(file_path: str) -> bool:
"""Check if file is a valid MPE by magic bytes."""
signature = bytes([0x00, 0x00, 0x01, 0xB3])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .mpe files in Node.js
Node.js
function isMPE(buffer: Buffer): boolean {
const signature = Buffer.from([0x00, 0x00, 0x01, 0xB3]);
return buffer.subarray(0, 4).equals(signature);
}
Go
func IsMPE(data []byte) bool {
signature := []byte{0x00, 0x00, 0x01, 0xB3}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
GET
/api/v1/mpe
curl https://filesignature.org/api/v1/mpe