exiftool_vendored 13.37.0 → 13.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ use vars qw($VERSION);
17
17
  use Image::ExifTool qw(:DataAccess :Utils);
18
18
  use Image::ExifTool::QuickTime;
19
19
 
20
- $VERSION = '1.14';
20
+ $VERSION = '1.15';
21
21
 
22
22
  sub ProcessGoPro($$$);
23
23
  sub ProcessString($$$);
@@ -251,7 +251,8 @@ my %noYes = ( N => 'No', Y => 'Yes' );
251
251
  Notes => 'gyroscope readings in rad/s',
252
252
  Binary => 1,
253
253
  },
254
- HCLT => 'HorizonControl', #3
254
+ LOGS => 'HealthLogs',
255
+ HCTL => 'HorizonControl', #3
255
256
  HDRV => { Name => 'HDRVideo', PrintConv => \%noYes }, #3/PH (NC)
256
257
  # HFLG (APP6) - seen: 0
257
258
  HSGT => 'HindsightSettings', #3
@@ -409,6 +410,7 @@ my %noYes = ( N => 'No', Y => 'Yes' );
409
410
  },
410
411
  # TOCK => { Name => 'OutTime', Unknown => 1, ValueConv => '$val/1000' }, #1 (gpmd)
411
412
  TSMP => { Name => 'TotalSamples', Unknown => 1 }, #2 (gpmd)
413
+ TIMO => 'TimeOffset',
412
414
  TYPE => { Name => 'StructureType', Unknown => 1 }, #2 (gpmd,GPMF - eg 'LLLllfFff', fmt c)
413
415
  TZON => { # (GPMF) - seen: 60 (fmt s)
414
416
  Name => 'TimeZone',
@@ -469,7 +471,8 @@ my %noYes = ( N => 'No', Y => 'Yes' );
469
471
  AALP => { Name => 'AudioLevel', Notes => 'dBFS' },
470
472
  GPSA => 'GPSAltitudeSystem', # (eg. 'MSLV')
471
473
  GRAV => { Name => 'GravityVector', Binary => 1 },
472
- HUES => 'PrediminantHue',
474
+ # DISP - Disparity track
475
+ HUES => 'PredominantHue',
473
476
  IORI => { Name => 'ImageOrientation', Binary => 1, Notes => 'quaternions 0-1' },
474
477
  # LRVO - ? Part of LRV Frame Skip
475
478
  # LRVS - ? Part of LRV Frame Skip
@@ -512,11 +512,20 @@ my %sAppInfo = (
512
512
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
513
513
  TAG_PREFIX => 'HDRPlusMakerNote',
514
514
  PROCESS_PROC => \&ProcessHDRP,
515
- VARS => { ID_FMT => 'str' },
515
+ VARS => {
516
+ ID_FMT => 'str',
517
+ SORT_PROC => sub {
518
+ my ($a,$b) = @_;
519
+ $a =~ s/(\d+)/sprintf("%.3d",$1)/eg;
520
+ $b =~ s/(\d+)/sprintf("%.3d",$1)/eg;
521
+ return $a cmp $b;
522
+ },
523
+ },
516
524
  NOTES => q{
517
525
  Google protobuf-format HDR-Plus maker notes. Tag ID's are hierarchical
518
526
  protobuf field numbers. Stored as base64-encoded, encrypted and gzipped
519
- Protobuf data.
527
+ Protobuf data. Much of this metadata is still unknown, but is extracted
528
+ using the Unknown option.
520
529
  },
521
530
  '1-1' => 'ImageName',
522
531
  '1-2' => { Name => 'ImageData', Format => 'undef', Binary => 1 },
@@ -693,8 +702,8 @@ sub ProcessHDRP($$$)
693
702
  my $i = 0;
694
703
  while ($i < @words) {
695
704
  # (messy, but handle all 64-bit arithmetic with 32-bit backward
696
- # compatibility -- no bit operations on any number > 0xffffffff)
697
- # rotate the key
705
+ # compatibility, so no bit operations on any number > 0xffffffff)
706
+ # rotate the key for each new 64-bit word
698
707
  # $key ^= $key >> 12;
699
708
  $lo ^= $lo >> 12 | ($hi & 0xfff) << 20;
700
709
  $hi ^= $hi >> 12;
@@ -715,7 +724,8 @@ sub ProcessHDRP($$$)
715
724
  $c[$j+$k] += $a[$j] * $b[$k];
716
725
  }
717
726
  }
718
- # (we only care about the low 32-bits, so don't bother with the upper 32)
727
+ # (we will only retain the low 64-bits of the key, so
728
+ # don't bother finishing the calculation of the upper bits)
719
729
  for ($j=6; $j>=3; --$j) {
720
730
  while ($c[$j] > 0xffffffff) {
721
731
  ++$c[$j-2];
@@ -726,7 +736,7 @@ sub ProcessHDRP($$$)
726
736
  }
727
737
  $hi = ($c[3] << 16) + $c[4];
728
738
  $lo = ($c[5] << 16) + $c[6];
729
- # apply the xor
739
+ # apply the key to this 64-bit word
730
740
  $words[$i++] ^= $lo;
731
741
  $words[$i++] ^= $hi;
732
742
  }
@@ -18,7 +18,7 @@ use strict;
18
18
  use vars qw($VERSION);
19
19
  use Image::ExifTool qw(:DataAccess :Utils);
20
20
 
21
- $VERSION = '1.63';
21
+ $VERSION = '1.64';
22
22
 
23
23
  sub ProcessID3v2($$$);
24
24
  sub ProcessPrivate($$$);
@@ -79,13 +79,13 @@ my %userTagName = (
79
79
  VARS => { ID_FMT => 'none' },
80
80
  PROCESS_PROC => \&ProcessID3Dir, # (used to process 'id3 ' chunk in WAV files)
81
81
  NOTES => q{
82
- ExifTool extracts ID3 and Lyrics3 information from MP3, MPEG, WAV, AIFF,
83
- OGG, FLAC, APE, MPC and RealAudio files. ID3v2 tags which support multiple
84
- languages (eg. Comment and Lyrics) are extracted by specifying the tag name,
85
- followed by a dash ('-'), then a 3-character ISO 639-2 language code (eg.
86
- "Comment-spa"). See L<https://id3.org/> for the official ID3 specification
87
- and L<http://www.loc.gov/standards/iso639-2/php/code_list.php> for a list of
88
- ISO 639-2 language codes.
82
+ ExifTool extracts ID3 and Lyrics3 information from MP3, MPEG, WAV, WV, AIFF,
83
+ OGG, FLAC, APE, DSF, MPC and RealAudio files. ID3v2 tags which support
84
+ multiple languages (eg. Comment and Lyrics) are extracted by specifying the
85
+ tag name, followed by a dash ('-'), then a 3-character ISO 639-2 language
86
+ code (eg. "Comment-spa"). See L<https://id3.org/> for the official ID3
87
+ specification and L<http://www.loc.gov/standards/iso639-2/php/code_list.php>
88
+ for a list of ISO 639-2 language codes.
89
89
  },
90
90
  ID3v1 => {
91
91
  Name => 'ID3v1',
@@ -1437,6 +1437,7 @@ sub ProcessID3($$)
1437
1437
 
1438
1438
  # allow this to be called with either RAF or DataPt
1439
1439
  my $raf = $$dirInfo{RAF} || File::RandomAccess->new($$dirInfo{DataPt});
1440
+ my $dataPos = $$dirInfo{DataPos} || 0;
1440
1441
  my ($buff, %id3Header, %id3Trailer, $hBuff, $tBuff, $eBuff, $tagTablePtr);
1441
1442
  my $rtnVal = 0;
1442
1443
  my $hdrEnd = 0;
@@ -1486,7 +1487,7 @@ sub ProcessID3($$)
1486
1487
  }
1487
1488
  %id3Header = (
1488
1489
  DataPt => \$hBuff,
1489
- DataPos => $pos,
1490
+ DataPos => $dataPos + $pos,
1490
1491
  DirStart => 0,
1491
1492
  DirLen => length($hBuff),
1492
1493
  Version => $vers,
@@ -1511,7 +1512,7 @@ sub ProcessID3($$)
1511
1512
  $trailSize = 128;
1512
1513
  %id3Trailer = (
1513
1514
  DataPt => \$tBuff,
1514
- DataPos => $raf->Tell() - 128,
1515
+ DataPos => $dataPos + $raf->Tell() - 128,
1515
1516
  DirStart => 0,
1516
1517
  DirLen => length($tBuff),
1517
1518
  );
@@ -32,7 +32,7 @@ use strict;
32
32
  use vars qw($VERSION);
33
33
  use Image::ExifTool qw(:DataAccess :Utils);
34
34
 
35
- $VERSION = '1.30';
35
+ $VERSION = '1.31';
36
36
 
37
37
  # program map table "stream_type" lookup (ref 6/1/9)
38
38
  my %streamType = (
@@ -322,7 +322,7 @@ sub ParsePID($$$$$)
322
322
  if ($$et{OPTIONS}{ExtractEmbedded}) {
323
323
  $more = 1;
324
324
  } elsif (not $$et{OPTIONS}{Validate}) {
325
- $et->Warn('The ExtractEmbedded option may find more tags in the video data',3);
325
+ $et->Warn('The ExtractEmbedded option may find more tags in the video data',7);
326
326
  }
327
327
  } elsif ($type == 0x81 or $type == 0x87 or $type == 0x91) {
328
328
  # AC-3 audio
@@ -557,31 +557,40 @@ sub ProcessM2TS($$)
557
557
  {
558
558
  my ($et, $dirInfo) = @_;
559
559
  my $raf = $$dirInfo{RAF};
560
- my ($buff, $pLen, $j, $fileType, $eof);
560
+ my ($buff, $j, $eof, $pLen, $readSize);
561
561
  my (%pmt, %pidType, %data, %sectLen, %packLen, %fromStart);
562
562
  my ($startTime, $endTime, $fwdTime, $backScan, $maxBack);
563
563
  my $verbose = $et->Options('Verbose');
564
564
  my $out = $et->Options('TextOut');
565
565
 
566
- # read first packet
567
- return 0 unless $raf->Read($buff, 8) == 8;
566
+ # read enough to guarantee 2 sync bytes
567
+ return 0 unless $raf->Read($buff, 383) == 383;
568
568
  # test for magic number (sync byte is the only thing we can safely check)
569
- return 0 unless $buff =~ /^(....)?\x47/s;
570
- unless ($1) {
571
- $pLen = 188; # no timecode
572
- $fileType = 'M2T'; # (just as a way to tell there is no timecode)
573
- } else {
574
- $pLen = 192; # 188-byte transport packet + leading 4-byte timecode (ref 4)
575
- }
576
- my $prePos = $pLen - 188; # byte position of packet prefix
577
- my $readSize = 64 * $pLen; # size of our read buffer
578
- $raf->Seek(0,0); # rewind to start
579
- $raf->Read($buff, $readSize) >= $pLen * 4 or return 0; # require at least 4 packets
580
- # validate the sync byte in the next 3 packets
581
- for ($j=1; $j<4; ++$j) {
582
- return 0 unless substr($buff, $prePos + $pLen * $j, 1) eq 'G'; # (0x47)
569
+ return 0 unless $buff =~ /^(.{0,190}?)\x47(.{187}|.{191})\x47/s;
570
+ my $tcLen = length($2) - 187; # (length of timecode = 0 or 4 bytes)
571
+ my $start = length($1) - $tcLen;
572
+ # we may need to try the validation twice to handle the edge case
573
+ # where the first byte of a timecode is 0x47 and we were fooled
574
+ # into thinking there was no timecode
575
+ Try: for (;;) {
576
+ $start += 192 if $start < 0; # (if all or part of first timecode was missing)
577
+ $pLen = 188 + $tcLen;
578
+ $readSize = 64 * $pLen; # size of our read buffer
579
+ $raf->Seek($start, 0); # rewind to start
580
+ $raf->Read($buff, $readSize) >= $pLen * 4 or return 0; # require at least 4 packets
581
+ # validate the sync byte in the next 3 packets
582
+ for ($j=1; $j<4; ++$j) {
583
+ next if substr($buff, $tcLen + $pLen * $j, 1) eq 'G'; # (0x47)
584
+ return 0 if $tcLen;
585
+ $tcLen = 4;
586
+ $start -= 4;
587
+ next Try;
588
+ }
589
+ last; # success!
583
590
  }
584
- $et->SetFileType($fileType);
591
+ # (use M2T instead of M2TS just as an indicator that there is no timecode)
592
+ $et->SetFileType($tcLen ? 'M2TS' : 'M2T');
593
+ $et->Warn("File doesn't begin with the start of a packet") if $start;
585
594
  SetByteOrder('MM');
586
595
  my $tagTablePtr = GetTagTable('Image::ExifTool::M2TS::Main');
587
596
 
@@ -667,7 +676,7 @@ sub ProcessM2TS($$)
667
676
  }
668
677
  $pEnd += $pLen;
669
678
  # decode the packet prefix
670
- $pos += $prePos;
679
+ $pos += $tcLen;
671
680
  my $prefix = unpack("x${pos}N", $buff); # (use unpack instead of Get32u for speed)
672
681
  # validate sync byte
673
682
  unless (($prefix & 0xff000000) == 0x47000000) {
@@ -685,9 +694,9 @@ sub ProcessM2TS($$)
685
694
  if ($verbose > 1) {
686
695
  my $i = ($raf->Tell() - length($buff) + $pEnd) / $pLen - 1;
687
696
  print $out "Transport packet $i:\n";
688
- $et->VerboseDump(\$buff, Len => $pLen, Addr => $i * $pLen, Start => $pos - $prePos);
697
+ $et->VerboseDump(\$buff, Len => $pLen, Addr => $i * $pLen, Start => $pos - $tcLen);
689
698
  my $str = $pidName{$pid} ? " ($pidName{$pid})" : ' <not in Program Map Table!>';
690
- printf $out " Timecode: 0x%.4x\n", Get32u(\$buff, $pos - $prePos) if $pLen == 192;
699
+ printf $out " Timecode: 0x%.4x\n", Get32u(\$buff, $pos - $tcLen) if $pLen == 192;
691
700
  printf $out " Packet ID: 0x%.4x$str\n", $pid;
692
701
  printf $out " Start Flag: %s\n", $payload_unit_start_indicator ? 'Yes' : 'No';
693
702
  }
@@ -172,7 +172,7 @@ strings.
172
172
  hp_C homeopathic potency of centesimal series (homeopathic potency)
173
173
  hp_X homeopathic potency of decimal series (homeopathic potency)
174
174
  HPF high power field (view area in microscope)
175
- Hz Herz (frequency)
175
+ Hz Hertz (frequency)
176
176
  in inch, international (length)
177
177
  in_br inch, British (length)
178
178
  in_us inch, U.S. (length)
@@ -984,7 +984,9 @@ sub SetGPSDateTime($$$;$)
984
984
  }
985
985
  $sampleTime -= $tzOff; # shift from local time to UTC
986
986
  }
987
+ $$et{SET_GROUP0} = 'Composite';
987
988
  $et->HandleTag($tagTbl, GPSDateTime => Image::ExifTool::ConvertUnixTime($sampleTime,0,3) . 'Z');
989
+ delete $$et{SET_GROUP0};
988
990
  }
989
991
  }
990
992
 
@@ -34,7 +34,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
34
34
  use Image::ExifTool::Exif;
35
35
  use Image::ExifTool::Minolta;
36
36
 
37
- $VERSION = '3.77';
37
+ $VERSION = '3.78';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -319,10 +319,10 @@ sub PrintInvLensSpec($;$$);
319
319
  50549 => 'Sigma 50mm F1.2 DG DN | A', #JR (024)
320
320
  50550 => 'Sigma 28-105mm F2.8 DG DN | A', #JR (024)
321
321
  50551 => 'Sigma 28-45mm F1.8 DG DN | A', #JR (024)
322
- 50552 => 'Sigma 35mm F1.2 DG II | A', #github352/JR (025)',
322
+ 50552 => 'Sigma 35mm F1.2 DG II | A', #github352/JR (025)
323
323
  50553 => 'Sigma 300-600mm F4 DG OS | S', #JR (025)
324
324
  50554 => 'Sigma 16-300mm F3.5-6.7 DC OS | C', #JR (025)
325
- 50555 => 'Sigma 12mm F1.4 DC | C', # (025)
325
+ 50555 => 'Sigma 12mm F1.4 DC | C', #JR (025)
326
326
  50556 => 'Sigma 17-40mm F1.8 DC | A', #JR/github352 (025)
327
327
  50557 => 'Sigma 200mm F2 DG OS | S', #github352/JR (025)
328
328
  50558 => 'Sigma 20-200mm F3.5-6.3 DG | C', #github352/JR (025)
@@ -1135,7 +1135,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1135
1135
  SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010h' },
1136
1136
  },{
1137
1137
  Name => 'Tag2010i', # ?
1138
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7C|7M3|7RM3A?|7RM4A?|9|9M2)|DSC-(RX10M4|RX100M6|RX100M5A|RX100M7|HX95|HX99|RX0M2)|ZV-(1F?|1M2|E10))\b/',
1138
+ Condition => '$$self{Model} =~ /^(ILCE-(6100A?|6400A?|6600|7C|7M3|7RM3A?|7RM4A?|9|9M2)|DSC-(RX10M4|RX100M6|RX100M5A|RX100M7|HX95|HX99|RX0M2)|ZV-(1F?|1M2|E10))\b/',
1139
1139
  SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010i' },
1140
1140
  },{
1141
1141
  Name => 'Tag_0x2010',
@@ -1752,7 +1752,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1752
1752
  },
1753
1753
  },{
1754
1754
  Name => 'Tag9050b',
1755
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6300|6400|6500|6600|7C|7M3|7RM2|7RM3A?|7RM4A?|7SM2|9|9M2)|ILCA-99M2|ZV-E10)\b/',
1755
+ Condition => '$$self{Model} =~ /^(ILCE-(6100A?|6300|6400A?|6500|6600|7C|7M3|7RM2|7RM3A?|7RM4A?|7SM2|9|9M2)|ILCA-99M2|ZV-E10)\b/',
1756
1756
  SubDirectory => {
1757
1757
  TagTable => 'Image::ExifTool::Sony::Tag9050b',
1758
1758
  ByteOrder => 'LittleEndian',
@@ -8022,7 +8022,7 @@ my %isoSetting2010 = (
8022
8022
  #
8023
8023
  0x019f => {
8024
8024
  Name => 'ShutterCount3',
8025
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7C|7M3|7RM3A?|7RM4A?|9|9M2)|ZV-E10)\b/',
8025
+ Condition => '$$self{Model} =~ /^(ILCE-(6100A?|6400A?|6600|7C|7M3|7RM3A?|7RM4A?|9|9M2)|ZV-E10)\b/',
8026
8026
  Format => 'int32u',
8027
8027
  RawConv => '$val == 0 ? undef : $val',
8028
8028
  },
@@ -8069,7 +8069,7 @@ my %isoSetting2010 = (
8069
8069
  },
8070
8070
  0x01f0 => {
8071
8071
  Name => 'LensSpecFeatures',
8072
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7M3|7RM3A?|9))\b/ and $$self{Software} !~ /^ILCE-9 (v5.0|v6.0)/',
8072
+ Condition => '$$self{Model} =~ /^(ILCE-(6100A?|6400A?|6600|7M3|7RM3A?|9))\b/ and $$self{Software} !~ /^ILCE-9 (v5.0|v6.0)/',
8073
8073
  Priority => 0,
8074
8074
  Format => 'undef[2]',
8075
8075
  ValueConv => 'join " ", unpack "H2H2", $val',
@@ -8401,6 +8401,7 @@ my %tagExists = (
8401
8401
  'bytes' => 1,
8402
8402
  'bytesperline' => 1,
8403
8403
  'bytesperminute' => 1,
8404
+ 'bytespersample' => 1,
8404
8405
  'c2pa' => 1,
8405
8406
  'c2pasalthash' => 1,
8406
8407
  'cachecontrol' => 1,
@@ -8633,10 +8634,12 @@ my %tagExists = (
8633
8634
  'channelcolordata' => 1,
8634
8635
  'channelcolorindicates' => 1,
8635
8636
  'channelcolorspace' => 1,
8637
+ 'channelcount' => 1,
8636
8638
  'channelmode' => 1,
8637
8639
  'channelnumber' => 1,
8638
8640
  'channelopacity' => 1,
8639
8641
  'channeloptions' => 1,
8642
+ 'channeltype' => 1,
8640
8643
  'channelusage' => 1,
8641
8644
  'chapter' => 1,
8642
8645
  'chaptercount' => 1,
@@ -9083,6 +9086,7 @@ my %tagExists = (
9083
9086
  'datacreatedate' => 1,
9084
9087
  'datadump' => 1,
9085
9088
  'datadump2' => 1,
9089
+ 'dataformat' => 1,
9086
9090
  'datainfo' => 1,
9087
9091
  'datakey' => 1,
9088
9092
  'datalen' => 1,
@@ -9792,6 +9796,7 @@ my %tagExists = (
9792
9796
  'footnotes' => 1,
9793
9797
  'forcedsubtitletrack' => 1,
9794
9798
  'form' => 1,
9799
+ 'formatid' => 1,
9795
9800
  'formatsdcard' => 1,
9796
9801
  'formattag' => 1,
9797
9802
  'formatter' => 1,
@@ -10112,6 +10117,7 @@ my %tagExists = (
10112
10117
  'headerversion' => 1,
10113
10118
  'headingpairs' => 1,
10114
10119
  'headshrinking' => 1,
10120
+ 'healthlogs' => 1,
10115
10121
  'heightresolution' => 1,
10116
10122
  'hevcconfiguration' => 1,
10117
10123
  'hevcconfigurationversion' => 1,
@@ -11743,7 +11749,7 @@ my %tagExists = (
11743
11749
  'postscriptfontname' => 1,
11744
11750
  'powerprofile' => 1,
11745
11751
  'pragma' => 1,
11746
- 'prediminanthue' => 1,
11752
+ 'predominanthue' => 1,
11747
11753
  'preferredfamily' => 1,
11748
11754
  'preferredrate' => 1,
11749
11755
  'preferredsubfamily' => 1,
@@ -12239,6 +12245,7 @@ my %tagExists = (
12239
12245
  's2n' => 1,
12240
12246
  'sample' => 1,
12241
12247
  'sampleblacksequence' => 1,
12248
+ 'samplecount' => 1,
12242
12249
  'sampledatetime' => 1,
12243
12250
  'sampledegradationpriority' => 1,
12244
12251
  'sampleduration' => 1,