exiftool-vendored.pl 13.26.0 → 13.30.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.
Files changed (40) hide show
  1. package/README.md +9 -2
  2. package/bin/Changes +64 -1
  3. package/bin/META.json +3 -2
  4. package/bin/META.yml +3 -2
  5. package/bin/README +2 -2
  6. package/bin/arg_files/exif2xmp.args +2 -1
  7. package/bin/arg_files/xmp2exif.args +2 -1
  8. package/bin/config_files/pix4d.config +9 -8
  9. package/bin/exiftool +21 -16
  10. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +1 -1
  11. package/bin/lib/Image/ExifTool/Canon.pm +4 -2
  12. package/bin/lib/Image/ExifTool/Exif.pm +3 -1
  13. package/bin/lib/Image/ExifTool/FujiFilm.pm +2 -1
  14. package/bin/lib/Image/ExifTool/GIMP.pm +1 -1
  15. package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  16. package/bin/lib/Image/ExifTool/JPEG.pm +20 -8
  17. package/bin/lib/Image/ExifTool/LigoGPS.pm +16 -2
  18. package/bin/lib/Image/ExifTool/MPF.pm +5 -1
  19. package/bin/lib/Image/ExifTool/MakerNotes.pm +3 -3
  20. package/bin/lib/Image/ExifTool/Olympus.pm +6 -2
  21. package/bin/lib/Image/ExifTool/Panasonic.pm +9 -1
  22. package/bin/lib/Image/ExifTool/Parrot.pm +54 -7
  23. package/bin/lib/Image/ExifTool/Pentax.pm +151 -11
  24. package/bin/lib/Image/ExifTool/Plot.pm +36 -15
  25. package/bin/lib/Image/ExifTool/QuickTime.pm +73 -6
  26. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +80 -14
  27. package/bin/lib/Image/ExifTool/README +12 -2
  28. package/bin/lib/Image/ExifTool/Sigma.pm +12 -4
  29. package/bin/lib/Image/ExifTool/Sony.pm +8 -3
  30. package/bin/lib/Image/ExifTool/TagLookup.pm +3745 -3729
  31. package/bin/lib/Image/ExifTool/TagNames.pod +147 -89
  32. package/bin/lib/Image/ExifTool/WriteExif.pl +2 -0
  33. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +3 -0
  34. package/bin/lib/Image/ExifTool/Writer.pl +18 -7
  35. package/bin/lib/Image/ExifTool/XMP.pm +2 -2
  36. package/bin/lib/Image/ExifTool.pm +12 -7
  37. package/bin/lib/Image/ExifTool.pod +11 -11
  38. package/bin/perl-Image-ExifTool.spec +1 -1
  39. package/bin/windows_exiftool.txt +15 -9
  40. package/package.json +12 -9
@@ -111,9 +111,8 @@ my %insvLimit = (
111
111
  The tags below are extracted from timed metadata in QuickTime and other
112
112
  formats of video files when the ExtractEmbedded option is used. Although
113
113
  most of these tags are combined into the single table below, ExifTool
114
- currently reads 103 different types of timed GPS metadata from video files.
114
+ currently reads 107 different types of timed GPS metadata from video files.
115
115
  },
116
- VARS => { NO_ID => 1 },
117
116
  GPSLatitude => { PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")', RawConv => '$$self{FoundGPSLatitude} = 1; $val' },
118
117
  GPSLongitude => { PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")' },
119
118
  GPSLatitude2 => { PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")' },
@@ -318,7 +317,7 @@ my %insvLimit = (
318
317
  ByteOrder => 'Little-Endian',
319
318
  },
320
319
  }],
321
- mett => { # Parrot drones
320
+ mett => { # Parrot drones and iPhone/Android using ARCore
322
321
  Name => 'mett',
323
322
  SubDirectory => { TagTable => 'Image::ExifTool::Parrot::mett' },
324
323
  },
@@ -336,11 +335,25 @@ my %insvLimit = (
336
335
  Groups => { 0 => 'Trailer', 1 => 'Insta360' }, # (so these groups will appear in the -listg options)
337
336
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::INSV_MakerNotes' },
338
337
  },
339
- ssmd => { # Chigee AIO-5 dashcam
340
- Name => 'PreviewImage',
338
+ ssmd => [{
339
+ Name => 'RoveGPS', # Rove R2-4K new model
340
+ # double value of GPSLatitude is 4294967295 (00 00 e0 ff ff ff ef 41) for no GPS
341
+ Condition => 'length $$valPt == 32 and $$valPt !~ /^\0\0\xe0\xff\xff\xff\xef\x41/',
342
+ SubDirectory => {
343
+ TagTable => 'Image::ExifTool::QuickTime::RoveGPS',
344
+ ByteOrder => 'Little-Endian',
345
+ },
346
+ },{
347
+ Name => 'Accelerometer', # Rove R2-4K new model
348
+ Condition => 'length $$valPt == 12',
349
+ Format => 'float',
350
+ ByteOrder => 'Little-Endian',
351
+ },{
352
+ Name => 'PreviewImage', # Chigee AIO-5 dashcam
353
+ Condition => '$$valPt =~ /^\xff\xd8\xff/',
341
354
  Groups => { 2 => 'Preview' },
342
355
  RawConv => '$self->ValidateImage(\$val,$tag)',
343
- },
356
+ }],
344
357
  djmd => { # (DJI AC003 Osmo Action 4 cam)
345
358
  Name => 'DJIMetadata',
346
359
  SubDirectory => { TagTable => 'Image::ExifTool::DJI::Protobuf' },
@@ -358,6 +371,45 @@ my %insvLimit = (
358
371
  MagneticVariation => { }, # (from LIGOGPSINFO)
359
372
  );
360
373
 
374
+ # accelerometer from newer Rove R2-4K cam
375
+ %Image::ExifTool::QuickTime::RoveGPS = (
376
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
377
+ GROUPS => { 2 => 'Location' },
378
+ FIRST_ENTRY => 0,
379
+ 0 => {
380
+ Name => 'GPSLatitude',
381
+ Format => 'double',
382
+ ValueConv => 'my $deg = int($val/100); $val = $deg + ($val - $deg * 100) / 60',
383
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
384
+ },
385
+ 8 => {
386
+ Name => 'GPSLongitude',
387
+ Format => 'double',
388
+ ValueConv => 'my $deg = int($val/100); $val = $deg + ($val - $deg * 100) / 60',
389
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
390
+ },
391
+ 20 => {
392
+ Name => 'GPSSpeed',
393
+ Format => 'int16u',
394
+ ValueConv => '$val * 1.852', # convert from knots to km/h
395
+ },
396
+ 22 => {
397
+ Name => 'GPSDateTime',
398
+ Description => 'GPS Date/Time',
399
+ Groups => { 2 => 'Time' },
400
+ Format => 'int8u[6]',
401
+ ValueConv => q{
402
+ my @v = split ' ', $val;
403
+ $v[0] += 2000;
404
+ sprintf('%.4d:%.2d:%.2d %.2d:%.2d:%.2d', @v);
405
+ },
406
+ PrintConv => '$self->ConvertDateTime($val)',
407
+ },
408
+ # Seen this in the next 4 bytes:
409
+ # ff 01 01 00 - good GPS?
410
+ # ff 00 ff ff - no GPS?
411
+ );
412
+
361
413
  # tags found in 'camm' type 0 timed metadata (ref 4)
362
414
  %Image::ExifTool::QuickTime::camm0 = (
363
415
  PROCESS_PROC => \&ProcessCAMM,
@@ -2235,6 +2287,16 @@ ATCRec: for ($recPos = 0x30; $recPos + 52 < $dirLen; $recPos += 52) {
2235
2287
  $lat = ($lat - 187.982162849635) / 3;
2236
2288
  $lon = ($lon - 2199.19873715495) / 2;
2237
2289
  $ddd = 1;
2290
+ } elsif (Get32u($dataPt,0) == 0x400000 and abs($lat) <= 90 and abs($lon) <= 180) {
2291
+ # Transcend Drive Body Camera 70
2292
+ # 0000: 00 00 40 00 66 72 65 65 47 50 53 20 4c 00 00 00 [..@.freeGPS L...]
2293
+ # 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
2294
+ # 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
2295
+ # 0030: 09 00 00 00 26 00 00 00 15 00 00 00 e9 07 00 00 [....&...........]
2296
+ # 0040: 05 00 00 00 10 00 00 00 41 53 45 00 6c 59 ee 41 [........ASE.lY.A]
2297
+ # 0050: 9f 1a f7 41 3c 6b 0f 41 9a 99 99 43 00 00 00 00 [...A<k.A...C....]
2298
+ $ddd = 1; # already in decimal degrees
2299
+ $spd /= $knotsToKph; # already in km/h
2238
2300
  } else {
2239
2301
  $debug and $et->FoundTag(GPSType => 17);
2240
2302
  }
@@ -2351,12 +2413,12 @@ ATCRec: for ($recPos = 0x30; $recPos + 52 < $dirLen; $recPos += 52) {
2351
2413
  }
2352
2414
  SetByteOrder($oldOrder);
2353
2415
  return $$et{DOC_NUM} ? 1 : 0 if $done;
2354
- return 0 if defined $yr and $mon < 1 or $mon > 12; # quick sanity check
2416
+ return 0 if defined $yr and ($mon < 1 or $mon > 12); # quick sanity check
2355
2417
  #
2356
2418
  # save tag values extracted by above code
2357
2419
  #
2358
2420
  FoundSomething($et, $tagTbl, $$dirInfo{SampleTime}, $$dirInfo{SampleDuration});
2359
- $sec = '0' . $sec unless $sec =~ /^\d{2}/; # pad integer part of seconds to 2 digits
2421
+ $sec = '0' . $sec if defined $sec and $sec !~ /^\d{2}/; # pad integer part of seconds to 2 digits
2360
2422
  if (defined $yr) {
2361
2423
  $yr += 2000 if $yr < 2000;
2362
2424
  my $time = sprintf('%.4d:%.2d:%.2d %.2d:%.2d:%sZ',$yr,$mon,$day,$hr,$min,$sec);
@@ -2368,8 +2430,8 @@ ATCRec: for ($recPos = 0x30; $recPos + 52 < $dirLen; $recPos += 52) {
2368
2430
  if (defined $lat and defined $lon) {
2369
2431
  # lat/long are in DDDMM.MMMM format unless $ddd is set
2370
2432
  ConvertLatLon($lat, $lon) unless $ddd;
2371
- $et->HandleTag($tagTbl, GPSLatitude => $lat * ($latRef eq 'S' ? -1 : 1));
2372
- $et->HandleTag($tagTbl, GPSLongitude => $lon * ($lonRef eq 'W' ? -1 : 1));
2433
+ $et->HandleTag($tagTbl, GPSLatitude => $lat * (($latRef and $latRef eq 'S') ? -1 : 1));
2434
+ $et->HandleTag($tagTbl, GPSLongitude => $lon * (($lonRef and $lonRef eq 'W') ? -1 : 1));
2373
2435
  }
2374
2436
  $et->HandleTag($tagTbl, GPSAltitude => $alt) if defined $alt;
2375
2437
  $et->HandleTag($tagTbl, GPSSpeed => $spd) if defined $spd;
@@ -3148,8 +3210,9 @@ sub ProcessTTAD($$$)
3148
3210
  }
3149
3211
 
3150
3212
  #------------------------------------------------------------------------------
3151
- # Extract information from Insta360 trailer (INSV and INSP files) (ref PH)
3213
+ # Extract information from Insta360 trailer (INSV, INSP and MP4 files) or 'inst' box (ref PH)
3152
3214
  # Inputs: 0) ExifTool ref, 1) Optional dirInfo ref for returning trailer info
3215
+ # (dirInfo has Offset from end of trailer to end of file or DirEnd absolute end of trailer)
3153
3216
  # Returns: true on success
3154
3217
  # Notes: There looks to be some useful information by telemetry-parser, but
3155
3218
  # the code is cryptic: https://github.com/AdrianEddy/telemetry-parser
@@ -3161,13 +3224,16 @@ sub ProcessInsta360($;$)
3161
3224
  my $offset = $dirInfo ? $$dirInfo{Offset} || 0 : 0;
3162
3225
  my ($buff, $dirTable, $dirTablePos);
3163
3226
 
3227
+ if ($dirInfo and $$dirInfo{DirEnd}) {
3228
+ $raf->Seek(0, 2);
3229
+ $offset = $raf->Tell() - $$dirInfo{DirEnd};
3230
+ }
3164
3231
  return 0 unless $raf->Seek(-78-$offset, 2) and $raf->Read($buff, 78) == 78 and
3165
3232
  substr($buff,-32) eq "8db42d694ccc418790edff439fe026bf"; # check magic number
3166
3233
 
3167
3234
  my $verbose = $et->Options('Verbose');
3168
3235
  my $tagTbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
3169
- my $fileEnd = $raf->Tell();
3170
- my $trailEnd = $fileEnd - $offset;
3236
+ my $trailEnd = $raf->Tell();
3171
3237
  my $trailerLen = unpack('x38V', $buff);
3172
3238
  $trailerLen > $trailEnd and $et->Warn('Bad Insta360 trailer size'), return 0;
3173
3239
  if ($dirInfo) {
@@ -3207,7 +3273,7 @@ sub ProcessInsta360($;$)
3207
3273
  ($epos -= $len) + $trailerLen < 0 and last;
3208
3274
  $raf->Seek($epos-$offset, 2) or last;
3209
3275
  if ($verbose) {
3210
- $et->VPrint(0, sprintf("Insta360 Record 0x%x (offset 0x%x, %d bytes):\n", $id, $fileEnd + $epos, $len));
3276
+ $et->VPrint(0, sprintf("Insta360 Record 0x%x (offset 0x%x, %d bytes):\n", $id, $trailEnd + $epos, $len));
3211
3277
  }
3212
3278
  # there are 2 types of record 0x300:
3213
3279
  # 1. 56 byte records
@@ -982,6 +982,16 @@ numerical, and generated automatically otherwise.
982
982
  for use when ExtractInfo is called with the ReEntry flag from
983
983
  inside the RawConv of a tag.
984
984
 
985
+ ByteOrder : [Non-writable tags extracted with HandleTag and writable EXIF
986
+ offset-pair tags only] Specifies byte order if tag value is
987
+ stored with a constant byte order that is different from that
988
+ of the parent directory.
989
+
990
+ DontRead : [QuickTime tags with compatible SubDirectory entries only]
991
+ Avoid reading subdirectory data from file. Instead, pass RAF
992
+ reference (with current position at start of directory) and
993
+ DirEnd.
994
+
985
995
  TagID : [reserved] Used internally to save the table key for this tag.
986
996
  Note: For XMP tables this corresponds to the XMP property
987
997
  name, but the table key may have a full XMP namespace prefix
@@ -1071,8 +1081,8 @@ numerical, and generated automatically otherwise.
1071
1081
  ByteOrder : Specifies byte ordering if different than than the rest of the
1072
1082
  file. Must be either BigEndian, LittleEndian or Unknown. If
1073
1083
  Unknown is specified, the byte order will be determined from
1074
- the directory count (however, this can not be done if OffsetPt
1075
- is specified).
1084
+ the directory count for EXIF (however, this can not be done if
1085
+ OffsetPt is specified).
1076
1086
 
1077
1087
  Validate : If given, specifies Perl expression which is used to validate
1078
1088
  the subdirectory data (regardless of Validate option setting).
@@ -19,7 +19,7 @@ use strict;
19
19
  use vars qw($VERSION %sigmaLensTypes);
20
20
  use Image::ExifTool::Exif;
21
21
 
22
- $VERSION = '1.34';
22
+ $VERSION = '1.35';
23
23
 
24
24
  # sigma LensType lookup (ref IB)
25
25
  %sigmaLensTypes = (
@@ -412,7 +412,12 @@ $VERSION = '1.34';
412
412
  Name => 'Software',
413
413
  Priority => 0,
414
414
  },
415
- 0x0019 => 'AutoBracket',
415
+ 0x0019 => {
416
+ Name => 'AutoBracket',
417
+ # (some models don't have spaces around "of")
418
+ PrintConv => '$val =~ s/(\d)of(\d)/$1 of $2/; $val',
419
+ PrintConvInv => '$val',
420
+ },
416
421
  0x001a => [ #PH
417
422
  {
418
423
  Name => 'PreviewImageStart',
@@ -641,8 +646,11 @@ $VERSION = '1.34';
641
646
  },
642
647
  0x0033 => { #PH
643
648
  Name => 'ExposureTime2',
644
- Condition => '$$self{Model} !~ / (SD1|SD9|SD15|Merrill|Quattro|fp)$/',
645
- Notes => 'models other than the SD1, SD9, SD15 and Merrill/Quattro models',
649
+ Condition => q{
650
+ $$self{Model} !~ / (SD1|SD9|SD15|Merrill|Quattro|fp)$/ and
651
+ $$self{MakerNoteSigmaVer} < 4
652
+ },
653
+ Notes => 'only valid for some models',
646
654
  ValueConv => '$val * 1e-6',
647
655
  ValueConvInv => 'int($val * 1e6 + 0.5)',
648
656
  PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
@@ -10604,7 +10604,7 @@ my %isoSetting2010 = (
10604
10604
  0x800b => { Name => 'Sony_rtmd_0x800b', Format => 'int16u', %hidUnk }, # (ZoomRingPosition?, forum14315)
10605
10605
  # 0x8100 - 16 bytes starting with 0x060e2b340401
10606
10606
  0x8100 => { Name => 'Sony_rtmd_0x8100', Format => 'int8u', %hidUnk },
10607
- 0x8101 => { Name => 'Sony_rtmd_0x8101', Format => 'int8u', %hidUnk }, # seen: 0,1
10607
+ 0x8101 => { Name => 'Sony_rtmd_0x8101', Format => 'int8u', %hidUnk }, # seen: 0,1,2
10608
10608
  0x8104 => { Name => 'Sony_rtmd_0x8104', Format => 'int16u', %hidUnk }, # seen: 35616
10609
10609
  0x8105 => { Name => 'Sony_rtmd_0x8105', Format => 'int16u', %hidUnk }, # seen: 20092
10610
10610
  0x8106 => { Name => 'Sony_rtmd_0x8106', Format => 'int32u', %hidUnk }, # seen: "25 1","24000 1001" frame rate?
@@ -10625,7 +10625,7 @@ my %isoSetting2010 = (
10625
10625
  Format => 'int16u',
10626
10626
  },
10627
10627
  0x810d => { Name => 'Sony_rtmd_0x810d', Format => 'int8u', %hidUnk }, # seen: 0,1
10628
- 0x8115 => { Name => 'Sony_rtmd_0x8115', Format => 'int16u', %hidUnk }, # seen: 100
10628
+ 0x8115 => { Name => 'Sony_rtmd_0x8115', Format => 'int16u', %hidUnk }, # seen: 100 - ISO
10629
10629
  # 0x8300 - container for other tags in this format
10630
10630
  0x8500 => {
10631
10631
  Name => 'GPSVersionID',
@@ -10703,7 +10703,7 @@ my %isoSetting2010 = (
10703
10703
  },
10704
10704
  0xe000 => { Name => 'Sony_rtmd_0xe000', Format => 'int8u', %hidUnk }, # (16 bytes)
10705
10705
  0xe300 => { Name => 'Sony_rtmd_0xe300', Format => 'int8u', %hidUnk }, # seen: 0,1
10706
- 0xe301 => { Name => 'Sony_rtmd_0xe301', Format => 'int32u', %hidUnk }, # seen: 100,1600,12800
10706
+ 0xe301 => { Name => 'Sony_rtmd_0xe301', Format => 'int32u', %hidUnk }, # seen: 100,1600,12800 - ISO
10707
10707
  0xe302 => { Name => 'Sony_rtmd_0xe302', Format => 'int8u', %hidUnk }, # seen: 1
10708
10708
  0xe303 => { #forum12218
10709
10709
  Name => 'WhiteBalance',
@@ -10766,6 +10766,11 @@ my %isoSetting2010 = (
10766
10766
  0 => 'Sony:FocusPosition2',
10767
10767
  1 => 'FocalLengthIn35mmFormat',
10768
10768
  },
10769
+ # (NOTE: This calculation may be wrong. "Focus Distance 2 is the result of an erroneous
10770
+ # user supplied formula to exiftool. It does use data embedded in the raw file,
10771
+ # but it is not the data. The actual embedded data seems to be proportional to
10772
+ # magnification not a focus distance. The camera needs to calculate magnification
10773
+ # for translation stabilization.", ref https://www.fredmiranda.com/forum/topic/1858744/0)
10769
10774
  ValueConv => q{
10770
10775
  return undef unless $val;
10771
10776
  return 'inf' if $val >= 255;