{"success":true,"data":{"ext":"m4v","name":"MPEG-4 video|QuickTime file","description":"M4V is an MPEG-4-based video file format defined by the Moving Picture Experts Group and maintained through the ISO Base Media File Format family, with Apple also using it for QuickTime-compatible media. It is commonly used for digital video playback, television episodes, and content distributed through iTunes and similar media players. The format is generally safe, though older files may include DRM restrictions and compatibility depends on the player.","mime":["video/mp4","video/x-m4v"],"risk_level":"Safe","signatures":[{"hex":"66 74 79 70 4D 34 56 20","offset":4,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"66 74 79 70 4D 34 56 48","offset":4,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"66 74 79 70 4D 34 56 50","offset":4,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"66 74 79 70 6D 70 34 32","offset":4,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"4D 34 56 20","offset":0,"sources":[{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/M4V.cs"}]}],"related":["mp4","mpeg","3g2","3gp","asf","avi"],"usage":{"python":"def is_m4v(file_path: str) -> bool:\n    \"\"\"Check if file is a valid M4V by magic bytes at offset 4.\"\"\"\n    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x56, 0x20])\n    with open(file_path, \"rb\") as f:\n        f.seek(4)\n        return f.read(8) == signature","node":"function isM4V(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x56, 0x20]);\n  if (buffer.length < 12) return false;\n  return buffer.subarray(4, 12).equals(signature);\n}","go":"func IsM4V(data []byte) bool {\n    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x56, 0x20}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[4:12], signature)\n}"},"category":"Video"}}