.m4a MIME type
MPEG-4 audio (AAC)audio
audio/mp4AAC or ALAC audio in an MPEG-4 container — the format of iTunes and many podcasts.
| MIME type | audio/mp4 |
|---|---|
| Extensions | .m4a |
| Also seen as | audio/x-m4a |
| Content-Type | audio/mp4 |
| Compress in transit? | No — already compressed |
| File signature | 66 74 79 70 (ftyp) at offset 4 an ISO base media file; the brand after ftyp is typically M4A |
Good to know
- Apple software often reports
audio/x-m4a; the registered type isaudio/mp4.
Serve .m4a files with the right type
The response header to send:
Content-Type: audio/mp4
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
audio/mp4 m4a;
AddType audio/mp4 .m4a
res.set("Content-Type", "audio/mp4");import mimetypes
mimetypes.add_type("audio/mp4", ".m4a")<input type="file" accept=".m4a,audio/mp4">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.m4a | grep -i '^content-type:' file --mime-type file.m4a
Frequently asked questions
What is the MIME type for .m4a files?
audio/mp4. You may also see audio/x-m4a, but audio/mp4 is the one to send.
What Content-Type header should a .m4a file be served with?
Content-Type: audio/mp4. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .m4a?
Check its bytes rather than the extension: M4A files contain 66 74 79 70 (ftyp) at byte offset 4 — an ISO base media file; the brand after ftyp is typically M4A . On the command line, file --mime-type name.m4a does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options