MLV
application/octet-stream
Magic Bytes
Offset: 0
4D 4C 56 49
Magic Lantern Video (MLV) is a raw video container format developed by the Magic Lantern open-source community for use with specific Canon DSLR cameras. It stores uncompressed or lossless compressed raw sensor data, enabling high dynamic range and extensive color grading capabilities during post-production workflows. Designed to supersede the earlier proprietary RAW format, MLV supports metadata and audio embedding, though it requires specialized software for conversion to standard video codecs.
Validation Code
How to validate .mlv files in Python
Python
def is_mlv(file_path: str) -> bool:
"""Check if file is a valid MLV by magic bytes."""
signature = bytes([0x4D, 0x4C, 0x56, 0x49])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .mlv files in Node.js
Node.js
function isMLV(buffer: Buffer): boolean {
const signature = Buffer.from([0x4D, 0x4C, 0x56, 0x49]);
return buffer.subarray(0, 4).equals(signature);
}
Go
func IsMLV(data []byte) bool {
signature := []byte{0x4D, 0x4C, 0x56, 0x49}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
GET
/api/v1/mlv
curl https://filesignature.org/api/v1/mlv