{"success":true,"data":{"ext":"m2p","name":"M2P","description":"M2P is an MPEG Program Stream container format defined by the Moving Picture Experts Group and standardized through ISO/IEC MPEG specifications. It is used to package multiplexed video, audio, and timing data for digital television, DVDs, and other media distribution systems. The format is legacy in many workflows and is generally safe to open, though damaged or malformed media files can still cause parsing issues in some players.","mime":[],"risk_level":"Safe","signatures":[{"hex":"00 00 01 BA","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["mpg","vob"],"usage":{"python":"def is_m2p(file_path: str) -> bool:\n    \"\"\"Check if file is a valid M2P 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 isM2P(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x00, 0x00, 0x01, 0xBA]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsM2P(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"}}