Skip to content

Commit 3c7e76b

Browse files
committed
#452 better handle some Quicktime metadata
#452
1 parent 638be01 commit 3c7e76b

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

getid3/getid3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class getID3
387387
*/
388388
protected $startup_warning = '';
389389

390-
const VERSION = '1.9.24-202510161031';
390+
const VERSION = '1.9.24-202510171248';
391391
const FREAD_BUFFER_SIZE = 32768;
392392

393393
const ATTACHMENTS_NONE = false;

getid3/module.audio-video.quicktime.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset
908908
$info['fileformat'] = 'mp4';
909909
$info['video']['fourcc'] = $atom_structure['sample_description_table'][$i]['data_format'];
910910
if ($this->QuicktimeVideoCodecLookup($info['video']['fourcc'])) {
911-
$info['video']['fourcc_lookup'] = $this->QuicktimeVideoCodecLookup($info['video']['fourcc']);
911+
$info['video']['codec'] = $this->QuicktimeVideoCodecLookup($info['video']['fourcc']);
912912
}
913913

914914
// https://www.getid3.org/phpBB3/viewtopic.php?t=1550
@@ -960,6 +960,11 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset
960960
}
961961
break;
962962

963+
case 'keys':
964+
// 2025-Oct-17 probably something to do with this but I haven't found clear documentation explaining what I'm seeing, ignoring for now
965+
// https://developer.apple.com/documentation/quicktime-file-format/metadata_key_declaration_atom/
966+
break;
967+
963968
default:
964969
switch ($atom_structure['sample_description_table'][$i]['data_format']) {
965970
case 'mp4s':
@@ -1766,11 +1771,19 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset
17661771

17671772
switch ($atom_structure['key_name']) {
17681773
case 'com.android.capture.fps':
1774+
case 'com.apple.quicktime.live-photo.vitality-score':
17691775
$atom_structure['data'] = getid3_lib::BigEndian2Float($atom_structure['data']);
17701776
break;
17711777
case 'com.apple.quicktime.camera.focal_length.35mm_equivalent':
1778+
case 'com.apple.quicktime.live-photo.auto':
1779+
case 'com.apple.quicktime.live-photo.vitality-scoring-version':
1780+
case 'com.apple.quicktime.full-frame-rate-playback-intent':
17721781
$atom_structure['data'] = getid3_lib::BigEndian2Int($atom_structure['data']);
17731782
break;
1783+
1784+
case 'com.apple.quicktime.location.accuracy.horizontal':
1785+
$atom_structure['data'] = (float) $atom_structure['data']; // string representing float value e.g. "14.989691"
1786+
break;
17741787
}
17751788

17761789
if ($atom_structure['key_name'] && $atom_structure['data']) {

0 commit comments

Comments
 (0)