{"success":true,"data":{"ext":"mpg4","name":"MPG4","description":"MPG4 is a digital multimedia file format associated with the MPEG-4 standard, developed and maintained by the Moving Picture Experts Group within ISO/IEC. It is used for storing video, audio, subtitles, and related metadata in applications such as media playback, streaming, and portable device distribution. The format is generally safe, though like other media containers it may contain malformed data that can expose vulnerabilities in unpatched players.","mime":["video/mp4"],"risk_level":"Safe","signatures":[{"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"}]}],"related":["m4v","mp4","mp4v"],"usage":{"python":"def is_mpg4(file_path: str) -> bool:\n    \"\"\"Check if file is a valid MPG4 by magic bytes at offset 4.\"\"\"\n    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x6D, 0x70, 0x34, 0x31])\n    with open(file_path, \"rb\") as f:\n        f.seek(4)\n        return f.read(8) == signature","node":"function isMPG4(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x6D, 0x70, 0x34, 0x31]);\n  if (buffer.length < 12) return false;\n  return buffer.subarray(4, 12).equals(signature);\n}","go":"func IsMPG4(data []byte) bool {\n    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x6D, 0x70, 0x34, 0x31}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[4:12], signature)\n}"},"category":"Video"}}