: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$this->fseek($previous_offset);
$this->warning('QuickTime atom "'.$atomname.'" is not mod-8 bytes long ('.$atomsize.' bytes) at offset '.$baseoffset);
$this->warning('QuickTime atom "'.$atomname.'" is zero bytes long at offset '.$baseoffset);
case 'loci':// 3GP location (El Loco)
$info['quicktime']['comments']['gps_flags'] = array( getid3_lib::BigEndian2Int(substr($atom_data, 0, 4)));
$info['quicktime']['comments']['gps_lang'] = array( getid3_lib::BigEndian2Int(substr($atom_data, 4, 2)));
$info['quicktime']['comments']['gps_location'] = array( $this->LociString(substr($atom_data, 6), $loffset));
$loci_data = substr($atom_data, 6 + $loffset);
$info['quicktime']['comments']['gps_role'] = array( getid3_lib::BigEndian2Int(substr($loci_data, 0, 1)));
$info['quicktime']['comments']['gps_longitude'] = array(getid3_lib::FixedPoint16_16(substr($loci_data, 1, 4)));
$info['quicktime']['comments']['gps_latitude'] = array(getid3_lib::FixedPoint16_16(substr($loci_data, 5, 4)));
$info['quicktime']['comments']['gps_altitude'] = array(getid3_lib::FixedPoint16_16(substr($loci_data, 9, 4)));
$info['quicktime']['comments']['gps_body'] = array( $this->LociString(substr($loci_data, 13 ), $loffset));
$info['quicktime']['comments']['gps_notes'] = array( $this->LociString(substr($loci_data, 13 + $loffset), $loffset));
case 'chpl': // CHaPter List
// https://www.adobe.com/content/dam/Adobe/en/devnet/flv/pdfs/video_file_format_spec_v10.pdf
$chpl_version = getid3_lib::BigEndian2Int(substr($atom_data, 4, 1)); // Expected to be 0
$chpl_flags = getid3_lib::BigEndian2Int(substr($atom_data, 5, 3)); // Reserved, set to 0
$chpl_count = getid3_lib::BigEndian2Int(substr($atom_data, 8, 1));
for ($i = 0; $i < $chpl_count; $i++) {
if (($chpl_offset + 9) >= strlen($atom_data)) {
$this->warning('QuickTime chapter '.$i.' extends beyond end of "chpl" atom');
$info['quicktime']['chapters'][$i]['timestamp'] = getid3_lib::BigEndian2Int(substr($atom_data, $chpl_offset, 8)) / 10000000; // timestamps are stored as 100-nanosecond units
$chpl_title_size = getid3_lib::BigEndian2Int(substr($atom_data, $chpl_offset, 1));
$info['quicktime']['chapters'][$i]['title'] = substr($atom_data, $chpl_offset, $chpl_title_size);
$chpl_offset += $chpl_title_size;
case 'FIRM': // FIRMware version(?), seen on GoPro Hero4
$info['quicktime']['camera']['firmware'] = $atom_data;
case 'CAME': // FIRMware version(?), seen on GoPro Hero4
$info['quicktime']['camera']['serial_hash'] = unpack('H*', $atom_data);
// https://www.getid3.org/phpBB3/viewtopic.php?t=1908
if (substr($atom_data, 0, 7) == "\x00\x00\x00\x00\x55\xC4".'{') {
if ($json_decoded = @json_decode(rtrim(substr($atom_data, 6), "\x00"), true)) {
$info['quicktime']['camera'][$atomname] = $json_decoded;
if (($atomname == 'rcif') && isset($info['quicktime']['camera']['rcif']['wxcamera']['rotate'])) {
$info['video']['rotate'] = $info['quicktime']['video']['rotate'] = $info['quicktime']['camera']['rcif']['wxcamera']['rotate'];
$this->warning('Failed to JSON decode atom "'.$atomname.'"');
$atom_structure['data'] = $atom_data;
$this->warning('Expecting 55 C4 7B at start of atom "'.$atomname.'", found '.getid3_lib::PrintHexBytes(substr($atom_data, 4, 3)).' instead');
$atom_structure['data'] = $atom_data;
// https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Kodak.html#frea
// may contain "scra" (PreviewImage) and/or "thma" (ThumbnailImage)
$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 4, $atomHierarchy, $ParseAllPossibleAtoms);
case 'tima': // subatom to "frea"
// no idea what this does, the one sample file I've seen has a value of 0x00000027
$atom_structure['data'] = $atom_data;
case 'ver ': // subatom to "frea"
// some kind of version number, the one sample file I've seen has a value of "3.00.073"
$atom_structure['data'] = $atom_data;
case 'thma': // subatom to "frea" -- "ThumbnailImage"
// https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Kodak.html#frea
if (strlen($atom_data) > 0) {
$info['quicktime']['comments']['picture'][] = array('data'=>$atom_data, 'image_mime'=>'image/jpeg', 'description'=>'ThumbnailImage');
case 'scra': // subatom to "frea" -- "PreviewImage"
// https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Kodak.html#frea
// but the only sample file I've seen has no useful data here
if (strlen($atom_data) > 0) {
$info['quicktime']['comments']['picture'][] = array('data'=>$atom_data, 'image_mime'=>'image/jpeg', 'description'=>'PreviewImage');
case 'cdsc': // timed metadata reference
// A QuickTime movie can contain none, one, or several timed metadata tracks. Timed metadata tracks can refer to multiple tracks.
// Metadata tracks are linked to the tracks they describe using a track-reference of type 'cdsc'. The metadata track holds the 'cdsc' track reference.
$atom_structure['track_number'] = getid3_lib::BigEndian2Int($atom_data);
case 'esds': // Elementary Stream DeScriptor
// https://github.com/JamesHeinrich/getID3/issues/414
// https://chromium.googlesource.com/chromium/src/media/+/refs/heads/main/formats/mp4/es_descriptor.cc
// https://chromium.googlesource.com/chromium/src/media/+/refs/heads/main/formats/mp4/es_descriptor.h
$atom_structure['version'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 1)); // hardcoded: 0x00
$atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($atom_data, 1, 3)); // hardcoded: 0x000000
$atom_structure['ES_DescrTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1));
if ($atom_structure['ES_DescrTag'] != 0x03) {
$this->warning('expecting esds.ES_DescrTag = 0x03, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_DescrTag']).'), at offset '.$atom_structure['offset']);
$atom_structure['ES_DescrSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset);
$atom_structure['ES_ID'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 2));
$atom_structure['ES_flagsraw'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1));
$atom_structure['ES_flags']['stream_dependency'] = (bool) ($atom_structure['ES_flagsraw'] & 0x80);
$atom_structure['ES_flags']['url_flag'] = (bool) ($atom_structure['ES_flagsraw'] & 0x40);
$atom_structure['ES_flags']['ocr_stream'] = (bool) ($atom_structure['ES_flagsraw'] & 0x20);
$atom_structure['ES_stream_priority'] = ($atom_structure['ES_flagsraw'] & 0x1F);
if ($atom_structure['ES_flags']['url_flag']) {
$this->warning('Unsupported esds.url_flag enabled at offset '.$atom_structure['offset']);
if ($atom_structure['ES_flags']['stream_dependency']) {
$atom_structure['ES_dependsOn_ES_ID'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 2));
if ($atom_structure['ES_flags']['ocr_stream']) {
$atom_structure['ES_OCR_ES_Id'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 2));
$atom_structure['ES_DecoderConfigDescrTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1));
if ($atom_structure['ES_DecoderConfigDescrTag'] != 0x04) {
$this->warning('expecting esds.ES_DecoderConfigDescrTag = 0x04, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_DecoderConfigDescrTag']).'), at offset '.$atom_structure['offset']);
$atom_structure['ES_DecoderConfigDescrTagSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset);
$atom_structure['ES_objectTypeIndication'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1));
// https://stackoverflow.com/questions/3987850
// 0x40 = "Audio ISO/IEC 14496-3" = MPEG-4 Audio
// 0x67 = "Audio ISO/IEC 13818-7 LowComplexity Profile" = MPEG-2 AAC LC
// 0x69 = "Audio ISO/IEC 13818-3" = MPEG-2 Backward Compatible Audio (MPEG-2 Layers 1, 2, and 3)
// 0x6B = "Audio ISO/IEC 11172-3" = MPEG-1 Audio (MPEG-1 Layers 1, 2, and 3)
$streamTypePlusFlags = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1));
$atom_structure['ES_streamType'] = ($streamTypePlusFlags & 0xFC) >> 2;
$atom_structure['ES_upStream'] = (bool) ($streamTypePlusFlags & 0x02) >> 1;
$atom_structure['ES_bufferSizeDB'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 3));
$atom_structure['ES_maxBitrate'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 4));
$atom_structure['ES_avgBitrate'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 4));
if ($atom_structure['ES_avgBitrate']) {
$info['quicktime']['audio']['bitrate'] = $atom_structure['ES_avgBitrate'];
$info['audio']['bitrate'] = $atom_structure['ES_avgBitrate'];
$atom_structure['ES_DecSpecificInfoTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1));
if ($atom_structure['ES_DecSpecificInfoTag'] != 0x05) {
$this->warning('expecting esds.ES_DecSpecificInfoTag = 0x05, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_DecSpecificInfoTag']).'), at offset '.$atom_structure['offset']);
$atom_structure['ES_DecSpecificInfoTagSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset);
$atom_structure['ES_DecSpecificInfo'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, $atom_structure['ES_DecSpecificInfoTagSize']));
$esds_offset += $atom_structure['ES_DecSpecificInfoTagSize'];
$atom_structure['ES_SLConfigDescrTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1));
if ($atom_structure['ES_SLConfigDescrTag'] != 0x06) {
$this->warning('expecting esds.ES_SLConfigDescrTag = 0x05, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_SLConfigDescrTag']).'), at offset '.$atom_structure['offset']);
$atom_structure['ES_SLConfigDescrTagSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset);
$atom_structure['ES_SLConfigDescr'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, $atom_structure['ES_SLConfigDescrTagSize']));
$esds_offset += $atom_structure['ES_SLConfigDescrTagSize'];
// AVIF-related - https://docs.rs/avif-parse/0.13.2/src/avif_parse/boxes.rs.html
case 'pitm': // Primary ITeM
case 'iloc': // Item LOCation
case 'iinf': // Item INFo
case 'iref': // Image REFerence
case 'iprp': // Image PRoPerties
$this->error('AVIF files not currently supported');
$atom_structure['data'] = $atom_data;
case 'tfdt': // Track Fragment base media Decode Time box
case 'tfhd': // Track Fragment HeaDer box
case 'mfhd': // Movie Fragment HeaDer box
case 'trun': // Track fragment RUN box
$this->error('fragmented mp4 files not currently supported');
$atom_structure['data'] = $atom_data;
case 'mvex': // MoVie EXtends box
case 'pssh': // Protection System Specific Header box
case 'sidx': // Segment InDeX box
$this->warning('Unknown QuickTime atom type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" ('.trim(getid3_lib::PrintHexBytes($atomname)).'), '.$atomsize.' bytes at offset '.$baseoffset);
$atom_structure['data'] = $atom_data;
array_pop($atomHierarchy);
* @param string $atom_data
* @param array $atomHierarchy
* @param bool $ParseAllPossibleAtoms
public function QuicktimeParseContainerAtom($atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
$atom_structure = array();
if ((strlen($atom_data) == 4) && (getid3_lib::BigEndian2Int($atom_data) == 0x00000000)) {
while ($subatomoffset < strlen($atom_data)) {
$subatomsize = getid3_lib::BigEndian2Int(substr($atom_data, $subatomoffset + 0, 4));
$subatomname = substr($atom_data, $subatomoffset + 4, 4);
$subatomdata = substr($atom_data, $subatomoffset + 8, $subatomsize - 8);
// Furthermore, for historical reasons the list of atoms is optionally
// terminated by a 32-bit integer set to 0. If you are writing a program
// to read user data atoms, you should allow for the terminating 0.
if (strlen($atom_data) > 12) {
if (strlen($subatomdata) < ($subatomsize - 8)) {
// we don't have enough data to decode the subatom.
// this may be because we are refusing to parse large subatoms, or it may be because this atom had its size set too large
// so we passed in the start of a following atom incorrectly?
$atom_structure[$subatomcounter++] = $this->QuicktimeParseAtom($subatomname, $subatomsize, $subatomdata, $baseoffset + $subatomoffset, $atomHierarchy, $ParseAllPossibleAtoms);
$subatomoffset += $subatomsize;
if (empty($atom_structure)) {
public function quicktime_read_mp4_descr_length($data, &$offset) {
// http://libquicktime.sourcearchive.com/documentation/2:1.0.2plus-pdebian-2build1/esds_8c-source.html
$b = ord(substr($data, $offset++, 1));
$length = ($length << 7) | ($b & 0x7F);
} while (($b & 0x80) && ($num_bytes++ < 4));
public function QuicktimeLanguageLookup($languageid) {
// http://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-34353
static $QuicktimeLanguageLookup = array();
if (empty($QuicktimeLanguageLookup)) {
$QuicktimeLanguageLookup[0] = 'English';
$QuicktimeLanguageLookup[1] = 'French';
$QuicktimeLanguageLookup[2] = 'German';
$QuicktimeLanguageLookup[3] = 'Italian';
$QuicktimeLanguageLookup[4] = 'Dutch';
$QuicktimeLanguageLookup[5] = 'Swedish';
$QuicktimeLanguageLookup[6] = 'Spanish';
$QuicktimeLanguageLookup[7] = 'Danish';
$QuicktimeLanguageLookup[8] = 'Portuguese';
$QuicktimeLanguageLookup[9] = 'Norwegian';
$QuicktimeLanguageLookup[10] = 'Hebrew';
$QuicktimeLanguageLookup[11] = 'Japanese';
$QuicktimeLanguageLookup[12] = 'Arabic';
$QuicktimeLanguageLookup[13] = 'Finnish';
$QuicktimeLanguageLookup[14] = 'Greek';
$QuicktimeLanguageLookup[15] = 'Icelandic';
$QuicktimeLanguageLookup[16] = 'Maltese';
$QuicktimeLanguageLookup[17] = 'Turkish';
$QuicktimeLanguageLookup[18] = 'Croatian';
$QuicktimeLanguageLookup[19] = 'Chinese (Traditional)';
$QuicktimeLanguageLookup[20] = 'Urdu';
$QuicktimeLanguageLookup[21] = 'Hindi';
$QuicktimeLanguageLookup[22] = 'Thai';
$QuicktimeLanguageLookup[23] = 'Korean';
$QuicktimeLanguageLookup[24] = 'Lithuanian';
$QuicktimeLanguageLookup[25] = 'Polish';
$QuicktimeLanguageLookup[26] = 'Hungarian';
$QuicktimeLanguageLookup[27] = 'Estonian';
$QuicktimeLanguageLookup[28] = 'Lettish';
$QuicktimeLanguageLookup[28] = 'Latvian';
$QuicktimeLanguageLookup[29] = 'Saamisk';
$QuicktimeLanguageLookup[29] = 'Lappish';
$QuicktimeLanguageLookup[30] = 'Faeroese';
$QuicktimeLanguageLookup[31] = 'Farsi';
$QuicktimeLanguageLookup[31] = 'Persian';
$QuicktimeLanguageLookup[32] = 'Russian';
$QuicktimeLanguageLookup[33] = 'Chinese (Simplified)';
$QuicktimeLanguageLookup[34] = 'Flemish';
$QuicktimeLanguageLookup[35] = 'Irish';
$QuicktimeLanguageLookup[36] = 'Albanian';
$QuicktimeLanguageLookup[37] = 'Romanian';
$QuicktimeLanguageLookup[38] = 'Czech';
$QuicktimeLanguageLookup[39] = 'Slovak';
$QuicktimeLanguageLookup[40] = 'Slovenian';
$QuicktimeLanguageLookup[41] = 'Yiddish';
$QuicktimeLanguageLookup[42] = 'Serbian';
$QuicktimeLanguageLookup[43] = 'Macedonian';
$QuicktimeLanguageLookup[44] = 'Bulgarian';
$QuicktimeLanguageLookup[45] = 'Ukrainian';
$QuicktimeLanguageLookup[46] = 'Byelorussian';
$QuicktimeLanguageLookup[47] = 'Uzbek';
$QuicktimeLanguageLookup[48] = 'Kazakh';
$QuicktimeLanguageLookup[49] = 'Azerbaijani';
$QuicktimeLanguageLookup[50] = 'AzerbaijanAr';
$QuicktimeLanguageLookup[51] = 'Armenian';
$QuicktimeLanguageLookup[52] = 'Georgian';
$QuicktimeLanguageLookup[53] = 'Moldavian';
$QuicktimeLanguageLookup[54] = 'Kirghiz';
$QuicktimeLanguageLookup[55] = 'Tajiki';
$QuicktimeLanguageLookup[56] = 'Turkmen';
$QuicktimeLanguageLookup[57] = 'Mongolian';
$QuicktimeLanguageLookup[58] = 'MongolianCyr';
$QuicktimeLanguageLookup[59] = 'Pashto';
$QuicktimeLanguageLookup[60] = 'Kurdish';
$QuicktimeLanguageLookup[61] = 'Kashmiri';
$QuicktimeLanguageLookup[62] = 'Sindhi';
$QuicktimeLanguageLookup[63] = 'Tibetan';
$QuicktimeLanguageLookup[64] = 'Nepali';
$QuicktimeLanguageLookup[65] = 'Sanskrit';
$QuicktimeLanguageLookup[66] = 'Marathi';
$QuicktimeLanguageLookup[67] = 'Bengali';
$QuicktimeLanguageLookup[68] = 'Assamese';
$QuicktimeLanguageLookup[69] = 'Gujarati';
$QuicktimeLanguageLookup[70] = 'Punjabi';
$QuicktimeLanguageLookup[71] = 'Oriya';
$QuicktimeLanguageLookup[72] = 'Malayalam';
$QuicktimeLanguageLookup[73] = 'Kannada';
$QuicktimeLanguageLookup[74] = 'Tamil';
$QuicktimeLanguageLookup[75] = 'Telugu';
$QuicktimeLanguageLookup[76] = 'Sinhalese';
$QuicktimeLanguageLookup[77] = 'Burmese';
$QuicktimeLanguageLookup[78] = 'Khmer';
$QuicktimeLanguageLookup[79] = 'Lao';
$QuicktimeLanguageLookup[80] = 'Vietnamese';
$QuicktimeLanguageLookup[81] = 'Indonesian';
$QuicktimeLanguageLookup[82] = 'Tagalog';
$QuicktimeLanguageLookup[83] = 'MalayRoman';
$QuicktimeLanguageLookup[84] = 'MalayArabic';
$QuicktimeLanguageLookup[85] = 'Amharic';
$QuicktimeLanguageLookup[86] = 'Tigrinya';
$QuicktimeLanguageLookup[87] = 'Galla';
$QuicktimeLanguageLookup[87] = 'Oromo';
$QuicktimeLanguageLookup[88] = 'Somali';
$QuicktimeLanguageLookup[89] = 'Swahili';
$QuicktimeLanguageLookup[90] = 'Ruanda';
$QuicktimeLanguageLookup[91] = 'Rundi';
$QuicktimeLanguageLookup[92] = 'Chewa';
$QuicktimeLanguageLookup[93] = 'Malagasy';
$QuicktimeLanguageLookup[94] = 'Esperanto';
$QuicktimeLanguageLookup[128] = 'Welsh';
$QuicktimeLanguageLookup[129] = 'Basque';
$QuicktimeLanguageLookup[130] = 'Catalan';
$QuicktimeLanguageLookup[131] = 'Latin';
$QuicktimeLanguageLookup[132] = 'Quechua';
$QuicktimeLanguageLookup[133] = 'Guarani';
$QuicktimeLanguageLookup[134] = 'Aymara';
$QuicktimeLanguageLookup[135] = 'Tatar';
$QuicktimeLanguageLookup[136] = 'Uighur';
$QuicktimeLanguageLookup[137] = 'Dzongkha';
$QuicktimeLanguageLookup[138] = 'JavaneseRom';
$QuicktimeLanguageLookup[32767] = 'Unspecified';
if (($languageid > 138) && ($languageid < 32767)) {
ISO Language Codes - http://www.loc.gov/standards/iso639-2/php/code_list.php
Because the language codes specified by ISO 639-2/T are three characters long, they must be packed to fit into a 16-bit field.
The packing algorithm must map each of the three characters, which are always lowercase, into a 5-bit integer and then concatenate
these integers into the least significant 15 bits of a 16-bit integer, leaving the 16-bit integer's most significant bit set to zero.
One algorithm for performing this packing is to treat each ISO character as a 16-bit integer. Subtract 0x60 from the first character
and multiply by 2^10 (0x400), subtract 0x60 from the second character and multiply by 2^5 (0x20), subtract 0x60 from the third character,
and add the three 16-bit values. This will result in a single 16-bit value with the three codes correctly packed into the 15 least
significant bits and the most significant bit set to zero.
$iso_language_id .= chr((($languageid & 0x7C00) >> 10) + 0x60);
$iso_language_id .= chr((($languageid & 0x03E0) >> 5) + 0x60);
$iso_language_id .= chr((($languageid & 0x001F) >> 0) + 0x60);
$QuicktimeLanguageLookup[$languageid] = getid3_id3v2::LanguageLookup($iso_language_id);
return (isset($QuicktimeLanguageLookup[$languageid]) ? $QuicktimeLanguageLookup[$languageid] : 'invalid');
public function QuicktimeVideoCodecLookup($codecid) {
static $QuicktimeVideoCodecLookup = array();
if (empty($QuicktimeVideoCodecLookup)) {
$QuicktimeVideoCodecLookup['.SGI'] = 'SGI';
$QuicktimeVideoCodecLookup['3IV1'] = '3ivx MPEG-4 v1';
$QuicktimeVideoCodecLookup['3IV2'] = '3ivx MPEG-4 v2';
$QuicktimeVideoCodecLookup['3IVX'] = '3ivx MPEG-4';
$QuicktimeVideoCodecLookup['8BPS'] = 'Planar RGB';
$QuicktimeVideoCodecLookup['avc1'] = 'H.264/MPEG-4 AVC';
$QuicktimeVideoCodecLookup['avr '] = 'AVR-JPEG';
$QuicktimeVideoCodecLookup['b16g'] = '16Gray';
$QuicktimeVideoCodecLookup['b32a'] = '32AlphaGray';
$QuicktimeVideoCodecLookup['b48r'] = '48RGB';
$QuicktimeVideoCodecLookup['b64a'] = '64ARGB';
$QuicktimeVideoCodecLookup['base'] = 'Base';
$QuicktimeVideoCodecLookup['clou'] = 'Cloud';
$QuicktimeVideoCodecLookup['cmyk'] = 'CMYK';
$QuicktimeVideoCodecLookup['cvid'] = 'Cinepak';
$QuicktimeVideoCodecLookup['dmb1'] = 'OpenDML JPEG';
$QuicktimeVideoCodecLookup['dvc '] = 'DVC-NTSC';
$QuicktimeVideoCodecLookup['dvcp'] = 'DVC-PAL';
$QuicktimeVideoCodecLookup['dvpn'] = 'DVCPro-NTSC';
$QuicktimeVideoCodecLookup['dvpp'] = 'DVCPro-PAL';
$QuicktimeVideoCodecLookup['fire'] = 'Fire';
$QuicktimeVideoCodecLookup['flic'] = 'FLC';
$QuicktimeVideoCodecLookup['gif '] = 'GIF';
$QuicktimeVideoCodecLookup['h261'] = 'H261';
$QuicktimeVideoCodecLookup['h263'] = 'H263';
$QuicktimeVideoCodecLookup['hvc1'] = 'H.265/HEVC';
$QuicktimeVideoCodecLookup['IV41'] = 'Indeo4';
$QuicktimeVideoCodecLookup['jpeg'] = 'JPEG';
$QuicktimeVideoCodecLookup['kpcd'] = 'PhotoCD';
$QuicktimeVideoCodecLookup['mjpa'] = 'Motion JPEG-A';
$QuicktimeVideoCodecLookup['mjpb'] = 'Motion JPEG-B';
$QuicktimeVideoCodecLookup['msvc'] = 'Microsoft Video1';
$QuicktimeVideoCodecLookup['myuv'] = 'MPEG YUV420';
$QuicktimeVideoCodecLookup['path'] = 'Vector';
$QuicktimeVideoCodecLookup['png '] = 'PNG';
$QuicktimeVideoCodecLookup['PNTG'] = 'MacPaint';
$QuicktimeVideoCodecLookup['qdgx'] = 'QuickDrawGX';
$QuicktimeVideoCodecLookup['qdrw'] = 'QuickDraw';
$QuicktimeVideoCodecLookup['raw '] = 'RAW';
$QuicktimeVideoCodecLookup['ripl'] = 'WaterRipple';
$QuicktimeVideoCodecLookup['rpza'] = 'Video';
$QuicktimeVideoCodecLookup['smc '] = 'Graphics';
$QuicktimeVideoCodecLookup['SVQ1'] = 'Sorenson Video 1';
$QuicktimeVideoCodecLookup['SVQ1'] = 'Sorenson Video 3';
$QuicktimeVideoCodecLookup['syv9'] = 'Sorenson YUV9';
$QuicktimeVideoCodecLookup['tga '] = 'Targa';
$QuicktimeVideoCodecLookup['tiff'] = 'TIFF';
$QuicktimeVideoCodecLookup['WRAW'] = 'Windows RAW';
$QuicktimeVideoCodecLookup['WRLE'] = 'BMP';
$QuicktimeVideoCodecLookup['y420'] = 'YUV420';
$QuicktimeVideoCodecLookup['yuv2'] = 'ComponentVideo';
$QuicktimeVideoCodecLookup['yuvs'] = 'ComponentVideoUnsigned';
$QuicktimeVideoCodecLookup['yuvu'] = 'ComponentVideoSigned';
return (isset($QuicktimeVideoCodecLookup[$codecid]) ? $QuicktimeVideoCodecLookup[$codecid] : '');