{"success":true,"data":{"ext":"mkv","name":"Matroska stream file","description":"Matroska is an open multimedia container format developed and maintained by the Matroska development team. It is used to store video, audio, subtitles, and chapter data in movies, television recordings, and online video distributions, including WebM-based content. The format is generally safe to open, though large files and embedded tracks can affect performance; it is not a legacy format.","mime":["video/x-matroska"],"risk_level":"Safe","signatures":[{"hex":"1A 45 DF A3","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"},{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/Mkv.cs"}]},{"hex":"1A 45 DF A3 93 42 82 88 6D 61 74 72 6F 73 6B 61","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["webm","mka","3g2","3gp","asf","avi"],"usage":{"python":"def is_mkv(file_path: str) -> bool:\n    \"\"\"Check if file is a valid MKV by magic bytes.\"\"\"\n    signature = bytes([0x1A, 0x45, 0xDF, 0xA3])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isMKV(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x1A, 0x45, 0xDF, 0xA3]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsMKV(data []byte) bool {\n    signature := []byte{0x1A, 0x45, 0xDF, 0xA3}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Video"}}