← The Atlas

MP4 tag directory

Music calls it Artist, TV may call it Director, and a file inspector may show you ©ART. This directory connects the names you see on screen to the small pieces of data Apple puts inside a download.

Reading a file key

Inside each of the 1,007 single-file audio and video downloads, Apple placed descriptive tags in an MP4 item list called ilst. Each item has a key, such as ©nam for the title, and a value. The copyright symbol is a literal character in several keys. If you search a file inspector for “nam” or “artist,” look for the complete key beside the matching value.

The type tells you how to read the value. Apple defines type 1 as UTF-8 text and type 21 as a signed integer stored with the most significant byte first. Type 0 leaves the representation to the individual item. That matters when you read trkn or disk. Their structured values can carry both a position and a total. In a tag editor these might appear together as “3 of 12.”

App field or meaningFile keyRepresentationFiles carrying the tag
Title or Name©namUTF-8 text, type 11,007 of 1,007
Artist in Music or Director in TV©ARTUTF-8 text, type 11,007 of 1,007
Release date©dayUTF-8 text, type 11,007 of 1,007
Media kindstikInteger, type 211,007 of 1,007
Genre, numeric formgnreType 0, numeric payload712 of 1,007
Genre, text form©genUTF-8 text, type 1295 of 1,007
Album©albUTF-8 text, type 1833 of 833 songs
Album artistaARTUTF-8 text, type 1833 of 833 songs
Composer©wrtUTF-8 text, type 1226 of 833 songs
Track number and totaltrknStructured number pair, type 0833 of 833 songs
Disc number and totaldiskStructured number pair, type 0833 of 833 songs

One genre, two ways to write it

Apple’s AVFoundation framework exposes both predefined and free-text iTunes genre keys. The two forms appear side by side in the store’s history. Each of these 1,007 flat files used exactly one. In 712, gnre held a numeric genre. In 295, ©gen held the genre as text.

This matters if you are looking for missing genres. A text-only search would skip the 712 numeric entries. A type-aware reader can resolve the number to its genre name before comparing it with what Music or TV displays. Apple documents the two forms. These purchases do not establish why a particular title received one form or the other.

Episode IDs, numbers and descriptions

An episode can have a position in its season and a separate production identifier. Apple’s transactional TV specification gives the provider fields for both. The production identifier can contain letters, which makes storing it as text useful. All 107 downloaded episodes here contained a show name and numeric episode number. Only 105 carried a text episode ID, and 99 carried a season number.

The gap is a good example of where a specification stops. Apple requires a production number in the provider’s delivery package. Two episode downloads lack the tven tag you might look to for that information. The missing file tag gives you no grounds to conclude that the provider left the number out of its submission. Likewise, both short and long description tags appear in every flat movie and episode here, so read both when comparing the file with TV.

TV fieldFile keyRepresentationFiles carrying the tag
DescriptiondescUTF-8 text, type 1117 of 117 flat TV files
Long descriptionldesUTF-8 text, type 1117 of 117 flat TV files
ShowtvshUTF-8 text, type 1107 of 107 episodes
Episode IDtvenUTF-8 text, type 1105 of 107 episodes
Episode numbertvesInteger, type 21107 of 107 episodes
Season numbertvsnInteger, type 2199 of 107 episodes

When the app and the file agree

Apple uses ©ART for the artist on music purchases and for the value TV exposes as director on the flat TV downloads compared here. Sorting follows a similar pattern. The sort artist and sort director fields correspond to soar, and the sort title corresponds to sonm. The meaning of the field on screen helps you decide which file value to compare.

Across 7,405 comparisons where an app value and its file tag could be compared literally, every pair matched. Another 13,082 field comparisons had no corresponding file tag. A year extracted from a date, a decoded numeric genre and a track number paired with its total each require interpretation. Keep those comparisons separate. If you are tagging your own media, the descriptive fields in these tables are the useful examples. Account details, store identifiers and protection records belong to the original purchase.