{"success":true,"data":{"ext":"m4a","name":"Apple Lossless Audio Codec file","description":"M4A is an audio file format developed by Apple as part of the MPEG-4 media standard and commonly used for Apple Lossless Audio Codec content. It is used for music distribution, audio playback, podcasts, and storage in applications such as iTunes, Apple Music, and other media players. The format is generally safe, though files from untrusted sources may contain malformed metadata or embedded content that can affect vulnerable 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"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"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"}]},{"hex":"66 74 79 70 33 67 70","offset":4,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"4D 34 41 20","offset":0,"sources":[{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/M4A.cs"}]}],"related":["m4b","flac","oga","ogg","aac","ac3"],"usage":{"python":"def is_m4a(file_path: str) -> bool:\n    \"\"\"Check if file is a valid M4A 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 isM4A(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 IsM4A(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"}}