exiftool-vendored.exe 13.17.0 → 13.26.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 (49) hide show
  1. package/bin/README.txt +14 -14
  2. package/bin/exiftool.exe +0 -0
  3. package/bin/exiftool_files/exiftool.pl +117 -46
  4. package/bin/exiftool_files/lib/Image/ExifTool/Apple.pm +12 -2
  5. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +2 -2
  6. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +3 -2
  7. package/bin/exiftool_files/lib/Image/ExifTool/CanonRaw.pm +1 -1
  8. package/bin/exiftool_files/lib/Image/ExifTool/DJI.pm +190 -29
  9. package/bin/exiftool_files/lib/Image/ExifTool/DarwinCore.pm +22 -11
  10. package/bin/exiftool_files/lib/Image/ExifTool/EXE.pm +2 -9
  11. package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +1 -1
  12. package/bin/exiftool_files/lib/Image/ExifTool/GPS.pm +3 -3
  13. package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.dat +0 -0
  14. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +86 -48
  15. package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +1 -0
  16. package/bin/exiftool_files/lib/Image/ExifTool/ICO.pm +2 -2
  17. package/bin/exiftool_files/lib/Image/ExifTool/JPEG.pm +5 -1
  18. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +5 -1
  19. package/bin/exiftool_files/lib/Image/ExifTool/Kodak.pm +3 -2
  20. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +944 -1237
  21. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +3 -1
  22. package/bin/exiftool_files/lib/Image/ExifTool/PCAP.pm +462 -0
  23. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +10 -1
  24. package/bin/exiftool_files/lib/Image/ExifTool/PLIST.pm +92 -29
  25. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +7 -1
  26. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +2 -1
  27. package/bin/exiftool_files/lib/Image/ExifTool/Photoshop.pm +2 -2
  28. package/bin/exiftool_files/lib/Image/ExifTool/Plot.pm +713 -0
  29. package/bin/exiftool_files/lib/Image/ExifTool/Protobuf.pm +24 -11
  30. package/bin/exiftool_files/lib/Image/ExifTool/Qualcomm.pm +78 -1
  31. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +371 -324
  32. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +75 -27
  33. package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +15 -6
  34. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +33 -14
  35. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +5067 -4967
  36. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +457 -336
  37. package/bin/exiftool_files/lib/Image/ExifTool/Trailer.pm +3 -3
  38. package/bin/exiftool_files/lib/Image/ExifTool/Validate.pm +4 -4
  39. package/bin/exiftool_files/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  40. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +9 -4
  41. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -1
  42. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +58 -5
  43. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +14 -13
  44. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +55 -20
  45. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +7 -1
  46. package/bin/exiftool_files/lib/Image/ExifTool.pm +63 -29
  47. package/bin/exiftool_files/lib/Image/ExifTool.pod +84 -86
  48. package/bin/exiftool_files/windows_exiftool.txt +96 -72
  49. package/package.json +4 -4
@@ -38,17 +38,18 @@
38
38
  # 26) https://github.com/SamsungVR/android_upload_sdk/blob/master/SDKLib/src/main/java/com/samsung/msca/samsungvr/sdk/UserVideo.java
39
39
  # 27) https://exiftool.org/forum/index.php?topic=11517.0
40
40
  # 28) https://docs.mp3tag.de/mapping/
41
+ # 29) https://developer.apple.com/documentation/quicktime-file-format/media_data_reference_atom
41
42
  #------------------------------------------------------------------------------
42
43
 
43
44
  package Image::ExifTool::QuickTime;
44
45
 
45
46
  use strict;
46
- use vars qw($VERSION $AUTOLOAD %stringEncoding %avType);
47
+ use vars qw($VERSION $AUTOLOAD %stringEncoding %avType %dontInherit %eeBox);
47
48
  use Image::ExifTool qw(:DataAccess :Utils);
48
49
  use Image::ExifTool::Exif;
49
50
  use Image::ExifTool::GPS;
50
51
 
51
- $VERSION = '3.12';
52
+ $VERSION = '3.15';
52
53
 
53
54
  sub ProcessMOV($$;$);
54
55
  sub ProcessKeys($$$);
@@ -487,16 +488,22 @@ my %qtFlags = ( #12
487
488
  );
488
489
 
489
490
  # properties which don't get inherited from the parent
490
- my %dontInherit = (
491
- ispe => 1, # size of parent may be different
492
- hvcC => 1, # (likely redundant)
491
+ # 1 = parent doesn't inherit this property
492
+ # 2 = parent doesn't inherit, but child does
493
+ %dontInherit = (
494
+ ispe => 1, # primary item must have an ispe and pixi, so no need to inherit these
495
+ pixi => 1,
496
+ irot => 1, # (tmap may have a different irot)
497
+ pasp => 1, # (NC)
498
+ hvcC => 2, # (hvcC is a property of hvc1 referred to by primary grid)
499
+ colr => 2, # (colr is a property of primary grid or hvc1 referred to by primary)
493
500
  );
494
501
 
495
502
  # tags that may be duplicated and directories that may contain duplicate tags
496
503
  # (used only to avoid warnings when Validate-ing)
497
504
  my %dupTagOK = ( mdat => 1, trak => 1, free => 1, infe => 1, sgpd => 1, dimg => 1, CCDT => 1,
498
505
  sbgp => 1, csgm => 1, uuid => 1, cdsc => 1, maxr => 1, '----' => 1 );
499
- my %dupDirOK = ( ipco => 1, '----' => 1 );
506
+ my %dupDirOK = ( ipco => 1, iref => 1, '----' => 1 );
500
507
 
501
508
  # the usual atoms required to decode timed metadata with the ExtractEmbedded option
502
509
  my %eeStd = ( stco => 'stbl', co64 => 'stbl', stsz => 'stbl', stz2 => 'stbl',
@@ -509,8 +516,8 @@ my %hashBox = ( vide => { %eeStd }, soun => { %eeStd } );
509
516
  # when the ExtractEmbedded is enabled (currently only the 'gps ' container name is
510
517
  # used, but others have been checked against all available sample files and may be
511
518
  # useful in the future if the names are used for different boxes on other locations)
512
- my %eeBox = (
513
- # (note: vide is only processed if specific atoms exist in the VideoSampleDesc)
519
+ %eeBox = (
520
+ # (note: vide is only processed if specific atoms exist in the VisualSampleDesc)
514
521
  vide => { %eeStd, JPEG => 'stsd' },
515
522
  text => { %eeStd },
516
523
  meta => { %eeStd },
@@ -1005,7 +1012,7 @@ my %userDefined = (
1005
1012
  NOTES => 'Tags used in QTIF QuickTime Image Files.',
1006
1013
  idsc => {
1007
1014
  Name => 'ImageDescription',
1008
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::ImageDesc' },
1015
+ SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::VisualSampleDesc' },
1009
1016
  },
1010
1017
  idat => {
1011
1018
  Name => 'ImageData',
@@ -1017,158 +1024,6 @@ my %userDefined = (
1017
1024
  },
1018
1025
  );
1019
1026
 
1020
- # image description data block
1021
- %Image::ExifTool::QuickTime::ImageDesc = (
1022
- PROCESS_PROC => \&ProcessHybrid,
1023
- VARS => { ID_LABEL => 'ID/Index' },
1024
- GROUPS => { 2 => 'Image' },
1025
- FORMAT => 'int16u',
1026
- 2 => {
1027
- Name => 'CompressorID',
1028
- Format => 'string[4]',
1029
- # not very useful since this isn't a complete list and name is given below
1030
- # # ref http://developer.apple.com/mac/library/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
1031
- # PrintConv => {
1032
- # cvid => 'Cinepak',
1033
- # jpeg => 'JPEG',
1034
- # 'smc '=> 'Graphics',
1035
- # 'rle '=> 'Animation',
1036
- # rpza => 'Apple Video',
1037
- # kpcd => 'Kodak Photo CD',
1038
- # 'png '=> 'Portable Network Graphics',
1039
- # mjpa => 'Motion-JPEG (format A)',
1040
- # mjpb => 'Motion-JPEG (format B)',
1041
- # SVQ1 => 'Sorenson video, version 1',
1042
- # SVQ3 => 'Sorenson video, version 3',
1043
- # mp4v => 'MPEG-4 video',
1044
- # 'dvc '=> 'NTSC DV-25 video',
1045
- # dvcp => 'PAL DV-25 video',
1046
- # 'gif '=> 'Compuserve Graphics Interchange Format',
1047
- # h263 => 'H.263 video',
1048
- # tiff => 'Tagged Image File Format',
1049
- # 'raw '=> 'Uncompressed RGB',
1050
- # '2vuY'=> "Uncompressed Y'CbCr, 3x8-bit 4:2:2 (2vuY)",
1051
- # 'yuv2'=> "Uncompressed Y'CbCr, 3x8-bit 4:2:2 (yuv2)",
1052
- # v308 => "Uncompressed Y'CbCr, 8-bit 4:4:4",
1053
- # v408 => "Uncompressed Y'CbCr, 8-bit 4:4:4:4",
1054
- # v216 => "Uncompressed Y'CbCr, 10, 12, 14, or 16-bit 4:2:2",
1055
- # v410 => "Uncompressed Y'CbCr, 10-bit 4:4:4",
1056
- # v210 => "Uncompressed Y'CbCr, 10-bit 4:2:2",
1057
- # hvc1 => 'HEVC', #PH
1058
- # },
1059
- },
1060
- 10 => {
1061
- Name => 'VendorID',
1062
- Format => 'string[4]',
1063
- RawConv => 'length $val ? $val : undef',
1064
- PrintConv => \%vendorID,
1065
- SeparateTable => 'VendorID',
1066
- },
1067
- # 14 - ("Quality" in QuickTime docs) ??
1068
- 16 => 'SourceImageWidth',
1069
- 17 => 'SourceImageHeight',
1070
- 18 => { Name => 'XResolution', Format => 'fixed32u' },
1071
- 20 => { Name => 'YResolution', Format => 'fixed32u' },
1072
- # 24 => 'FrameCount', # always 1 (what good is this?)
1073
- 25 => {
1074
- Name => 'CompressorName',
1075
- Format => 'string[32]',
1076
- # (sometimes this is a Pascal string, and sometimes it is a C string)
1077
- RawConv => q{
1078
- $val=substr($val,1,ord($1)) if $val=~/^([\0-\x1f])/ and ord($1)<length($val);
1079
- length $val ? $val : undef;
1080
- },
1081
- },
1082
- 41 => 'BitDepth',
1083
- #
1084
- # Observed offsets for child atoms of various CompressorID types:
1085
- #
1086
- # CompressorID Offset Child atoms
1087
- # ----------- ------ ----------------
1088
- # avc1 86 avcC, btrt, colr, pasp, fiel, clap, svcC
1089
- # mp4v 86 esds, pasp
1090
- # s263 86 d263
1091
- #
1092
- btrt => {
1093
- Name => 'BitrateInfo',
1094
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::Bitrate' },
1095
- },
1096
- # Reference for fiel, colr, pasp, clap:
1097
- # https://developer.apple.com/library/mac/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG9
1098
- fiel => {
1099
- Name => 'VideoFieldOrder',
1100
- ValueConv => 'join(" ", unpack("C*",$val))',
1101
- PrintConv => [{
1102
- 1 => 'Progressive',
1103
- 2 => '2:1 Interlaced',
1104
- }],
1105
- },
1106
- colr => {
1107
- Name => 'ColorRepresentation',
1108
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::ColorRep' },
1109
- },
1110
- pasp => {
1111
- Name => 'PixelAspectRatio',
1112
- ValueConv => 'join(":", unpack("N*",$val))',
1113
- },
1114
- clap => {
1115
- Name => 'CleanAperture',
1116
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::CleanAperture' },
1117
- },
1118
- avcC => {
1119
- # (see http://thompsonng.blogspot.ca/2010/11/mp4-file-format-part-2.html)
1120
- Name => 'AVCConfiguration',
1121
- Unknown => 1,
1122
- Binary => 1,
1123
- },
1124
- JPEG => { # (found in CR3 images; used as a flag to identify JpgFromRaw 'vide' stream)
1125
- Name => 'JPEGInfo',
1126
- # (4 bytes all zero)
1127
- Unknown => 1,
1128
- Binary => 1,
1129
- },
1130
- # hvcC - HEVC configuration
1131
- # svcC - 7 bytes: 00 00 00 00 ff e0 00
1132
- # esds - elementary stream descriptor
1133
- # d263
1134
- gama => { Name => 'Gamma', Format => 'fixed32u' },
1135
- # mjqt - default quantization table for MJPEG
1136
- # mjht - default Huffman table for MJPEG
1137
- # csgm ? (seen in hevc video)
1138
- CMP1 => { # Canon CR3
1139
- Name => 'CMP1',
1140
- SubDirectory => { TagTable => 'Image::ExifTool::Canon::CMP1' },
1141
- },
1142
- CDI1 => { # Canon CR3
1143
- Name => 'CDI1',
1144
- SubDirectory => {
1145
- TagTable => 'Image::ExifTool::Canon::CDI1',
1146
- Start => 4,
1147
- },
1148
- },
1149
- # JPEG - 4 bytes all 0 (Canon CR3)
1150
- # free - (Canon CR3)
1151
- #
1152
- # spherical video v2 stuff (untested)
1153
- #
1154
- st3d => {
1155
- Name => 'Stereoscopic3D',
1156
- Format => 'int8u',
1157
- ValueConv => '$val =~ s/.* //; $val', # (remove leading version/flags bytes?)
1158
- PrintConv => {
1159
- 0 => 'Monoscopic',
1160
- 1 => 'Stereoscopic Top-Bottom',
1161
- 2 => 'Stereoscopic Left-Right',
1162
- 3 => 'Stereoscopic Stereo-Custom',
1163
- 4 => 'Stereoscopic Right-Left',
1164
- },
1165
- },
1166
- sv3d => {
1167
- Name => 'SphericalVideo',
1168
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::sv3d' },
1169
- },
1170
- );
1171
-
1172
1027
  # 'sv3d' atom information (ref https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md)
1173
1028
  %Image::ExifTool::QuickTime::sv3d = (
1174
1029
  PROCESS_PROC => \&ProcessMOV,
@@ -1373,6 +1228,7 @@ my %userDefined = (
1373
1228
  # clip - clipping --> contains crgn (clip region) (ref 12)
1374
1229
  # mvex - movie extends --> contains mehd (movie extends header), trex (track extends) (ref 14)
1375
1230
  # ICAT - 4 bytes: "6350" (Nikon CoolPix S6900), "6500" (Panasonic FT7)
1231
+ # ctab - color table (ref 29)
1376
1232
  );
1377
1233
 
1378
1234
  # (ref CFFMediaFormat-2_1.pdf)
@@ -1572,6 +1428,7 @@ my %userDefined = (
1572
1428
  # load - track loading settings
1573
1429
  # imap - track input map --> contains ' in' --> contains ' ty', obid
1574
1430
  # prfl - Profile (ref 12)
1431
+ # txas - track exclude from autoselection (ref 29)
1575
1432
  );
1576
1433
 
1577
1434
  # track header data block
@@ -1748,28 +1605,6 @@ my %userDefined = (
1748
1605
  PrintConv => \&PrintGPSCoordinates,
1749
1606
  PrintConvInv => \&PrintInvGPSCoordinates,
1750
1607
  },
1751
- # \xa9 tags written by DJI Phantom 3: (ref PH)
1752
- "\xa9xsp" => 'SpeedX', #PH (guess)
1753
- "\xa9ysp" => 'SpeedY', #PH (guess)
1754
- "\xa9zsp" => 'SpeedZ', #PH (guess)
1755
- "\xa9fpt" => 'Pitch', #PH
1756
- "\xa9fyw" => 'Yaw', #PH
1757
- "\xa9frl" => 'Roll', #PH
1758
- "\xa9gpt" => 'CameraPitch', #PH
1759
- "\xa9gyw" => 'CameraYaw', #PH
1760
- "\xa9grl" => 'CameraRoll', #PH
1761
- "\xa9enc" => 'EncoderID', #PH (forum9271)
1762
- # and the following entries don't have the proper 4-byte header for \xa9 tags:
1763
- "\xa9dji" => { Name => 'UserData_dji', Format => 'undef', Binary => 1, Unknown => 1, Hidden => 1 },
1764
- "\xa9res" => { Name => 'UserData_res', Format => 'undef', Binary => 1, Unknown => 1, Hidden => 1 },
1765
- "\xa9uid" => { Name => 'UserData_uid', Format => 'undef', Binary => 1, Unknown => 1, Hidden => 1 },
1766
- "\xa9mdl" => {
1767
- Name => 'Model',
1768
- Notes => 'non-standard-format DJI tag',
1769
- Format => 'string',
1770
- Avoid => 1,
1771
- },
1772
- # end DJI tags
1773
1608
  name => 'Name',
1774
1609
  WLOC => {
1775
1610
  Name => 'WindowLocation',
@@ -1798,6 +1633,10 @@ my %userDefined = (
1798
1633
  Start => 4, # must skip 4-byte version number header
1799
1634
  },
1800
1635
  },
1636
+ tnam => { #29 (NC)
1637
+ Name => 'TrackName',
1638
+ IText => 4,
1639
+ },
1801
1640
  'ptv '=> {
1802
1641
  Name => 'PrintToVideo',
1803
1642
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::Video' },
@@ -2227,7 +2066,7 @@ my %userDefined = (
2227
2066
  ValueConvInv => 'pack("H*",$val)',
2228
2067
  },
2229
2068
  # SETT? 12 bytes (Hero4)
2230
- # MUID? 32 bytes (Hero4, starts with serial number hash)
2069
+ MUID => { Name => 'MediaUID', ValueConv => 'unpack("H*", $val)' },
2231
2070
  # HMMT? 404 bytes (Hero4, all zero)
2232
2071
  # BCID? 26 bytes (Hero5, all zero), 36 bytes GoPro Max
2233
2072
  # GUMI? 16 bytes (Hero5)
@@ -2240,7 +2079,35 @@ my %userDefined = (
2240
2079
  "\xa9TSC" => 'StartTimeScale', # (Hero6)
2241
2080
  "\xa9TSZ" => 'StartTimeSampleSize', # (Hero6)
2242
2081
  "\xa9TIM" => 'StartTimecode', #PH (NC)
2243
- # --- HTC ----
2082
+ # ---- DJI ----
2083
+ # \xa9 tags written by DJI Phantom 3: (ref PH)
2084
+ "\xa9xsp" => 'SpeedX', #PH (guess)
2085
+ "\xa9ysp" => 'SpeedY', #PH (guess)
2086
+ "\xa9zsp" => 'SpeedZ', #PH (guess)
2087
+ "\xa9fpt" => 'Pitch', #PH
2088
+ "\xa9fyw" => 'Yaw', #PH
2089
+ "\xa9frl" => 'Roll', #PH
2090
+ "\xa9gpt" => 'CameraPitch', #PH
2091
+ "\xa9gyw" => 'CameraYaw', #PH
2092
+ "\xa9grl" => 'CameraRoll', #PH
2093
+ "\xa9enc" => 'EncoderID', #PH (forum9271)
2094
+ # and the following entries don't have the proper 4-byte header for \xa9 tags:
2095
+ "\xa9dji" => { Name => 'UserData_dji', Format => 'undef', Binary => 1, Unknown => 1, Hidden => 1 },
2096
+ "\xa9res" => { Name => 'UserData_res', Format => 'undef', Binary => 1, Unknown => 1, Hidden => 1 },
2097
+ "\xa9uid" => { Name => 'UserData_uid', Format => 'undef', Binary => 1, Unknown => 1, Hidden => 1 },
2098
+ "\xa9mdl" => {
2099
+ Name => 'Model',
2100
+ Notes => 'non-standard-format DJI tag',
2101
+ Format => 'string',
2102
+ Avoid => 1,
2103
+ },
2104
+ btec => {
2105
+ Name => 'GlamourSettings',
2106
+ SubDirectory => { TagTable => 'Image::ExifTool::DJI::Glamour' },
2107
+ },
2108
+ fsid => 'OriginalFilePath',
2109
+ # dbcm - seen "\0\0\0\x04"
2110
+ # ---- HTC ----
2244
2111
  htcb => {
2245
2112
  Name => 'HTCBinary',
2246
2113
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::HTCBinary' },
@@ -2941,6 +2808,8 @@ my %userDefined = (
2941
2808
  Name => 'Unknown_grpl',
2942
2809
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::grpl' },
2943
2810
  },
2811
+ # ctry - country list (ref 29)
2812
+ # lang - language list (ref 29)
2944
2813
  );
2945
2814
 
2946
2815
  # unknown grpl container
@@ -2987,7 +2856,8 @@ my %userDefined = (
2987
2856
  ipma => {
2988
2857
  Name => 'ItemPropertyAssociation',
2989
2858
  RawConv => \&ParseItemPropAssoc,
2990
- WriteHook => \&ParseItemPropAssoc,
2859
+ # (comment out because we do this manually _before_ ipco when writing)
2860
+ # WriteHook => \&ParseItemPropAssoc,
2991
2861
  Notes => 'parsed, but not extracted as a tag',
2992
2862
  },
2993
2863
  );
@@ -2995,13 +2865,16 @@ my %userDefined = (
2995
2865
  %Image::ExifTool::QuickTime::ItemPropCont = (
2996
2866
  PROCESS_PROC => \&ProcessMOV,
2997
2867
  WRITE_PROC => \&WriteQuickTime,
2868
+ CHECK_PROC => \&CheckQTValue,
2998
2869
  PERMANENT => 1, # (can't be deleted)
2999
2870
  GROUPS => { 2 => 'Image' },
3000
2871
  VARS => { START_INDEX => 1 }, # show verbose indices starting at 1
3001
2872
  colr => [{
3002
2873
  Name => 'ICC_Profile',
3003
2874
  Condition => '$$valPt =~ /^(prof|rICC)/',
3004
- Permanent => 0, # (in QuickTime, this writes a zero-length box instead of deleting)
2875
+ # (don't do this because Apple Preview won't display an HEIC with a 0-length profile)
2876
+ # Permanent => 0, # (in QuickTime, this writes a zero-length box instead of deleting)
2877
+ Permanent => 1,
3005
2878
  SubDirectory => {
3006
2879
  TagTable => 'Image::ExifTool::ICC_Profile::Main',
3007
2880
  Start => 4,
@@ -3050,6 +2923,7 @@ my %userDefined = (
3050
2923
  Name => 'PixelAspectRatio',
3051
2924
  Format => 'int32u',
3052
2925
  Writable => 'int32u',
2926
+ Count => 2,
3053
2927
  Protected => 1,
3054
2928
  },
3055
2929
  rloc => {
@@ -3414,21 +3288,28 @@ my %userDefined = (
3414
3288
  %Image::ExifTool::QuickTime::TrackRef = (
3415
3289
  PROCESS_PROC => \&ProcessMOV,
3416
3290
  GROUPS => { 1 => 'Track#', 2 => 'Video' },
3417
- chap => { Name => 'ChapterListTrackID', Format => 'int32u' },
3418
- tmcd => { Name => 'TimeCode', Format => 'int32u' },
3291
+ chap => { Name => 'ChapterListTrackID', Format => 'int32u' },
3292
+ tmcd => { Name => 'TimecodeTrack', Format => 'int32u' },
3419
3293
  mpod => { #PH (FLIR MP4)
3420
3294
  Name => 'ElementaryStreamTrack',
3421
3295
  Format => 'int32u',
3422
3296
  ValueConv => '$val =~ s/^1 //; $val', # (why 2 numbers? -- ignore the first if "1")
3423
3297
  },
3424
- # also: sync, scpt, ssrc, iTunesInfo
3298
+ # also: iTunesInfo
3425
3299
  cdsc => {
3426
3300
  Name => 'ContentDescribes',
3427
3301
  Format => 'int32u',
3428
3302
  PrintConv => '"Track $val"',
3429
3303
  },
3430
- # cdep (Structural Dependency QT tag?)
3431
- # fall - ? int32u, seen: 2
3304
+ clcp => { Name => 'ClosedCaptionTrack', Format => 'int32u' }, #29
3305
+ fall => { Name => 'AlternateFormatTrack', Format => 'int32u' }, #29
3306
+ folw => { Name => 'SubtitleTrack', Format => 'int32u' }, #29
3307
+ forc => { Name => 'ForcedSubtitleTrack', Format => 'int32u' }, #29
3308
+ scpt => { Name => 'TranscriptTrack', Format => 'int32u' }, #29
3309
+ ssrc => { Name => 'Non-primarySourceTrack', Format => 'int32u' }, #29
3310
+ sync => { Name => 'SyncronizedTrack', Format => 'int32u' }, #29
3311
+ # hint - Original media for hint track (ref 29)
3312
+ # cdep (Structural Dependency QT tag?)
3432
3313
  );
3433
3314
 
3434
3315
  # track aperture mode dimensions atoms
@@ -6717,7 +6598,6 @@ my %userDefined = (
6717
6598
  'apple.photos.variation-identifier' => { Name => 'ApplePhotosVariationIdentifier', Writable => 'int64s' },
6718
6599
  'direction.facing' => { Name => 'CameraDirection', Groups => { 2 => 'Location' } },
6719
6600
  'direction.motion' => { Name => 'CameraMotion', Groups => { 2 => 'Location' } },
6720
- 'location.body' => { Name => 'LocationBody', Groups => { 2 => 'Location' } },
6721
6601
  'player.version' => 'PlayerVersion',
6722
6602
  'player.movie.visual.brightness'=> 'Brightness',
6723
6603
  'player.movie.visual.color' => 'Color',
@@ -7181,6 +7061,7 @@ my %userDefined = (
7181
7061
  Name => 'MediaInfo',
7182
7062
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::MediaInfo' },
7183
7063
  },
7064
+ elng => 'ExtendedLanguageTag', #29 (NC) eg. "zh-CN"
7184
7065
  );
7185
7066
 
7186
7067
  # MP4 media header box (ref 5)
@@ -7324,10 +7205,10 @@ my %userDefined = (
7324
7205
  ProcessProc => \&ProcessSampleDesc,
7325
7206
  },
7326
7207
  },{
7327
- Name => 'VideoSampleDesc',
7208
+ Name => 'VisualSampleDesc',
7328
7209
  Condition => '$$self{HandlerType} and $$self{HandlerType} eq "vide"',
7329
7210
  SubDirectory => {
7330
- TagTable => 'Image::ExifTool::QuickTime::ImageDesc',
7211
+ TagTable => 'Image::ExifTool::QuickTime::VisualSampleDesc',
7331
7212
  ProcessProc => \&ProcessSampleDesc,
7332
7213
  },
7333
7214
  },{
@@ -7463,6 +7344,7 @@ my %userDefined = (
7463
7344
  # see this link for print conversions (not complete):
7464
7345
  # https://github.com/yannickcr/brooser/blob/master/php/librairies/getid3/module.audio-video.quicktime.php
7465
7346
  },
7347
+ # 14 - int16u DataReferenceIndex
7466
7348
  20 => { #PH
7467
7349
  Name => 'AudioVendorID',
7468
7350
  Condition => '$$self{AudioFormat} ne "mp4s"',
@@ -7527,29 +7409,277 @@ my %userDefined = (
7527
7409
  # dapa - ? 203 bytes
7528
7410
  );
7529
7411
 
7530
- # AMR decode config box (ref 3)
7531
- %Image::ExifTool::QuickTime::DecodeConfig = (
7532
- PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
7533
- GROUPS => { 2 => 'Audio' },
7534
- 0 => {
7535
- Name => 'EncoderVendor',
7536
- Format => 'undef[4]',
7412
+ # video and image sample description data block
7413
+ %Image::ExifTool::QuickTime::VisualSampleDesc = (
7414
+ PROCESS_PROC => \&ProcessHybrid,
7415
+ VARS => { ID_LABEL => 'ID/Index' },
7416
+ GROUPS => { 2 => 'Image' },
7417
+ FORMAT => 'int16u',
7418
+ 2 => {
7419
+ Name => 'CompressorID',
7420
+ Format => 'string[4]',
7421
+ # not very useful since this isn't a complete list and name is given below
7422
+ # # ref http://developer.apple.com/mac/library/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
7423
+ # PrintConv => {
7424
+ # cvid => 'Cinepak',
7425
+ # jpeg => 'JPEG',
7426
+ # 'smc '=> 'Graphics',
7427
+ # 'rle '=> 'Animation',
7428
+ # rpza => 'Apple Video',
7429
+ # kpcd => 'Kodak Photo CD',
7430
+ # 'png '=> 'Portable Network Graphics',
7431
+ # mjpa => 'Motion-JPEG (format A)',
7432
+ # mjpb => 'Motion-JPEG (format B)',
7433
+ # SVQ1 => 'Sorenson video, version 1',
7434
+ # SVQ3 => 'Sorenson video, version 3',
7435
+ # mp4v => 'MPEG-4 video',
7436
+ # 'dvc '=> 'NTSC DV-25 video',
7437
+ # dvcp => 'PAL DV-25 video',
7438
+ # 'gif '=> 'Compuserve Graphics Interchange Format',
7439
+ # h263 => 'H.263 video',
7440
+ # tiff => 'Tagged Image File Format',
7441
+ # 'raw '=> 'Uncompressed RGB',
7442
+ # '2vuY'=> "Uncompressed Y'CbCr, 3x8-bit 4:2:2 (2vuY)",
7443
+ # 'yuv2'=> "Uncompressed Y'CbCr, 3x8-bit 4:2:2 (yuv2)",
7444
+ # v308 => "Uncompressed Y'CbCr, 8-bit 4:4:4",
7445
+ # v408 => "Uncompressed Y'CbCr, 8-bit 4:4:4:4",
7446
+ # v216 => "Uncompressed Y'CbCr, 10, 12, 14, or 16-bit 4:2:2",
7447
+ # v410 => "Uncompressed Y'CbCr, 10-bit 4:4:4",
7448
+ # v210 => "Uncompressed Y'CbCr, 10-bit 4:2:2",
7449
+ # hvc1 => 'HEVC', #PH
7450
+ # },
7537
7451
  },
7538
- 4 => 'EncoderVersion',
7539
- # 5 - int16u - packet modes
7540
- # 7 - int8u - number of packet mode changes
7541
- # 8 - int8u - bytes per packet
7542
- );
7543
-
7544
- %Image::ExifTool::QuickTime::ProtectionInfo = (
7545
- PROCESS_PROC => \&ProcessMOV,
7546
- GROUPS => { 2 => 'Audio' },
7547
- NOTES => 'Child atoms found in "sinf" and/or "pinf" atoms.',
7548
- frma => 'OriginalFormat',
7549
- # imif - IPMP information
7550
- schm => {
7551
- Name => 'SchemeType',
7552
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::SchemeType' },
7452
+ # 7 - int16u DataReferenceIndex
7453
+ 10 => {
7454
+ Name => 'VendorID',
7455
+ Format => 'string[4]',
7456
+ RawConv => 'length $val ? $val : undef',
7457
+ PrintConv => \%vendorID,
7458
+ SeparateTable => 'VendorID',
7459
+ },
7460
+ # 14 - ("Quality" in QuickTime docs) ??
7461
+ 16 => 'SourceImageWidth',
7462
+ 17 => 'SourceImageHeight',
7463
+ 18 => { Name => 'XResolution', Format => 'fixed32u' },
7464
+ 20 => { Name => 'YResolution', Format => 'fixed32u' },
7465
+ # 24 => 'FrameCount', # always 1 (what good is this?)
7466
+ 25 => {
7467
+ Name => 'CompressorName',
7468
+ Format => 'string[32]',
7469
+ # (sometimes this is a Pascal string, and sometimes it is a C string)
7470
+ RawConv => q{
7471
+ $val=substr($val,1,ord($1)) if $val=~/^([\0-\x1f])/ and ord($1)<length($val);
7472
+ length $val ? $val : undef;
7473
+ },
7474
+ },
7475
+ 41 => 'BitDepth',
7476
+ #
7477
+ # Observed offsets for child atoms of various CompressorID types:
7478
+ #
7479
+ # CompressorID Offset Child atoms
7480
+ # ----------- ------ ----------------
7481
+ # avc1 86 avcC, btrt, colr, pasp, fiel, clap, svcC
7482
+ # mp4v 86 esds, pasp
7483
+ # s263 86 d263
7484
+ #
7485
+ btrt => {
7486
+ Name => 'BitrateInfo',
7487
+ SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::Bitrate' },
7488
+ },
7489
+ # Reference for fiel, colr, pasp, clap:
7490
+ # https://developer.apple.com/library/mac/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG9
7491
+ fiel => {
7492
+ Name => 'VideoFieldOrder',
7493
+ ValueConv => 'join(" ", unpack("C*",$val))',
7494
+ PrintConv => [{
7495
+ 1 => 'Progressive',
7496
+ 2 => '2:1 Interlaced',
7497
+ }],
7498
+ },
7499
+ colr => {
7500
+ Name => 'ColorRepresentation',
7501
+ SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::ColorRep' },
7502
+ },
7503
+ pasp => {
7504
+ Name => 'PixelAspectRatio',
7505
+ ValueConv => 'join(":", unpack("N*",$val))',
7506
+ },
7507
+ clap => {
7508
+ Name => 'CleanAperture',
7509
+ SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::CleanAperture' },
7510
+ },
7511
+ avcC => {
7512
+ # (see http://thompsonng.blogspot.ca/2010/11/mp4-file-format-part-2.html)
7513
+ Name => 'AVCConfiguration',
7514
+ Unknown => 1,
7515
+ Binary => 1,
7516
+ },
7517
+ JPEG => { # (found in CR3 images; used as a flag to identify JpgFromRaw 'vide' stream)
7518
+ Name => 'JPEGInfo',
7519
+ # (4 bytes all zero)
7520
+ Unknown => 1,
7521
+ Binary => 1,
7522
+ },
7523
+ # hvcC - HEVC configuration
7524
+ # svcC - 7 bytes: 00 00 00 00 ff e0 00
7525
+ # esds - elementary stream descriptor
7526
+ # d263
7527
+ gama => { Name => 'Gamma', Format => 'fixed32u' },
7528
+ # mjqt - default quantization table for MJPEG
7529
+ # mjht - default Huffman table for MJPEG
7530
+ # csgm ? (seen in hevc video)
7531
+ CMP1 => { # Canon CR3
7532
+ Name => 'CMP1',
7533
+ SubDirectory => { TagTable => 'Image::ExifTool::Canon::CMP1' },
7534
+ },
7535
+ CDI1 => { # Canon CR3
7536
+ Name => 'CDI1',
7537
+ SubDirectory => {
7538
+ TagTable => 'Image::ExifTool::Canon::CDI1',
7539
+ Start => 4,
7540
+ },
7541
+ },
7542
+ # JPEG - 4 bytes all 0 (Canon CR3)
7543
+ # free - (Canon CR3)
7544
+ #
7545
+ # spherical video v2 stuff (untested)
7546
+ #
7547
+ st3d => {
7548
+ Name => 'Stereoscopic3D',
7549
+ Format => 'int8u',
7550
+ ValueConv => '$val =~ s/.* //; $val', # (remove leading version/flags bytes?)
7551
+ PrintConv => {
7552
+ 0 => 'Monoscopic',
7553
+ 1 => 'Stereoscopic Top-Bottom',
7554
+ 2 => 'Stereoscopic Left-Right',
7555
+ 3 => 'Stereoscopic Stereo-Custom',
7556
+ 4 => 'Stereoscopic Right-Left',
7557
+ },
7558
+ },
7559
+ sv3d => {
7560
+ Name => 'SphericalVideo',
7561
+ SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::sv3d' },
7562
+ },
7563
+ );
7564
+
7565
+ # MP4 hint sample description box (ref 5)
7566
+ # (ref https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-SW1)
7567
+ %Image::ExifTool::QuickTime::HintSampleDesc = (
7568
+ PROCESS_PROC => \&ProcessHybrid,
7569
+ VARS => { ID_LABEL => 'ID/Index' },
7570
+ NOTES => 'MP4 hint sample description.',
7571
+ 4 => { Name => 'HintFormat', Format => 'undef[4]' },
7572
+ # 14 - int16u DataReferenceIndex
7573
+ 16 => { Name => 'HintTrackVersion', Format => 'int16u' },
7574
+ # 18 - int16u LastCompatibleHintTrackVersion
7575
+ 20 => { Name => 'MaxPacketSize', Format => 'int32u' },
7576
+ #
7577
+ # Observed offsets for child atoms of various HintFormat types:
7578
+ #
7579
+ # HintFormat Offset Child atoms
7580
+ # ----------- ------ ----------------
7581
+ # "rtp " 24 tims
7582
+ #
7583
+ tims => { Name => 'RTPTimeScale', Format => 'int32u' },
7584
+ tsro => { Name => 'TimestampRandomOffset', Format => 'int32u' },
7585
+ snro => { Name => 'SequenceNumberRandomOffset', Format => 'int32u' },
7586
+ );
7587
+
7588
+ # MP4 metadata sample description box
7589
+ %Image::ExifTool::QuickTime::MetaSampleDesc = (
7590
+ PROCESS_PROC => \&ProcessHybrid,
7591
+ NOTES => 'MP4 metadata sample description.',
7592
+ 4 => {
7593
+ Name => 'MetaFormat',
7594
+ Format => 'undef[4]',
7595
+ RawConv => '$$self{MetaFormat} = $val',
7596
+ },
7597
+ 8 => { # starts at 8 for MetaFormat eq 'camm', and 17 for 'mett'
7598
+ Name => 'MetaType',
7599
+ Format => 'undef[$size-8]',
7600
+ # may start at various locations!
7601
+ RawConv => '$$self{MetaType} = ($val=~/(application[^\0]+)/ ? $1 : undef)',
7602
+ },
7603
+ #
7604
+ # Observed offsets for child atoms of various MetaFormat types:
7605
+ #
7606
+ # MetaFormat Offset Child atoms
7607
+ # ----------- ------ ----------------
7608
+ # mebx 24 keys,btrt,lidp,lidl
7609
+ # fdsc - -
7610
+ # gpmd - -
7611
+ # rtmd - -
7612
+ # CTMD - -
7613
+ #
7614
+ 'keys' => { #PH (iPhone7+ hevc)
7615
+ Name => 'Keys',
7616
+ SubDirectory => {
7617
+ TagTable => 'Image::ExifTool::QuickTime::Keys',
7618
+ ProcessProc => \&ProcessMetaKeys,
7619
+ },
7620
+ },
7621
+ btrt => {
7622
+ Name => 'BitrateInfo',
7623
+ SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::Bitrate' },
7624
+ },
7625
+ );
7626
+
7627
+ # MP4 generic sample description box
7628
+ %Image::ExifTool::QuickTime::OtherSampleDesc = (
7629
+ PROCESS_PROC => \&ProcessHybrid,
7630
+ 4 => {
7631
+ Name => 'OtherFormat',
7632
+ Format => 'undef[4]',
7633
+ RawConv => '$$self{MetaFormat} = $val', # (yes, use MetaFormat for this too)
7634
+ },
7635
+ 24 => {
7636
+ Condition => '$$self{MetaFormat} eq "tmcd"',
7637
+ Name => 'PlaybackFrameRate', # (may differ from recorded FrameRate eg. ../pics/FujiFilmX-H1.mov)
7638
+ Format => 'rational64u',
7639
+ },
7640
+ #
7641
+ # Observed offsets for child atoms of various OtherFormat types:
7642
+ #
7643
+ # OtherFormat Offset Child atoms
7644
+ # ----------- ------ ----------------
7645
+ # avc1 86 avcC
7646
+ # mp4a 36 esds
7647
+ # mp4s 16 esds
7648
+ # tmcd 34 name
7649
+ # data - -
7650
+ #
7651
+ ftab => { Name => 'FontTable', Format => 'undef', ValueConv => 'substr($val, 5)' },
7652
+ name => { Name => 'OtherName', Format => 'undef', ValueConv => 'substr($val, 4)' },
7653
+ mrlh => { Name => 'MarlinHeader', SubDirectory => { TagTable => 'Image::ExifTool::GM::mrlh' } },
7654
+ mrlv => { Name => 'MarlinValues', SubDirectory => { TagTable => 'Image::ExifTool::GM::mrlv' } },
7655
+ mrld => { Name => 'MarlinDictionary',SubDirectory => { TagTable => 'Image::ExifTool::GM::mrld' } },
7656
+ # tbox - text box (ref 29)
7657
+ # styl - subtitle style (ref 29)
7658
+ );
7659
+
7660
+ # AMR decode config box (ref 3)
7661
+ %Image::ExifTool::QuickTime::DecodeConfig = (
7662
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
7663
+ GROUPS => { 2 => 'Audio' },
7664
+ 0 => {
7665
+ Name => 'EncoderVendor',
7666
+ Format => 'undef[4]',
7667
+ },
7668
+ 4 => 'EncoderVersion',
7669
+ # 5 - int16u - packet modes
7670
+ # 7 - int8u - number of packet mode changes
7671
+ # 8 - int8u - bytes per packet
7672
+ );
7673
+
7674
+ %Image::ExifTool::QuickTime::ProtectionInfo = (
7675
+ PROCESS_PROC => \&ProcessMOV,
7676
+ GROUPS => { 2 => 'Audio' },
7677
+ NOTES => 'Child atoms found in "sinf" and/or "pinf" atoms.',
7678
+ frma => 'OriginalFormat',
7679
+ # imif - IPMP information
7680
+ schm => {
7681
+ Name => 'SchemeType',
7682
+ SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::SchemeType' },
7553
7683
  },
7554
7684
  schi => {
7555
7685
  Name => 'SchemeInfo',
@@ -7950,99 +8080,6 @@ my %userDefined = (
7950
8080
  # hi32 - seen "00 00 00 04"
7951
8081
  );
7952
8082
 
7953
- # MP4 hint sample description box (ref 5)
7954
- # (ref https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-SW1)
7955
- %Image::ExifTool::QuickTime::HintSampleDesc = (
7956
- PROCESS_PROC => \&ProcessHybrid,
7957
- VARS => { ID_LABEL => 'ID/Index' },
7958
- NOTES => 'MP4 hint sample description.',
7959
- 4 => { Name => 'HintFormat', Format => 'undef[4]' },
7960
- # 14 - int16u DataReferenceIndex
7961
- 16 => { Name => 'HintTrackVersion', Format => 'int16u' },
7962
- # 18 - int16u LastCompatibleHintTrackVersion
7963
- 20 => { Name => 'MaxPacketSize', Format => 'int32u' },
7964
- #
7965
- # Observed offsets for child atoms of various HintFormat types:
7966
- #
7967
- # HintFormat Offset Child atoms
7968
- # ----------- ------ ----------------
7969
- # "rtp " 24 tims
7970
- #
7971
- tims => { Name => 'RTPTimeScale', Format => 'int32u' },
7972
- tsro => { Name => 'TimestampRandomOffset', Format => 'int32u' },
7973
- snro => { Name => 'SequenceNumberRandomOffset', Format => 'int32u' },
7974
- );
7975
-
7976
- # MP4 metadata sample description box
7977
- %Image::ExifTool::QuickTime::MetaSampleDesc = (
7978
- PROCESS_PROC => \&ProcessHybrid,
7979
- NOTES => 'MP4 metadata sample description.',
7980
- 4 => {
7981
- Name => 'MetaFormat',
7982
- Format => 'undef[4]',
7983
- RawConv => '$$self{MetaFormat} = $val',
7984
- },
7985
- 8 => { # starts at 8 for MetaFormat eq 'camm', and 17 for 'mett'
7986
- Name => 'MetaType',
7987
- Format => 'undef[$size-8]',
7988
- # may start at various locations!
7989
- RawConv => '$$self{MetaType} = ($val=~/(application[^\0]+)/ ? $1 : undef)',
7990
- },
7991
- #
7992
- # Observed offsets for child atoms of various MetaFormat types:
7993
- #
7994
- # MetaFormat Offset Child atoms
7995
- # ----------- ------ ----------------
7996
- # mebx 24 keys,btrt,lidp,lidl
7997
- # fdsc - -
7998
- # gpmd - -
7999
- # rtmd - -
8000
- # CTMD - -
8001
- #
8002
- 'keys' => { #PH (iPhone7+ hevc)
8003
- Name => 'Keys',
8004
- SubDirectory => {
8005
- TagTable => 'Image::ExifTool::QuickTime::Keys',
8006
- ProcessProc => \&ProcessMetaKeys,
8007
- },
8008
- },
8009
- btrt => {
8010
- Name => 'BitrateInfo',
8011
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::Bitrate' },
8012
- },
8013
- );
8014
-
8015
- # MP4 generic sample description box
8016
- %Image::ExifTool::QuickTime::OtherSampleDesc = (
8017
- PROCESS_PROC => \&ProcessHybrid,
8018
- 4 => {
8019
- Name => 'OtherFormat',
8020
- Format => 'undef[4]',
8021
- RawConv => '$$self{MetaFormat} = $val', # (yes, use MetaFormat for this too)
8022
- },
8023
- 24 => {
8024
- Condition => '$$self{MetaFormat} eq "tmcd"',
8025
- Name => 'PlaybackFrameRate', # (may differ from recorded FrameRate eg. ../pics/FujiFilmX-H1.mov)
8026
- Format => 'rational64u',
8027
- },
8028
- #
8029
- # Observed offsets for child atoms of various OtherFormat types:
8030
- #
8031
- # OtherFormat Offset Child atoms
8032
- # ----------- ------ ----------------
8033
- # avc1 86 avcC
8034
- # mp4a 36 esds
8035
- # mp4s 16 esds
8036
- # tmcd 34 name
8037
- # data - -
8038
- #
8039
- ftab => { Name => 'FontTable', Format => 'undef', ValueConv => 'substr($val, 5)' },
8040
- name => { Name => 'OtherName', Format => 'undef', ValueConv => 'substr($val, 4)' },
8041
- mrlh => { Name => 'MarlinHeader', SubDirectory => { TagTable => 'Image::ExifTool::GM::mrlh' } },
8042
- mrlv => { Name => 'MarlinValues', SubDirectory => { TagTable => 'Image::ExifTool::GM::mrlv' } },
8043
- mrld => { Name => 'MarlinDictionary',SubDirectory => { TagTable => 'Image::ExifTool::GM::mrld' } },
8044
- );
8045
-
8046
8083
  # MP4 data information box (ref 5)
8047
8084
  %Image::ExifTool::QuickTime::DataInfo = (
8048
8085
  PROCESS_PROC => \&ProcessMOV,
@@ -8072,6 +8109,7 @@ my %userDefined = (
8072
8109
  Name => 'TimeCode',
8073
8110
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::TimeCode' },
8074
8111
  },
8112
+ # dbgi - used by DJI - seen "\0\0\0\0"
8075
8113
  );
8076
8114
 
8077
8115
  # TimeCode header
@@ -8194,6 +8232,11 @@ my %userDefined = (
8194
8232
  Name => 'HandlerType',
8195
8233
  Format => 'undef[4]',
8196
8234
  RawConv => q{
8235
+ unless ($$self{HasHandler}{$val} or not $Image::ExifTool::QuickTime::eeBox{$val}
8236
+ or $val eq 'vide' or $$self{OPTIONS}{ExtractEmbedded} or $$self{OPTIONS}{Validate})
8237
+ {
8238
+ Image::ExifTool::QuickTime::EEWarn($self);
8239
+ }
8197
8240
  $$self{HandlerType} = $val unless $val eq 'alis' or $val eq 'url ';
8198
8241
  $$self{MediaType} = $val if @{$$self{PATH}} > 1 and $$self{PATH}[-2] eq 'Media';
8199
8242
  $$self{HasHandler}{$val} = 1; # remember all our handlers
@@ -9153,7 +9196,8 @@ sub HandleItemInfo($)
9153
9196
  $et->VPrint(0, "$$et{INDENT}Item $id) '${type}' ($len bytes$enc)\n");
9154
9197
  }
9155
9198
  # get ExifTool name for this item
9156
- my $name = { Exif => 'EXIF', 'application/rdf+xml' => 'XMP', jpeg => 'PreviewImage' }->{$type} || '';
9199
+ my $name = { Exif => 'EXIF', 'application/rdf+xml' => 'XMP', jpeg => 'PreviewImage',
9200
+ 'uri ' => 'PLIST' }->{$type} || '';
9157
9201
  my ($warn, $extent);
9158
9202
  if ($$item{ContentEncoding}) {
9159
9203
  if ($$item{ContentEncoding} ne 'deflate') {
@@ -9246,7 +9290,6 @@ sub HandleItemInfo($)
9246
9290
  if ($name eq 'EXIF' and length $buff >= 4) {
9247
9291
  if ($buff =~ /^(MM\0\x2a|II\x2a\0)/) {
9248
9292
  $et->Warn('Missing Exif header');
9249
- $start = 0;
9250
9293
  } elsif ($buff =~ /^Exif\0\0/) {
9251
9294
  # (haven't seen this yet, but it is just a matter of time
9252
9295
  # until someone screws it up like this)
@@ -9281,10 +9324,14 @@ sub HandleItemInfo($)
9281
9324
  }
9282
9325
  $et->FoundTag($type => $buff);
9283
9326
  next;
9327
+ } elsif ($name eq 'PLIST') {
9328
+ # extract PLIST information from 'uri ' if available
9329
+ next unless $buff =~ /^bplist00/;
9330
+ $subTable = GetTagTable('Image::ExifTool::PLIST::Main');
9284
9331
  } else {
9285
- $start = 0;
9286
9332
  $subTable = GetTagTable('Image::ExifTool::XMP::Main');
9287
9333
  }
9334
+ $start or $start = 0;
9288
9335
  my %dirInfo = (
9289
9336
  DataPt => \$buff,
9290
9337
  DataLen => length $buff,
@@ -9796,7 +9843,7 @@ sub ProcessMOV($$;$)
9796
9843
  }
9797
9844
  $$raf{NoBuffer} = 1 if $fast; # disable buffering in FastScan mode
9798
9845
 
9799
- my $ee = $$et{OPTIONS}{ExtractEmbedded};
9846
+ my $ee = $$et{OPTIONS}{ExtractEmbedded} || 0;
9800
9847
  my $hash = $$et{ImageDataHash};
9801
9848
  if ($ee or $hash) {
9802
9849
  $unkOpt = $$et{OPTIONS}{Unknown};
@@ -9870,7 +9917,7 @@ sub ProcessMOV($$;$)
9870
9917
  }
9871
9918
  if ($isUserData and $$et{SET_GROUP1}) {
9872
9919
  my $tagInfo = $et->GetTagInfo($tagTablePtr, $tag);
9873
- unless ($$tagInfo{SubDirectory}) {
9920
+ unless ($tagInfo and $$tagInfo{SubDirectory}) {
9874
9921
  # add track name to UserData tags inside tracks
9875
9922
  $tag = $$et{SET_GROUP1} . $tag;
9876
9923
  if (not $$tagTablePtr{$tag} and $tagInfo) {
@@ -9893,10 +9940,8 @@ sub ProcessMOV($$;$)
9893
9940
  $eeTag = 1;
9894
9941
  $$et{OPTIONS}{Unknown} = 1; # temporarily enable "Unknown" option
9895
9942
  }
9896
- } elsif ($handlerType ne 'vide' and not $$et{OPTIONS}{Validate}) {
9897
- EEWarn($et);
9898
9943
  }
9899
- } elsif ($ee and $ee > 1 and $eeBox2{$handlerType} and $eeBox2{$handlerType}{$tag}) {
9944
+ } elsif ($ee > 1 and $eeBox2{$handlerType} and $eeBox2{$handlerType}{$tag}) {
9900
9945
  $eeTag = 1;
9901
9946
  $$et{OPTIONS}{Unknown} = 1;
9902
9947
  } elsif ($hash and $hashBox{$handlerType} and $hashBox{$handlerType}{$tag}) {
@@ -9978,17 +10023,19 @@ sub ProcessMOV($$;$)
9978
10023
  my $items = $$et{ItemInfo};
9979
10024
  my ($id, $prop, $docNum, $lowest);
9980
10025
  my $primary = $$et{PrimaryItem} || 0;
10026
+ my $pitem = $$items{$primary} || { };
10027
+ $$pitem{RefersTo} or $$pitem{RefersTo} = { };
9981
10028
  ItemID: foreach $id (reverse sort { $a <=> $b } keys %$items) {
9982
10029
  next unless $$items{$id}{Association};
9983
10030
  my $item = $$items{$id};
9984
10031
  foreach $prop (@{$$item{Association}}) {
9985
10032
  next unless $prop == $index;
9986
- if ($id == $primary or (not $dontInherit{$tag} and
9987
- (($$item{RefersTo} and $$item{RefersTo}{$primary}) or
9988
- # hack: assume Item 1 is from the main image (eg. hvc1 data)
9989
- # to hack the case where the primary item (ie. main image)
9990
- # doesn't directly reference this property
9991
- (not $$item{RefersTo} and $id == 1))))
10033
+ my $dont = $dontInherit{$tag} || 0;
10034
+ if ($id == $primary or (not $dont and
10035
+ ($$item{RefersTo} and $$item{RefersTo}{$primary})) or
10036
+ # special case to assume this property belongs to the primary
10037
+ # image if it belongs to an item referred to by the primary
10038
+ ($dont != 1 and $$pitem{RefersTo}{$id}))
9992
10039
  {
9993
10040
  # this is associated with the primary item or an item describing
9994
10041
  # the primary item, so consider this part of the main document