File format

M4A - MPEG-4 Audio

An M4A file is audio inside an MP4 container, usually AAC but sometimes lossless ALAC. You meet it in bought music, voice memos and audiobook downloads.

An M4A file is audio inside an MP4 container. Apple introduced the extension so people could tell a music file apart from a video file, since both use the same underlying container: MPEG-4 Part 14, standardised by the Moving Picture Experts Group and itself descended from Apple's older QuickTime file format. If you have bought a song from an online store, recorded a voice memo on a phone or exported audio from a modern editor, you have almost certainly handled an M4A.

A container, and what sits inside it

The key point is that the extension describes the wrapper, not the sound. An MP4 file is built from nested boxes, historically called atoms, each labelled with four characters. ftyp declares what kind of file it is, mdat holds the audio data itself, and moov holds everything that describes it: how many tracks there are, how long they run, timing tables that let a player jump to any moment, and the tags.

The audio inside is usually AAC, which is lossy, meaning part of the original recording was discarded to save space and cannot be recovered. But it can equally be ALAC, Apple Lossless, which keeps every sample exactly and produces a much larger file. Both are called .m4a, and the extension alone will not tell you which you have. A metadata report will, and it is worth checking before you assume a file is or is not a faithful copy. Related extensions use the same container for a different purpose: .m4b marks an audiobook so a player remembers your place, and .m4p was the old copy-protected store format.

What metadata an M4A file carries

M4A tagging is rich and well used. The tags sit in a metadata list inside the moov box, and their names are also four characters, many of them beginning with a copyright sign. Common ones are ©nam (title), ©ART (artist), aART (album artist), ©alb (album), ©day (date), ©gen (genre), trkn (track number and total), disk (disc number), ©wrt (composer), ©cmt (comment), ©lyr (lyrics), covr (cover artwork), cpil (part of a compilation), tmpo (beats per minute) and ©too, the tool that encoded the file. Podcast and audiobook files add a description and chapter markers. There is also a free-form mechanism that lets any application store its own named values, which is how identifiers from online music databases and gapless playback data get in.

Several of those fields are personal, and one group especially. A track bought from Apple's store carries the purchaser's account with it: an apID field holding the email address used to buy it, an ownr field with the account holder's name, and a purchase date alongside store catalogue numbers. Those travel with the file when it is copied or shared, which surprises a lot of people. Beyond that, the container header keeps creation and modification times for the file and for each track, counted in seconds from the start of 1904, so a recording usually carries its own date even when every other field is blank. Recording apps can write extras of their own through the free-form mechanism, and what lands there is entirely up to the app.

When to use M4A

M4A is a good default for music and speech you want to keep and organise. It compresses well as AAC, it can be lossless as ALAC when quality comes first, and its tagging is more consistent than MP3's two competing ID3 versions. MP3 still beats it on sheer reach, so an old car stereo or a cheap portable player is a fair reason to convert. And if you plan to pass on a purchased file, look at the account fields first: clearing them is the difference between sharing a song and sharing your email address.