Microsoft Windows Media Audio/Video File
video/x-ms-asf
Magic Bytes
Offset: 0
30 26 B2 75
Advanced Systems Format (ASF) is a proprietary digital media container developed by Microsoft for streaming and storing audio and video content. It primarily hosts Windows Media Audio and Windows Media Video streams, facilitating synchronized playback across the Windows ecosystem and various network protocols. As a legacy format largely superseded by modern standards, it historically introduced early digital rights management capabilities and helped establish foundational internet streaming frameworks while remaining generally safe for use.
Validation Code
How to validate .asf files in Python
Python
def is_asf(file_path: str) -> bool:
"""Check if file is a valid ASF by magic bytes."""
signature = bytes([0x30, 0x26, 0xB2, 0x75])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .asf files in Node.js
Node.js
function isASF(buffer: Buffer): boolean {
const signature = Buffer.from([0x30, 0x26, 0xB2, 0x75]);
return buffer.subarray(0, 4).equals(signature);
}
Go
func IsASF(data []byte) bool {
signature := []byte{0x30, 0x26, 0xB2, 0x75}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
GET
/api/v1/asf
curl https://filesignature.org/api/v1/asf