The value types used throughout the QuickTime atoms, and the code registers that apply to QuickTime files: Apple’s language codes and graphics modes, and the QuickTime entries in the MP4 Registration Authority.
Numbers and dates
| Type | Meaning |
|---|---|
| Integers | Big-endian unless a field says otherwise (the ptv display size is the one little-endian field). |
| 16.16 fixed | 32 bits: integer part in the high 16 bits, fraction in the low 16. 0x00010000 is 1.0. |
| 8.8 fixed | 16 bits: integer part in the high byte. 0x0100 is 1.0. |
| 2.30 fixed | 32 bits with 2 integer bits, used for the u, v and w matrix column. 0x40000000 is 1.0. |
| Date | uint32 seconds since midnight, 1 January 1904 (the Macintosh epoch). No time zone is stored; UTC is strongly recommended, though older files often used local time. Subtract 2,082,844,800 to get Unix time. |
| RGB colour | Three uint16: red, green, blue. |
| Pascal string | A length byte, then that many bytes. |
Matrices
A display matrix is 36 bytes: nine values stored in the order a, b, u, c, d, v, x, y, w.
All are 16.16 fixed except u, v and w, which are 2.30. A point (x, y) maps to
(a·x + c·y + xt, b·x + d·y + yt), where xt and
yt are the stored x and y; u and v are normally 0 and w is 1.0. The movie
matrix in mvhd applies to everything in the movie, on top of each track’s
matrix.
| Matrix | a | b | c | d |
|---|---|---|---|---|
| Identity | 0x00010000 | 0 | 0 | 0x00010000 |
| Rotated 90° (portrait phone video) | 0 | 0x00010000 | 0xFFFF0000 | 0 |
With w = 0x40000000. For a rotation, x and y also carry the translation that moves the picture back into view (the track height or width, in 16.16).
Balance
An 8.8 fixed value from −1.0 (left) to +1.0 (right); 0 is centred.
Graphics modes
How a track or image is combined with what lies behind it, from QuickDraw’s transfer modes. Some use the opcolor.
| Code | Mode | Opcolor | Meaning |
|---|---|---|---|
| 0x0 | Copy | Copy the source over the destination. | |
| 0x40 | Dither copy | Dither if needed, otherwise copy. | |
| 0x20 | Blend | yes | Mix source and destination, each channel in the proportion given by that channel of the opcolor. |
| 0x24 | Transparent | yes | Replace the destination only where the source is not the opcolor. |
| 0x100 | Straight alpha | Mix by the source alpha channel. | |
| 0x101 | Premul white alpha | Colours already blended with white by alpha; remove the white, then blend. | |
| 0x102 | Premul black alpha | The same, premultiplied with black. | |
| 0x103 | Composition (dither copy) | Tracks only: draw offscreen, then compose with dither copy. | |
| 0x104 | Straight alpha blend | yes | Straight alpha, with each channel’s alpha also scaled by that channel of the opcolor. |
Language codes
A 16-bit language field holds either a Macintosh language code (below 0x400, or 0x7FFF
for unspecified), whose text is in a Macintosh encoding, or a packed ISO 639-2/T code (0x400
and up), whose text is Unicode. Apple allows ISO codes only for user data text; other
fields, including text tracks, are meant to use Macintosh codes, though mdhd
in most current files holds a packed ISO code.
Packed ISO 639-2/T
Subtract 0x60 from each of the three lower-case letters and pack the 5-bit results into
bits 14–10, 9–5 and 4–0; bit 15 is 0. For jpn: j 0x6A → 0x0A, p 0x70 → 0x10,
n 0x6E → 0x0E, giving 0x0A × 0x400 + 0x10 × 0x20 + 0x0E = 0x2A0E.
eng packs to 0x15C7 (5575) and und to 0x55C4.
Macintosh language codes
| Code | Language | Code | Language |
|---|---|---|---|
| 0 | English | 48 | Kazakh |
| 1 | French | 49 | Azerbaijani |
| 2 | German | 50 | Azerbaijani (Arabic script) |
| 3 | Italian | 51 | Armenian |
| 4 | Dutch | 52 | Georgian |
| 5 | Swedish | 53 | Moldavian |
| 6 | Spanish | 54 | Kirghiz |
| 7 | Danish | 55 | Tajiki |
| 8 | Portuguese | 56 | Turkmen |
| 9 | Norwegian | 57 | Mongolian |
| 10 | Hebrew | 58 | Mongolian (Cyrillic) |
| 11 | Japanese | 59 | Pashto |
| 12 | Arabic | 60 | Kurdish |
| 13 | Finnish | 61 | Kashmiri |
| 14 | Greek | 62 | Sindhi |
| 15 | Icelandic | 63 | Tibetan |
| 16 | Maltese | 64 | Nepali |
| 17 | Turkish | 65 | Sanskrit |
| 18 | Croatian | 66 | Marathi |
| 19 | Traditional Chinese | 67 | Bengali |
| 20 | Urdu | 68 | Assamese |
| 21 | Hindi | 69 | Gujarati |
| 22 | Thai | 70 | Punjabi |
| 23 | Korean | 71 | Oriya |
| 24 | Lithuanian | 72 | Malayalam |
| 25 | Polish | 73 | Kannada |
| 26 | Hungarian | 74 | Tamil |
| 27 | Estonian | 75 | Telugu |
| 28 | Latvian (Lettish) | 76 | Sinhala |
| 29 | Sami (Saami) | 77 | Burmese |
| 30 | Faroese | 78 | Khmer |
| 31 | Farsi | 79 | Lao |
| 32 | Russian | 80 | Vietnamese |
| 33 | Simplified Chinese | 81 | Indonesian |
| 34 | Flemish | 82 | Tagalog |
| 35 | Irish | 83 | Malay (Roman script) |
| 36 | Albanian | 84 | Malay (Arabic script) |
| 37 | Romanian | 85 | Amharic |
| 38 | Czech | 87 | Galla (Oromo) |
| 39 | Slovak | 88 | Somali |
| 40 | Slovenian | 89 | Swahili |
| 41 | Yiddish | 90 | Kinyarwanda |
| 42 | Serbian | 91 | Rundi |
| 43 | Macedonian | 92 | Nyanja |
| 44 | Bulgarian | 93 | Malagasy |
| 45 | Ukrainian | 94 | Esperanto |
| 46 | Belarusian | 128 | Welsh |
| 47 | Uzbek | 129 | Basque |
| 130 | Catalan | ||
| 131 | Latin | ||
| 132 | Quechua | ||
| 133 | Guarani | ||
| 134 | Aymara | ||
| 135 | Tatar | ||
| 136 | Uighur | ||
| 137 | Dzongkha | ||
| 138 | Javanese (Roman script) | ||
| 32767 | Unspecified |
Apple’s list has no code 86 and nothing between 95 and 127.
Registered QuickTime sample entries
The 59 sample description formats the MP4 Registration Authority lists for QuickTime,
with their media. Codes with a trailing space are shown with a gap. The formats Apple’s own
pages list are on Video and
Sound sample descriptions;
ISO family codes such as avc1, hvc1 and mp4a are on
the MP4 Sample entries page.
| Code | Media | Meaning | Registered by |
|---|---|---|---|
agsm | Audio | GSM | QT |
alaw | Audio | A-law | QT |
ap4h | Video | Apple ProRes 4444: very high quality, for 4:4:4:4 sources including alpha | QT |
ap4x | Video | Apple ProRes 4444 XQ: the highest quality, for 4:4:4:4 sources including alpha | QT |
apch | Video | Apple ProRes 422 HQ: higher data rate 4:2:2 | QT |
apcn | Video | Apple ProRes 422: high-quality 4:2:2 for multistream real-time editing | QT |
apco | Video | Apple ProRes 422 Proxy: more compressed than LT | QT |
apcs | Video | Apple ProRes 422 LT: more compressed than ProRes 422 | QT |
aprh | Video | Apple ProRes RAW HQ | QT |
aprn | Video | Apple ProRes RAW | QT |
c608 | Closed caption | CEA-608 captions | QT |
c708 | Closed caption | CEA-708 captions | QT |
CFHD | Video | CineForm HD wavelet codec | CineForm |
civd | Video | Cinepak | QT |
drac | Video | Dirac | Dirac |
DV10 | Video | Digital Voodoo 10-bit uncompressed 4:2:2 | Digital Voodoo |
dvh5 | Video | DVCPRO HD 1080/50i | QT |
dvh6 | Video | DVCPRO HD 1080/60i | QT |
dvhp | Video | DVCPRO HD 720/60p | QT |
dvi | Audio | DVI ADPCM (as used in RTP, 4:1) | QT |
DVOO | Video | Digital Voodoo 8-bit uncompressed 4:2:2 | Digital Voodoo |
DVOR | Video | Digital Voodoo intermediate raw | Digital Voodoo |
DVTV | Video | Digital Voodoo intermediate 2vuy | Digital Voodoo |
DVVT | Video | Digital Voodoo intermediate v210 | Digital Voodoo |
fl32 | Audio | 32-bit float | QT |
fl64 | Audio | 64-bit float | QT |
flic | Video | Autodesk FLIC animation | QT |
gif | Video | GIF image | QT |
h261 | Video | ITU-T H.261 | QT |
h263 | Video | ITU-T H.263 (QuickTime format) | QT |
HD10 | Video | Digital Voodoo 10-bit uncompressed 4:2:2 HD | Digital Voodoo |
ima4 | Audio | IMA ADPCM 4:1 | QT |
in24 | Audio | 24-bit integer uncompressed | QT |
in32 | Audio | 32-bit integer uncompressed | QT |
jpeg | Video | JPEG image | QT |
lpcm | Audio | Uncompressed audio, integer or float | QT |
M105 | Video | Matrox hardware internal format; pixel layout proprietary | Matrox |
mjpa | Video | Motion-JPEG format A | QT |
mjpb | Video | Motion-JPEG format B | QT |
Opus | Audio | Opus | Opus |
png | Video | PNG image | QT |
PNTG | Video | Apple MacPaint image | QT |
Qclp | Audio | Qualcomm PureVoice | QT |
QDM2 | Audio | QDesign Music 2 | QT |
QDMC | Audio | QDesign Music 1 | QT |
rle | Video | Apple Animation | QT |
rpza | Video | Apple Video (“road pizza”) | QT |
Shr0 | Video | SheerVideo, generic | BitJazz |
Shr1 | Video | SheerVideo RGB[A], 8 bits per channel | BitJazz |
Shr2 | Video | SheerVideo Y′CbCr[A] 4:4:4[:4], 8 bits, BT.601 video range | BitJazz |
Shr3 | Video | SheerVideo Y′CbCr 4:2:2, 8 bits, BT.601 video range | BitJazz |
Shr4 | Video | SheerVideo Y′CbCr 4:2:2, 8 bits, full-range luma and wide-range two’s-complement chroma | BitJazz |
SVQ1 | Video | Sorenson Video 1 | QT |
SVQ3 | Video | Sorenson Video 3 | QT |
tga | Video | Truevision Targa | QT |
tiff | Video | TIFF image | QT |
ulaw | Audio | µ-law 2:1 | QT |
vdva | Audio | DV audio, variable duration per video frame | QT |
WRLE | Video | Windows BMP image | QT |
Apple’s video list writes Cinepak as cvid, the code found in files; the
registry lists civd.
Registered QuickTime atoms
| Atom | Meaning | Registered by |
|---|---|---|
albm | Album title and track number (user data) | 3GPP |
auth | Media author (user data) | 3GPP |
clip | Visual clipping region container | QT |
clsf | Media classification (user data) | 3GPP |
cprt | Copyright (user data) | ISO |
crgn | Visual clipping region | QT |
csgm | Compact sample-to-group | QT |
ctab | Track colour table | QT |
dcfD | Marlin DCF duration (user data) | OMArlin |
elng | Extended language tag | QT |
imap | Track input map | QT |
kmat | Compressed track matte | QT |
load | Track preload settings | QT |
matt | Track matte for compositing | QT |
pnot | Preview | QT |
wide | Reserved space for expansion | QT |
Registered QuickTime track references: cdep structural dependency,
chap chapter list, scpt transcript, ssrc non-primary
source and tmcd timecode (see Track
references).
Registered user data items
User data items registered with the MP4 Registration Authority, in addition to Apple’s own list on Movie atoms. Many come from 3GPP (see the 3GP pages) and ISO.
| Item | Meaning | Registered by |
|---|---|---|
ades | Accessibility description of the content, like HTML’s alt text; formatted like cprt | Apple |
albm | Album title and track number | 3GPP |
alou | Album loudness base | ISO |
angl | Camera angle the clip was shot through | Apple |
auth | Author | 3GPP |
clfn | Clip file name | Apple |
clid | Clip identifier | Apple |
clsf | Classification | 3GPP |
cmid | Camera identifier | Apple |
cmnm | Camera name | Apple |
coll | Collection the media comes from | 3GPP |
cprt | Copyright | ISO |
date | ISO 8601 date and time the content was created (for recordings, when recording started) | Apple |
dscp | Description | 3GPP |
gnre | Genre | 3GPP |
hinf | Hint information | ISO |
hnti | Hint information | ISO |
hpix | Hipix Rich Picture | Hipix |
kind | Track kind | ISO |
kywd | Keywords | 3GPP |
loci | Location | 3GPP |
ludt | Track loudness container | ISO |
manu | Camera manufacturer | Apple |
modl | Camera model | Apple |
orie | Orientation | 3GPP |
perf | Performer | 3GPP |
prmd | Production metadata | YouTube |
reel | Tape reel name | Apple |
rtng | Rating | 3GPP |
scen | Scene the clip was shot for | Apple |
shot | Shot name | Apple |
slno | Camera serial number | Apple |
strk | Sub-track information | ISO |
swre | Name and version of the software that made the movie | Apple |
thmb | Thumbnail image | 3GPP |
titl | Title | 3GPP |
tlou | Track loudness base | ISO |
tsel | Track selection | ISO |
urat | User star rating | 3GPP |
yrrc | Recording year | 3GPP |
The registry gives names only, not layouts. The 3GPP items are laid out on the 3GP
pages; the layouts of the Apple camera items (angl to slno) are not
covered here.