{"success":true,"data":{"ext":"m4b","name":"M4B","description":"M4B is an MPEG-4 audiobook file format based on the ISO/IEC MPEG-4 Part 14 container specification, maintained through the MPEG and ISO standards process. It is commonly used for spoken-word audiobooks, podcasts, and long-form audio distributed through media players and digital bookstores, often with chapter markers and bookmarking support. The format is generally safe, though, like other MP4-based media files, it can contain metadata or embedded content that should be handled with current, trusted software.","mime":["audio/mp4"],"risk_level":"Safe","signatures":[{"hex":"66 74 79 70 4D 34 41 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"}]},{"hex":"66 74 79 70 4D 34 42 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"}]},{"hex":"66 74 79 70 46 34 41 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"}]},{"hex":"66 74 79 70 46 34 42 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"}]}],"related":["m4a","aac","ac3","aif","aifc","aiff"],"usage":{"python":"def is_m4b(file_path: str) -> bool:\n    \"\"\"Check if file is a valid M4B by magic bytes at offset 4.\"\"\"\n    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x41, 0x20])\n    with open(file_path, \"rb\") as f:\n        f.seek(4)\n        return f.read(8) == signature","node":"function isM4B(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x41, 0x20]);\n  if (buffer.length < 12) return false;\n  return buffer.subarray(4, 12).equals(signature);\n}","go":"func IsM4B(data []byte) bool {\n    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x41, 0x20}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[4:12], signature)\n}"},"category":"Audio"}}