exiftool_vendored 12.12.0 → 12.17.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 (196) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +73 -3
  3. data/bin/MANIFEST +3 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +3 -3
  7. data/bin/exiftool +87 -57
  8. data/bin/lib/File/RandomAccess.pm +1 -1
  9. data/bin/lib/File/RandomAccess.pod +2 -2
  10. data/bin/lib/Image/ExifTool.pm +36 -3
  11. data/bin/lib/Image/ExifTool.pod +12 -8
  12. data/bin/lib/Image/ExifTool/AES.pm +1 -1
  13. data/bin/lib/Image/ExifTool/AFCP.pm +1 -1
  14. data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
  15. data/bin/lib/Image/ExifTool/APE.pm +1 -1
  16. data/bin/lib/Image/ExifTool/APP12.pm +1 -1
  17. data/bin/lib/Image/ExifTool/ASF.pm +1 -1
  18. data/bin/lib/Image/ExifTool/Apple.pm +1 -1
  19. data/bin/lib/Image/ExifTool/Audible.pm +1 -1
  20. data/bin/lib/Image/ExifTool/BMP.pm +1 -1
  21. data/bin/lib/Image/ExifTool/BPG.pm +1 -1
  22. data/bin/lib/Image/ExifTool/BZZ.pm +1 -1
  23. data/bin/lib/Image/ExifTool/BigTIFF.pm +1 -1
  24. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +14 -7
  25. data/bin/lib/Image/ExifTool/Canon.pm +3 -2
  26. data/bin/lib/Image/ExifTool/CanonCustom.pm +20 -2
  27. data/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  28. data/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
  29. data/bin/lib/Image/ExifTool/CaptureOne.pm +1 -1
  30. data/bin/lib/Image/ExifTool/Casio.pm +1 -1
  31. data/bin/lib/Image/ExifTool/Charset.pm +1 -1
  32. data/bin/lib/Image/ExifTool/DICOM.pm +1 -1
  33. data/bin/lib/Image/ExifTool/DJI.pm +28 -2
  34. data/bin/lib/Image/ExifTool/DNG.pm +1 -1
  35. data/bin/lib/Image/ExifTool/DPX.pm +4 -4
  36. data/bin/lib/Image/ExifTool/DV.pm +1 -1
  37. data/bin/lib/Image/ExifTool/DarwinCore.pm +1 -1
  38. data/bin/lib/Image/ExifTool/DjVu.pm +1 -1
  39. data/bin/lib/Image/ExifTool/EXE.pm +1 -1
  40. data/bin/lib/Image/ExifTool/Exif.pm +45 -16
  41. data/bin/lib/Image/ExifTool/FITS.pm +1 -1
  42. data/bin/lib/Image/ExifTool/FLAC.pm +1 -1
  43. data/bin/lib/Image/ExifTool/FLIF.pm +1 -1
  44. data/bin/lib/Image/ExifTool/FLIR.pm +1 -1
  45. data/bin/lib/Image/ExifTool/Fixup.pm +1 -1
  46. data/bin/lib/Image/ExifTool/Flash.pm +1 -1
  47. data/bin/lib/Image/ExifTool/FlashPix.pm +1 -1
  48. data/bin/lib/Image/ExifTool/Font.pm +1 -1
  49. data/bin/lib/Image/ExifTool/FotoStation.pm +1 -1
  50. data/bin/lib/Image/ExifTool/FujiFilm.pm +3 -2
  51. data/bin/lib/Image/ExifTool/GE.pm +1 -1
  52. data/bin/lib/Image/ExifTool/GIF.pm +1 -1
  53. data/bin/lib/Image/ExifTool/GIMP.pm +1 -1
  54. data/bin/lib/Image/ExifTool/GPS.pm +6 -6
  55. data/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
  56. data/bin/lib/Image/ExifTool/Geotag.pm +1 -1
  57. data/bin/lib/Image/ExifTool/GoPro.pm +1 -1
  58. data/bin/lib/Image/ExifTool/H264.pm +21 -6
  59. data/bin/lib/Image/ExifTool/HP.pm +1 -1
  60. data/bin/lib/Image/ExifTool/HTML.pm +1 -1
  61. data/bin/lib/Image/ExifTool/HtmlDump.pm +1 -1
  62. data/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
  63. data/bin/lib/Image/ExifTool/ID3.pm +1 -1
  64. data/bin/lib/Image/ExifTool/IPTC.pm +1 -1
  65. data/bin/lib/Image/ExifTool/ISO.pm +1 -1
  66. data/bin/lib/Image/ExifTool/ITC.pm +1 -1
  67. data/bin/lib/Image/ExifTool/Import.pm +1 -1
  68. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  69. data/bin/lib/Image/ExifTool/JPEG.pm +24 -2
  70. data/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  71. data/bin/lib/Image/ExifTool/JSON.pm +1 -1
  72. data/bin/lib/Image/ExifTool/JVC.pm +1 -1
  73. data/bin/lib/Image/ExifTool/Jpeg2000.pm +9 -4
  74. data/bin/lib/Image/ExifTool/Kodak.pm +1 -1
  75. data/bin/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  76. data/bin/lib/Image/ExifTool/LNK.pm +1 -1
  77. data/bin/lib/Image/ExifTool/Lang/cs.pm +1 -1
  78. data/bin/lib/Image/ExifTool/Lang/de.pm +1 -1
  79. data/bin/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
  80. data/bin/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
  81. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  82. data/bin/lib/Image/ExifTool/Lang/fi.pm +1 -1
  83. data/bin/lib/Image/ExifTool/Lang/fr.pm +1 -1
  84. data/bin/lib/Image/ExifTool/Lang/it.pm +1 -1
  85. data/bin/lib/Image/ExifTool/Lang/ja.pm +1 -1
  86. data/bin/lib/Image/ExifTool/Lang/ko.pm +1 -1
  87. data/bin/lib/Image/ExifTool/Lang/nl.pm +1 -1
  88. data/bin/lib/Image/ExifTool/Lang/pl.pm +1 -1
  89. data/bin/lib/Image/ExifTool/Lang/ru.pm +1 -1
  90. data/bin/lib/Image/ExifTool/Lang/sv.pm +1 -1
  91. data/bin/lib/Image/ExifTool/Lang/tr.pm +1 -1
  92. data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  93. data/bin/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  94. data/bin/lib/Image/ExifTool/Leaf.pm +1 -1
  95. data/bin/lib/Image/ExifTool/Lytro.pm +1 -1
  96. data/bin/lib/Image/ExifTool/M2TS.pm +1 -1
  97. data/bin/lib/Image/ExifTool/MIE.pm +1 -1
  98. data/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
  99. data/bin/lib/Image/ExifTool/MIFF.pm +1 -1
  100. data/bin/lib/Image/ExifTool/MNG.pm +1 -1
  101. data/bin/lib/Image/ExifTool/MOI.pm +1 -1
  102. data/bin/lib/Image/ExifTool/MPC.pm +1 -1
  103. data/bin/lib/Image/ExifTool/MPEG.pm +1 -1
  104. data/bin/lib/Image/ExifTool/MPF.pm +1 -1
  105. data/bin/lib/Image/ExifTool/MWG.pm +1 -1
  106. data/bin/lib/Image/ExifTool/MXF.pm +1 -1
  107. data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
  108. data/bin/lib/Image/ExifTool/MakerNotes.pm +1 -1
  109. data/bin/lib/Image/ExifTool/Matroska.pm +1 -1
  110. data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
  111. data/bin/lib/Image/ExifTool/Minolta.pm +1 -1
  112. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
  113. data/bin/lib/Image/ExifTool/Motorola.pm +1 -1
  114. data/bin/lib/Image/ExifTool/Nikon.pm +315 -36
  115. data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
  116. data/bin/lib/Image/ExifTool/NikonCustom.pm +1 -1
  117. data/bin/lib/Image/ExifTool/NikonSettings.pm +2013 -0
  118. data/bin/lib/Image/ExifTool/Nintendo.pm +1 -1
  119. data/bin/lib/Image/ExifTool/OOXML.pm +1 -1
  120. data/bin/lib/Image/ExifTool/Ogg.pm +1 -1
  121. data/bin/lib/Image/ExifTool/Olympus.pm +1 -1
  122. data/bin/lib/Image/ExifTool/OpenEXR.pm +1 -1
  123. data/bin/lib/Image/ExifTool/Opus.pm +1 -1
  124. data/bin/lib/Image/ExifTool/PCX.pm +1 -1
  125. data/bin/lib/Image/ExifTool/PDF.pm +10 -2
  126. data/bin/lib/Image/ExifTool/PGF.pm +1 -1
  127. data/bin/lib/Image/ExifTool/PICT.pm +1 -1
  128. data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
  129. data/bin/lib/Image/ExifTool/PLUS.pm +1 -1
  130. data/bin/lib/Image/ExifTool/PNG.pm +12 -4
  131. data/bin/lib/Image/ExifTool/PPM.pm +1 -1
  132. data/bin/lib/Image/ExifTool/PSP.pm +1 -1
  133. data/bin/lib/Image/ExifTool/Palm.pm +1 -1
  134. data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
  135. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
  136. data/bin/lib/Image/ExifTool/Parrot.pm +1 -1
  137. data/bin/lib/Image/ExifTool/Pentax.pm +3 -2
  138. data/bin/lib/Image/ExifTool/PhaseOne.pm +1 -1
  139. data/bin/lib/Image/ExifTool/PhotoCD.pm +1 -1
  140. data/bin/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  141. data/bin/lib/Image/ExifTool/Photoshop.pm +1 -1
  142. data/bin/lib/Image/ExifTool/PostScript.pm +1 -1
  143. data/bin/lib/Image/ExifTool/PrintIM.pm +1 -1
  144. data/bin/lib/Image/ExifTool/Qualcomm.pm +1 -1
  145. data/bin/lib/Image/ExifTool/QuickTime.pm +20 -14
  146. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +46 -7
  147. data/bin/lib/Image/ExifTool/README +5 -4
  148. data/bin/lib/Image/ExifTool/RIFF.pm +85 -7
  149. data/bin/lib/Image/ExifTool/RSRC.pm +1 -1
  150. data/bin/lib/Image/ExifTool/RTF.pm +1 -1
  151. data/bin/lib/Image/ExifTool/Radiance.pm +1 -1
  152. data/bin/lib/Image/ExifTool/Rawzor.pm +1 -1
  153. data/bin/lib/Image/ExifTool/Real.pm +1 -1
  154. data/bin/lib/Image/ExifTool/Reconyx.pm +1 -1
  155. data/bin/lib/Image/ExifTool/Red.pm +1 -1
  156. data/bin/lib/Image/ExifTool/Ricoh.pm +1 -1
  157. data/bin/lib/Image/ExifTool/Samsung.pm +1 -1
  158. data/bin/lib/Image/ExifTool/Sanyo.pm +1 -1
  159. data/bin/lib/Image/ExifTool/Scalado.pm +1 -1
  160. data/bin/lib/Image/ExifTool/Shift.pl +1 -1
  161. data/bin/lib/Image/ExifTool/Shortcuts.pm +1 -1
  162. data/bin/lib/Image/ExifTool/Sigma.pm +1 -1
  163. data/bin/lib/Image/ExifTool/SigmaRaw.pm +1 -1
  164. data/bin/lib/Image/ExifTool/Sony.pm +6 -2
  165. data/bin/lib/Image/ExifTool/SonyIDC.pm +1 -1
  166. data/bin/lib/Image/ExifTool/Stim.pm +1 -1
  167. data/bin/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  168. data/bin/lib/Image/ExifTool/TagLookup.pm +3985 -3807
  169. data/bin/lib/Image/ExifTool/TagNames.pod +432 -21
  170. data/bin/lib/Image/ExifTool/Text.pm +1 -1
  171. data/bin/lib/Image/ExifTool/Theora.pm +1 -1
  172. data/bin/lib/Image/ExifTool/Torrent.pm +1 -1
  173. data/bin/lib/Image/ExifTool/Unknown.pm +1 -1
  174. data/bin/lib/Image/ExifTool/VCard.pm +1 -1
  175. data/bin/lib/Image/ExifTool/Validate.pm +1 -1
  176. data/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
  177. data/bin/lib/Image/ExifTool/WTV.pm +1 -1
  178. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  179. data/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
  180. data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  181. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  182. data/bin/lib/Image/ExifTool/WritePNG.pl +1 -1
  183. data/bin/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  184. data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -1
  185. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +1 -1
  186. data/bin/lib/Image/ExifTool/WriteXMP.pl +10 -7
  187. data/bin/lib/Image/ExifTool/Writer.pl +32 -18
  188. data/bin/lib/Image/ExifTool/XMP.pm +44 -9
  189. data/bin/lib/Image/ExifTool/XMP2.pl +5 -1
  190. data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
  191. data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
  192. data/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
  193. data/bin/lib/Image/ExifTool/iWork.pm +1 -1
  194. data/bin/perl-Image-ExifTool.spec +1 -1
  195. data/lib/exiftool_vendored/version.rb +1 -1
  196. metadata +9 -4
@@ -96,7 +96,7 @@ my %insvLimit = (
96
96
  NOTES => q{
97
97
  Timed metadata extracted from QuickTime media data and some AVI videos when
98
98
  the ExtractEmbedded option is used. Although most of these tags are
99
- combined into the single table below, ExifTool currently reads 46 different
99
+ combined into the single table below, ExifTool currently reads 49 different
100
100
  formats of timed GPS metadata from video files.
101
101
  },
102
102
  VARS => { NO_ID => 1 },
@@ -531,7 +531,10 @@ my %insvLimit = (
531
531
  PROCESS_PROC => \&Process_tx3g,
532
532
  GROUPS => { 2 => 'Location' },
533
533
  FIRST_ENTRY => 0,
534
- NOTES => 'Tags extracted from the tx3g sbtl timed metadata of Yuneec drones.',
534
+ NOTES => q{
535
+ Tags extracted from the tx3g sbtl timed metadata of Yuneec drones, and
536
+ subtitle text in some other videos.
537
+ },
535
538
  Lat => {
536
539
  Name => 'GPSLatitude',
537
540
  RawConv => '$$self{FoundGPSLatitude} = 1; $val',
@@ -552,6 +555,11 @@ my %insvLimit = (
552
555
  GimYaw => 'GimbalYaw',
553
556
  GimPitch => 'GimbalPitch',
554
557
  GimRoll => 'GimbalRoll',
558
+ DateTime => { # for date/time-format subtitle text
559
+ Groups => { 2 => 'Time' },
560
+ PrintConv => '$self->ConvertDateTime($val)',
561
+ },
562
+ Text => { Groups => { 2 => 'Other' } },
555
563
  );
556
564
 
557
565
  %Image::ExifTool::QuickTime::INSV_MakerNotes = (
@@ -1195,6 +1203,10 @@ sub ProcessSamples($)
1195
1203
  $pos += $hdrLen + $len;
1196
1204
  last if $pos + $hdrLen >= length($buff);
1197
1205
  }
1206
+ if ($$et{GotNAL06}) {
1207
+ my $eeOpt = $et->Options('ExtractEmbedded');
1208
+ last unless $eeOpt and $eeOpt > 2;
1209
+ }
1198
1210
  next;
1199
1211
  }
1200
1212
  if ($verbose > 1) {
@@ -1771,6 +1783,25 @@ ATCRec: for ($recPos = 0x30; $recPos + 52 < $dirLen; $recPos += 52) {
1771
1783
  $trk = GetFloat($dataPt, 0x58);
1772
1784
  }
1773
1785
 
1786
+ } elsif ($$dataPt =~ /^.{60}A\0.{6}([NS])\0.{6}([EW])\0/s and $dirLen >= 112) {
1787
+
1788
+ # header looks like this in my sample (unknown dashcam, "Anticlock 2 2020_1125_1455_007.MOV"):
1789
+ # 0000: 00 00 80 00 66 72 65 65 47 50 53 20 68 00 00 00 [....freeGPS h...]
1790
+ # 0010: 32 30 31 33 30 33 32 35 41 00 00 00 00 00 00 00 [20130325A.......]
1791
+ # 0020: 41 70 72 20 20 36 20 32 30 31 36 2c 20 31 36 3a [Apr 6 2016, 16:]
1792
+ # 0030: 0e 00 00 00 38 00 00 00 22 00 00 00 41 00 00 00 [....8..."...A...]
1793
+ # 0040: 8a 63 24 45 53 00 00 00 9f e6 42 45 45 00 00 00 [.c$ES.....BEE...]
1794
+ # 0050: 59 c0 04 3f 52 b8 42 41 14 00 00 00 0b 00 00 00 [Y..?R.BA........]
1795
+ # 0060: 19 00 00 00 06 00 00 00 05 00 00 00 f6 ff ff ff [................]
1796
+ # 0070: 03 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 [................]
1797
+ ($latRef, $lonRef) = ($1, $2);
1798
+ ($hr,$min,$sec,$yr,$mon,$day,@acc) = unpack('x48V3x28V6',$$dataPt);
1799
+ map { $_ = $_ - 4294967296 if $_ >= 0x80000000; $_ /= 1000 } @acc; # (NC)
1800
+ $lat = GetFloat($dataPt, 0x40);
1801
+ $lon = GetFloat($dataPt, 0x48);
1802
+ $spd = GetFloat($dataPt, 0x50);
1803
+ $trk = GetFloat($dataPt, 0x54);
1804
+
1774
1805
  } else {
1775
1806
 
1776
1807
  # (look for binary GPS as stored by NextBase 512G, ref PH)
@@ -1836,8 +1867,10 @@ ATCRec: for ($recPos = 0x30; $recPos + 52 < $dirLen; $recPos += 52) {
1836
1867
  $et->HandleTag($tagTbl, GPSDateTime => $time);
1837
1868
  $et->HandleTag($tagTbl, GPSLatitude => $lat * ($latRef eq 'S' ? -1 : 1));
1838
1869
  $et->HandleTag($tagTbl, GPSLongitude => $lon * ($lonRef eq 'W' ? -1 : 1));
1839
- $et->HandleTag($tagTbl, GPSSpeed => $spd); # (now in km/h)
1840
- $et->HandleTag($tagTbl, GPSSpeedRef => 'K');
1870
+ if (defined $spd) {
1871
+ $et->HandleTag($tagTbl, GPSSpeed => $spd); # (now in km/h)
1872
+ $et->HandleTag($tagTbl, GPSSpeedRef => 'K');
1873
+ }
1841
1874
  if (defined $trk) {
1842
1875
  $et->HandleTag($tagTbl, GPSTrack => $trk);
1843
1876
  $et->HandleTag($tagTbl, GPSTrackRef => 'T');
@@ -1960,7 +1993,13 @@ sub Process_tx3g($$$)
1960
1993
  my $dataPt = $$dirInfo{DataPt};
1961
1994
  return 0 if length $$dataPt < 2;
1962
1995
  pos($$dataPt) = 2; # skip 2-byte length word
1963
- $et->HandleTag($tagTablePtr, $1, $2) while $$dataPt =~ /(\w+):([^:]*[^:\s])(\s|$)/sg;
1996
+ $et->VerboseDir('tx3g', undef, length($$dataPt)-2);
1997
+ $et->HandleTag($tagTablePtr, 'Text', substr($$dataPt, 2));
1998
+ if ($$dataPt =~ /^..\w{3} (\d{4})-(\d{2})-(\d{2}) (\d{2}:\d{2}:\d{2}) ?([-+])(\d{2}):?(\d{2})$/s) {
1999
+ $et->HandleTag($tagTablePtr, 'DateTime', "$1:$2:$3 $4$5$6:$7");
2000
+ } else {
2001
+ $et->HandleTag($tagTablePtr, $1, $2) while $$dataPt =~ /(\w+):([^:]*[^:\s])(\s|$)/sg;
2002
+ }
1964
2003
  return 1;
1965
2004
  }
1966
2005
 
@@ -2492,7 +2531,7 @@ sub ProcessInsta360($;$)
2492
2531
  $et->HandleTag($tagTbl, GPSTrack => $a[9]);
2493
2532
  $et->HandleTag($tagTbl, GPSTrackRef => 'T');
2494
2533
  $et->HandleTag($tagTbl, GPSAltitude => $a[10]);
2495
- $et->HandleTag($tagTbl, Unknown02 => "@a[1,2]") if $unknown;
2534
+ $et->HandleTag($tagTbl, Unknown02 => "@a[1,2]") if $unknown; # millisecond counter (https://exiftool.org/forum/index.php?topic=9884.msg65143#msg65143)
2496
2535
  }
2497
2536
  }
2498
2537
  } elsif ($id == 0x101) {
@@ -2649,7 +2688,7 @@ information like GPS tracks from MOV, MP4 and INSV media data.
2649
2688
 
2650
2689
  =head1 AUTHOR
2651
2690
 
2652
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
2691
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
2653
2692
 
2654
2693
  This library is free software; you can redistribute it and/or modify it
2655
2694
  under the same terms as Perl itself.
@@ -62,10 +62,11 @@ key:
62
62
  information about the source directory for tags to be copied to the output.
63
63
 
64
64
  CHECK_PROC : Reference to a function which validates Raw values for writing.
65
- The function takes three arguments: 0) ExifTool object reference, 1) tagInfo
66
- reference, 2) value reference, and returns undefined (and possibly modifies
67
- the input value) if successful, or an error message if there was a format
68
- problem. May set ExifTool CHECK_WARN datamember for success with a warning.
65
+ The function takes 3-4 arguments: 0) ExifTool object reference, 1) tagInfo
66
+ reference, 2) value reference, and 3) [optional] conversion type. It returns
67
+ undefined (and possibly modifies the input value) if successful, or an error
68
+ message if there was a format problem. May set ExifTool CHECK_WARN datamember
69
+ for success with a warning.
69
70
 
70
71
  INIT_TABLE : Routine called to do any necessary initialization before the
71
72
  first time the table is loaded. Argument is a reference to the table.
@@ -29,7 +29,7 @@ use strict;
29
29
  use vars qw($VERSION);
30
30
  use Image::ExifTool qw(:DataAccess :Utils);
31
31
 
32
- $VERSION = '1.56';
32
+ $VERSION = '1.57';
33
33
 
34
34
  sub ConvertTimecode($);
35
35
  sub ProcessSGLT($$$);
@@ -482,6 +482,15 @@ my %code2charset = (
482
482
  Name => 'CharacterSet',
483
483
  SubDirectory => { TagTable => 'Image::ExifTool::RIFF::CSET' },
484
484
  },
485
+ # tx_ tags are generated based on the Codec used for the txts stream
486
+ tx_USER => {
487
+ Name => 'UserText',
488
+ SubDirectory => { TagTable => 'Image::ExifTool::RIFF::UserText' },
489
+ },
490
+ tx_Unknown => { # (untested)
491
+ Name => 'Text',
492
+ Notes => 'streamed text, extracted when the ExtractEmbedded option is used',
493
+ },
485
494
  #
486
495
  # WebP-specific tags
487
496
  #
@@ -995,6 +1004,12 @@ my %code2charset = (
995
1004
  Condition => '$$self{RIFFStreamType} eq "vids"',
996
1005
  SubDirectory => { TagTable => 'Image::ExifTool::BMP::Main' },
997
1006
  },
1007
+ {
1008
+ Name => 'TextFormat',
1009
+ Condition => '$$self{RIFFStreamType} eq "txts"',
1010
+ Hidden => 1,
1011
+ RawConv => '$self->Options("ExtractEmbedded") or $self->WarnOnce("Use ExtractEmbedded option to extract timed text"); undef',
1012
+ },
998
1013
  ],
999
1014
  );
1000
1015
 
@@ -1025,7 +1040,7 @@ my %code2charset = (
1025
1040
  0 => {
1026
1041
  Name => 'StreamType',
1027
1042
  Format => 'string[4]',
1028
- RawConv => '$$self{RIFFStreamType} = $val',
1043
+ RawConv => '$$self{RIFFStreamNum} = ($$self{RIFFStreamNum} || 0) + 1; $$self{RIFFStreamType} = $val',
1029
1044
  PrintConv => {
1030
1045
  auds => 'Audio',
1031
1046
  mids => 'MIDI',
@@ -1038,16 +1053,19 @@ my %code2charset = (
1038
1053
  {
1039
1054
  Name => 'AudioCodec',
1040
1055
  Condition => '$$self{RIFFStreamType} eq "auds"',
1056
+ RawConv => '$$self{RIFFStreamCodec}[$$self{RIFFStreamNum}-1] = $val',
1041
1057
  Format => 'string[4]',
1042
1058
  },
1043
1059
  {
1044
1060
  Name => 'VideoCodec',
1045
1061
  Condition => '$$self{RIFFStreamType} eq "vids"',
1062
+ RawConv => '$$self{RIFFStreamCodec}[$$self{RIFFStreamNum}-1] = $val',
1046
1063
  Format => 'string[4]',
1047
1064
  },
1048
1065
  {
1049
1066
  Name => 'Codec',
1050
1067
  Format => 'string[4]',
1068
+ RawConv => '$$self{RIFFStreamCodec}[$$self{RIFFStreamNum}-1] = $val',
1051
1069
  },
1052
1070
  ],
1053
1071
  # 2 => 'StreamFlags',
@@ -1243,6 +1261,55 @@ my %code2charset = (
1243
1261
  },
1244
1262
  );
1245
1263
 
1264
+ # streamed USER txts written by Momento M6 dashcam (ref PH)
1265
+ %Image::ExifTool::RIFF::UserText = (
1266
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1267
+ GROUPS => { 2 => 'Location' },
1268
+ NOTES => q{
1269
+ Tags decoded from the USER-format txts stream written by Momento M6 dashcam.
1270
+ Extracted only if the ExtractEmbedded option is used.
1271
+ },
1272
+ # (little-endian)
1273
+ # 0 - int32u: 32
1274
+ # 4 - int32u: sample number (starting from unknown offset)
1275
+ # 8 - int8u[4]: "w x y z" ? (w 0=front cam, 1=rear cam, z mostly 5-8)
1276
+ # 12 - int8u[4]: "0 x 1 0" ? (x incrementing once per second)
1277
+ # 16 - int8u[4]: "0 32 0 x" ?
1278
+ # 20 - int32u: 100-150(mostly), 250-300(once per second)
1279
+ # 24 - int8u[4]: "0 x y 0" ?
1280
+ 28 => { Name => 'GPSAltitude', Format => 'int32u', ValueConv => '$val / 10' }, # (NC)
1281
+ # 32 - int32u: 0(mostly), 23(once per second)
1282
+ # 36 - int32u: 0
1283
+ 40 => { Name => 'Accelerometer', Format => 'float[3]' },
1284
+ # 52 - int32u: 1
1285
+ 56 => { Name => 'GPSSpeed', Format => 'float' }, # km/h
1286
+ 60 => {
1287
+ Name => 'GPSLatitude',
1288
+ Format => 'float',
1289
+ # Note: these values are unsigned and I don't know where the hemisphere is stored,
1290
+ # but my only sample is from the U.S., so assume a positive latitude (for now)
1291
+ ValueConv => 'my $deg = int($val / 100); $deg + ($val - $deg * 100) / 60',
1292
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
1293
+ },
1294
+ 64 => {
1295
+ Name => 'GPSLongitude',
1296
+ Format => 'float',
1297
+ # Note: these values are unsigned and I don't know where the hemisphere is stored,
1298
+ # but my only sample is from the U.S., so assume a negative longitude (for now)
1299
+ ValueConv => 'my $deg = int($val / 100); -($deg + ($val - $deg * 100) / 60)',
1300
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
1301
+ },
1302
+ 68 => {
1303
+ Name => 'GPSDateTime',
1304
+ Description => 'GPS Date/Time',
1305
+ Groups => { 2 => 'Time' },
1306
+ Format => 'int32u',
1307
+ ValueConv => 'ConvertUnixTime($val)',
1308
+ # (likely local time, but clock seemed off by 3 hours in my sample)
1309
+ PrintConv => '$self->ConvertDateTime($val)',
1310
+ },
1311
+ );
1312
+
1246
1313
  # WebP alpha info (ref 14)
1247
1314
  %Image::ExifTool::RIFF::ALPH = (
1248
1315
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
@@ -1752,6 +1819,7 @@ sub ProcessRIFF($$)
1752
1819
  my ($buff, $buf2, $type, $mime, $err, $rf64);
1753
1820
  my $verbose = $et->Options('Verbose');
1754
1821
  my $unknown = $et->Options('Unknown');
1822
+ my $ee = $et->Options('ExtractEmbedded');
1755
1823
 
1756
1824
  # verify this is a valid RIFF file
1757
1825
  return 0 unless $raf->Read($buff, 12) == 12;
@@ -1769,7 +1837,8 @@ sub ProcessRIFF($$)
1769
1837
  $mime = $riffMimeType{$type} if $type;
1770
1838
  $et->SetFileType($type, $mime);
1771
1839
  $$et{VALUE}{FileType} .= ' (RF64)' if $rf64;
1772
- $$et{RIFFStreamType} = ''; # initialize stream type
1840
+ $$et{RIFFStreamType} = ''; # initialize stream type
1841
+ $$et{RIFFStreamCodec} = []; # initialize codec array
1773
1842
  SetByteOrder('II');
1774
1843
  my $tagTbl = GetTagTable('Image::ExifTool::RIFF::Main');
1775
1844
  my $pos = 12;
@@ -1808,16 +1877,22 @@ sub ProcessRIFF($$)
1808
1877
  # stop when we hit the audio data or AVI index or AVI movie data
1809
1878
  # --> no more because Adobe Bridge stores XMP after this!!
1810
1879
  # (so now we only do this on the FastScan option)
1811
- if (($tag eq 'data' or $tag eq 'idx1' or $tag eq 'LIST_movi') and
1812
- $et->Options('FastScan'))
1880
+ if ($et->Options('FastScan') and ($tag eq 'data' or $tag eq 'idx1' or
1881
+ ($tag eq 'LIST_movi' and not $ee)))
1813
1882
  {
1814
1883
  $et->VPrint(0, "(end of parsing)\n");
1815
1884
  last;
1816
1885
  }
1817
1886
  # RIFF chunks are padded to an even number of bytes
1818
1887
  my $len2 = $len + ($len & 0x01);
1888
+ # change name of stream txts data depending on the Codec
1889
+ if ($ee and $tag =~ /^(\d{2})tx$/) {
1890
+ $tag = 'tx_' . ($$et{RIFFStreamCodec}[$1] || 'Unknown');
1891
+ $tag = "tx_Unknown" unless defined $$tagTbl{$tag};
1892
+ $$et{DOC_NUM} = ++$$et{DOC_COUNT};
1893
+ }
1819
1894
  my $tagInfo = $$tagTbl{$tag};
1820
- if ($tagInfo or (($verbose or $unknown) and $tag !~ /^(data|idx1|LIST_movi|RIFF)$/)) {
1895
+ if ($tagInfo or (($verbose or $unknown) and $tag !~ /^(data|idx1|LIST_movi|RIFF|\d{2}(db|dc|wb))$/)) {
1821
1896
  $raf->Read($buff, $len2) == $len2 or $err=1, last;
1822
1897
  my $setGroups;
1823
1898
  if ($tagInfo and ref $tagInfo eq 'HASH' and $$tagInfo{SetGroups}) {
@@ -1835,11 +1910,14 @@ sub ProcessRIFF($$)
1835
1910
  delete $$et{SET_GROUP0};
1836
1911
  delete $$et{SET_GROUP1};
1837
1912
  }
1913
+ delete $$et{DOC_NUM} if $ee;
1838
1914
  } elsif ($tag eq 'RIFF') {
1839
1915
  # don't read into RIFF chunk (eg. concatenated video file)
1840
1916
  $raf->Read($buff, 4) == 4 or $err=1, last;
1841
1917
  # extract information from remaining file as an embedded file
1842
1918
  $$et{DOC_NUM} = ++$$et{DOC_COUNT}
1919
+ } elsif ($tag eq 'LIST_movi' and $ee) {
1920
+ next; # parse into movi chunk
1843
1921
  } else {
1844
1922
  if ($len > 0x7fffffff and not $et->Options('LargeFileSupport')) {
1845
1923
  $et->Warn("Stopped parsing at large $tag chunk (LargeFileSupport not set)");
@@ -1874,7 +1952,7 @@ including AVI videos, WAV audio files and WEBP images.
1874
1952
 
1875
1953
  =head1 AUTHOR
1876
1954
 
1877
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
1955
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
1878
1956
 
1879
1957
  This library is free software; you can redistribute it and/or modify it
1880
1958
  under the same terms as Perl itself.
@@ -225,7 +225,7 @@ resource files.
225
225
 
226
226
  =head1 AUTHOR
227
227
 
228
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
228
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
229
229
 
230
230
  This library is free software; you can redistribute it and/or modify it
231
231
  under the same terms as Perl itself.
@@ -366,7 +366,7 @@ information from RTF (Rich Text Format) documents.
366
366
 
367
367
  =head1 AUTHOR
368
368
 
369
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
369
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
370
370
 
371
371
  This library is free software; you can redistribute it and/or modify it
372
372
  under the same terms as Perl itself.
@@ -125,7 +125,7 @@ images are a type of high dynamic-range image.
125
125
 
126
126
  =head1 AUTHOR
127
127
 
128
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
128
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
129
129
 
130
130
  This library is free software; you can redistribute it and/or modify it
131
131
  under the same terms as Perl itself.
@@ -168,7 +168,7 @@ information from Rawzor compressed images.
168
168
 
169
169
  =head1 AUTHOR
170
170
 
171
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
171
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
172
172
 
173
173
  This library is free software; you can redistribute it and/or modify it
174
174
  under the same terms as Perl itself.
@@ -715,7 +715,7 @@ little-endian, but the Real format is big-endian.
715
715
 
716
716
  =head1 AUTHOR
717
717
 
718
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
718
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
719
719
 
720
720
  This library is free software; you can redistribute it and/or modify it
721
721
  under the same terms as Perl itself.
@@ -431,7 +431,7 @@ maker notes in images from Reconyx cameras.
431
431
 
432
432
  =head1 AUTHOR
433
433
 
434
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
434
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
435
435
 
436
436
  This library is free software; you can redistribute it and/or modify it
437
437
  under the same terms as Perl itself.
@@ -303,7 +303,7 @@ from Redcode R3D version 1 and 2 video files.
303
303
 
304
304
  =head1 AUTHOR
305
305
 
306
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
306
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
307
307
 
308
308
  This library is free software; you can redistribute it and/or modify it
309
309
  under the same terms as Perl itself.
@@ -1143,7 +1143,7 @@ interpret Ricoh maker notes EXIF meta information.
1143
1143
 
1144
1144
  =head1 AUTHOR
1145
1145
 
1146
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
1146
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
1147
1147
 
1148
1148
  This library is free software; you can redistribute it and/or modify it
1149
1149
  under the same terms as Perl itself.
@@ -1447,7 +1447,7 @@ Samsung maker notes in EXIF information.
1447
1447
 
1448
1448
  =head1 AUTHOR
1449
1449
 
1450
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
1450
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
1451
1451
 
1452
1452
  This library is free software; you can redistribute it and/or modify it
1453
1453
  under the same terms as Perl itself.
@@ -419,7 +419,7 @@ Sanyo maker notes in EXIF information.
419
419
 
420
420
  =head1 AUTHOR
421
421
 
422
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
422
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
423
423
 
424
424
  This library is free software; you can redistribute it and/or modify it
425
425
  under the same terms as Perl itself.
@@ -128,7 +128,7 @@ metadata from the JPEG APP4 SCALADO segment.
128
128
 
129
129
  =head1 AUTHOR
130
130
 
131
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
131
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
132
132
 
133
133
  This library is free software; you can redistribute it and/or modify it
134
134
  under the same terms as Perl itself.
@@ -630,7 +630,7 @@ limited to the range 1970 to 2038 on 32-bit systems.
630
630
 
631
631
  =head1 AUTHOR
632
632
 
633
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
633
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
634
634
 
635
635
  This library is free software; you can redistribute it and/or modify it
636
636
  under the same terms as Perl itself.
@@ -332,7 +332,7 @@ name prefix.
332
332
 
333
333
  =head1 AUTHOR
334
334
 
335
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
335
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
336
336
 
337
337
  This library is free software; you can redistribute it and/or modify it
338
338
  under the same terms as Perl itself.