YUV
application/octet-stream
Magic Bytes
Offset: 0
46 4F 52 4D 59 55 56 4E
The YUV video format is a raw data container originally developed by Electronic Arts as part of the Interchange File Format standard. It is primarily used in legacy digital video production and multimedia development to store uncompressed frames using the YUV color space. As an obsolete format, it is now mostly encountered in retrocomputing environments and video processing research, presenting minimal security risk due to its lack of executable code or complex metadata.
Validation Code
How to validate .yuv files in Python
Python
def is_yuv(file_path: str) -> bool:
"""Check if file is a valid YUV by magic bytes."""
signature = bytes([0x46, 0x4F, 0x52, 0x4D, 0x59, 0x55, 0x56, 0x4E])
with open(file_path, "rb") as f:
return f.read(8) == signature
How to validate .yuv files in Node.js
Node.js
function isYUV(buffer: Buffer): boolean {
const signature = Buffer.from([0x46, 0x4F, 0x52, 0x4D, 0x59, 0x55, 0x56, 0x4E]);
return buffer.subarray(0, 8).equals(signature);
}
Go
func IsYUV(data []byte) bool {
signature := []byte{0x46, 0x4F, 0x52, 0x4D, 0x59, 0x55, 0x56, 0x4E}
if len(data) < 8 {
return false
}
return bytes.Equal(data[:8], signature)
}
API Endpoint
GET
/api/v1/yuv
curl https://filesignature.org/api/v1/yuv