OGM
video/x-ogm
Magic Bytes
Offset: 0
4F 67 67 53 00 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 76 69 64 65 6F
OGM (Ogg Media) is a multimedia container format developed by Tobias Waldvogel as an unofficial extension of the Ogg encapsulation format. It was widely used during the early 2000s for distributing encoded video content featuring multiple audio tracks and integrated subtitle streams. This legacy format is now largely obsolete, having been superseded by the standardized Ogg container and Matroska, though it remains safe for local playback in modern media players compatible with legacy codecs.
Validation Code
How to validate .ogm files in Python
Python
def is_ogm(file_path: str) -> bool:
"""Check if file is a valid OGM by magic bytes."""
signature = bytes([0x4F, 0x67, 0x67, 0x53, 0x00, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x76, 0x69, 0x64, 0x65, 0x6F])
with open(file_path, "rb") as f:
return f.read(33) == signature
How to validate .ogm files in Node.js
Node.js
function isOGM(buffer: Buffer): boolean {
const signature = Buffer.from([0x4F, 0x67, 0x67, 0x53, 0x00, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x76, 0x69, 0x64, 0x65, 0x6F]);
return buffer.subarray(0, 33).equals(signature);
}
Go
func IsOGM(data []byte) bool {
signature := []byte{0x4F, 0x67, 0x67, 0x53, 0x00, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x76, 0x69, 0x64, 0x65, 0x6F}
if len(data) < 33 {
return false
}
return bytes.Equal(data[:33], signature)
}
API Endpoint
GET
/api/v1/ogm
curl https://filesignature.org/api/v1/ogm