{"success":true,"data":{"ext":"mp4","name":"ISO Base Media file","description":"The ISO Base Media File Format (MP4) is a multimedia container standard developed and maintained by the International Organization for Standardization and the International Electrotechnical Commission (ISO/IEC). It is used to store video, audio, subtitles, and metadata for playback, streaming, editing, and distribution across computers, mobile devices, and web applications. The format is generally safe, though media parsers may be affected by malformed files, and some MP4 variants originated from the MPEG-4 specification.","mime":["video/mp4"],"risk_level":"Safe","signatures":[{"hex":"66 74 79 70 69 73 6F 6D","offset":4,"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"}]},{"hex":"66 74 79 70 4D 53 4E 56","offset":4,"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"}]},{"hex":"66 74 79 70 6D 70 34 31","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":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"6D 70 34 32","offset":0,"sources":[{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/MP4.cs"}]},{"hex":"69 73 6F 6D","offset":0,"sources":[{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/MP4V1.cs"}]}],"related":["m4v","asf","wmv","3g2","3gp","avi"],"usage":{"python":"def is_mp4(file_path: str) -> bool:\n    \"\"\"Check if file is a valid MP4 by magic bytes at offset 4.\"\"\"\n    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x69, 0x73, 0x6F, 0x6D])\n    with open(file_path, \"rb\") as f:\n        f.seek(4)\n        return f.read(8) == signature","node":"function isMP4(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x69, 0x73, 0x6F, 0x6D]);\n  if (buffer.length < 12) return false;\n  return buffer.subarray(4, 12).equals(signature);\n}","go":"func IsMP4(data []byte) bool {\n    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x69, 0x73, 0x6F, 0x6D}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[4:12], signature)\n}"},"category":"Video"}}