{"success":true,"data":{"ext":"mpg","name":"DVD Video Movie File","description":"MPEG Program Stream (MPG) is a container format defined by the Moving Picture Experts Group and standardized through ISO/IEC for multiplexing digital audio and video. It is used for DVD video, older digital television recordings, and general-purpose MPEG media playback and authoring. The format is considered legacy in many workflows, and files from untrusted sources should still be handled carefully because they may contain embedded streams or corrupted metadata.","mime":["video/mpeg"],"risk_level":"Safe","signatures":[{"hex":"00 00 01 BA","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"},{"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":"00 00 01 B3","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"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"00 00 01","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["m2v","mpe","mpeg","vob","mov","3g2"],"usage":{"python":"def is_mpg(file_path: str) -> bool:\n    \"\"\"Check if file is a valid MPG by magic bytes.\"\"\"\n    signature = bytes([0x00, 0x00, 0x01, 0xBA])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isMPG(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x00, 0x00, 0x01, 0xBA]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsMPG(data []byte) bool {\n    signature := []byte{0x00, 0x00, 0x01, 0xBA}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Video"}}