OGM (.ogm)
.ogm file signature | video/x-ogm
OGM (Ogg Media) is a multimedia container format derived from the Ogg bitstream structure, originally developed by Tobias Waldvogel and later maintained within the open-source multimedia community. It was used to package video, audio, and subtitles for playback on desktop media players, ripping tools, and video encoding workflows, especially when Matroska support was limited. OGM is now considered a legacy format, and malformed files from untrusted sources can still affect vulnerable media players.
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
Sources: Apache Tika
Extension
.ogm
MIME Type
video/x-ogm
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .ogm files in 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
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);
}
How to validate .ogm files in 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
/api/v1/ogm
curl https://filesignature.org/api/v1/ogm
See the full API documentation for all endpoints and parameters.
Related Formats
Frequently Asked Questions
What is a .ogm file?
A .ogm file is identified by the magic bytes 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 at byte offset 0. OGM (Ogg Media) is a multimedia container format derived from the Ogg bitstream structure, originally developed by Tobias Waldvogel and later maintained within the open-source multimedia community. It was used to package video, audio, and subtitles for playback on desktop media players, ripping tools, and video encoding workflows, especially when Matroska support was limited. OGM is now considered a legacy format, and malformed files from untrusted sources can still affect vulnerable media players.
What are the magic bytes for .ogm files?
The magic bytes for OGM files are 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 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .ogm file?
To validate a .ogm file, read the first bytes of the file and compare them against the known magic bytes (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) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .ogm files?
The primary MIME type for .ogm files is video/x-ogm.
Is it safe to open .ogm files?
OGM (.ogm) 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.