OGM (.ogm)
.ogm file signature | 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
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.
Frequently Asked Questions
What is a .ogm file?
A .ogm file is a OGM file.
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.