exiftool-vendored.exe 12.69.0 → 12.72.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 (43) hide show
  1. package/bin/exiftool_files/Changes +78 -12
  2. package/bin/exiftool_files/README +10 -10
  3. package/bin/exiftool_files/exiftool.pl +32 -27
  4. package/bin/exiftool_files/lib/Image/ExifTool/AAC.pm +175 -0
  5. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +2 -1
  6. package/bin/exiftool_files/lib/Image/ExifTool/CBOR.pm +18 -2
  7. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +82 -20
  8. package/bin/exiftool_files/lib/Image/ExifTool/DJI.pm +3 -2
  9. package/bin/exiftool_files/lib/Image/ExifTool/EXE.pm +54 -6
  10. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +111 -11
  11. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +145 -20
  12. package/bin/exiftool_files/lib/Image/ExifTool/GIF.pm +5 -1
  13. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +16 -1
  14. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +76 -10
  15. package/bin/exiftool_files/lib/Image/ExifTool/InDesign.pm +1 -1
  16. package/bin/exiftool_files/lib/Image/ExifTool/JPEG.pm +1 -1
  17. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +4 -1
  18. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +30 -15
  19. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +21 -16
  20. package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +2 -2
  21. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +203 -102
  22. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +7 -1
  23. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +8 -13
  24. package/bin/exiftool_files/lib/Image/ExifTool/Panasonic.pm +10 -1
  25. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +15 -6
  26. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +59 -13
  27. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +59 -11
  28. package/bin/exiftool_files/lib/Image/ExifTool/README +7 -2
  29. package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +53 -9
  30. package/bin/exiftool_files/lib/Image/ExifTool/Ricoh.pm +109 -1
  31. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +3 -2
  32. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +177 -37
  33. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +6961 -6856
  34. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +580 -344
  35. package/bin/exiftool_files/lib/Image/ExifTool/Text.pm +4 -5
  36. package/bin/exiftool_files/lib/Image/ExifTool/Validate.pm +6 -5
  37. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +19 -4
  38. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +1 -0
  39. package/bin/exiftool_files/lib/Image/ExifTool/WriteRIFF.pl +9 -3
  40. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +102 -50
  41. package/bin/exiftool_files/lib/Image/ExifTool.pm +74 -36
  42. package/bin/exiftool_files/lib/Image/ExifTool.pod +28 -17
  43. package/package.json +5 -4
@@ -4,9 +4,72 @@ ExifTool Version History
4
4
 
5
5
  RSS feed: https://exiftool.org/rss.xml
6
6
 
7
- Note: The most recent production release is Version 12.60. (Other versions are
7
+ Note: The most recent production release is Version 12.70. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Dec. 29, 2023 - Version 12.72
11
+
12
+ - Added read support for AAC audio files
13
+ - Added a new QuickTime Keys Android tag
14
+ - Added a number of new values for some Ricoh GR III tags
15
+ - Decode timed metadata from Intsa360 Ace Pro MP4 videos
16
+ - Decode GPSDateTime milliseconds in timed Insta360 metadata
17
+ - Decode timed metadata from INNOV K5 TS videos
18
+ - Decode a number of new GoPro timed-metadata tags
19
+ - Decode a few new Xiaomi EXIF tags
20
+ - Fixed writing of JPG/ARW images from some newer Sony models to preserve
21
+ HiddenData
22
+
23
+ Dec. 21, 2023 - Version 12.71
24
+
25
+ - Added a warning if there was an error reading an alternate file with the
26
+ -fileNUM option
27
+ - Added the ability to write QuickTime Keys:Encoder
28
+ - Added a few new Canon LensType values (thanks Norbert Wasser)
29
+ - Added a new, obscure EXIF tag (thanks Neal Krawetz)
30
+ - Decode real-time metadata from Ricoh Theta videos
31
+ - Decode SpecularWhiteLevel for more Canon models (github #232)
32
+ - Decode Canon DualPixelRaw tag (thanks John Moyer)
33
+ - Decode a few new Nikon tags (thanks Warren Hatch)
34
+ - Decode more FujiFilm M-RAW tags (thanks Greybeard)
35
+ - Improved generation of tag names for some JSON tag ID's containing colons
36
+ - Fixed "Undefined subroutine" error when writing makernotes as a block
37
+ - Fixed missing ID in family 7 group name for ID3 tags which are not valid for
38
+ the specified ID3 version
39
+ - Fixed bug where some tags from alternate files (with the -fileNUM option)
40
+ could show up as "not defined" when used in expressions even though they did
41
+ exist
42
+ - API Changes:
43
+ - Added NoMandatory option
44
+
45
+ Nov. 19, 2023 - Version 12.70 (production release) - "20th Anniversary"
46
+
47
+ - This marks the 20th anniversary of the initial ExifTool release!
48
+ - Added ability to read/delete C2PA CAI JUMBF metadata from TIFF-based images
49
+ (eg. DNG), QuickTime-based files (eg. MP4) and WebP images, and read JUMBF
50
+ from other RIFF-based files (eg. WAV, AVI), GIF images and ID3v2 metadata
51
+ - Added read/write support for JPH images
52
+ - Added ability to read Leica Q3 maker notes
53
+ - Added ability to recognize and write FujiFilm M-RAW RAF images (multiple raw
54
+ images in a single file) and the ability to read preview-less RAF images
55
+ - Added support for reading a number of obscure Microsoft EXIF tags
56
+ - Added a few new Sony lenses and support for the ILCE-9M3 (thanks Jos Roost)
57
+ - Added a couple of new Panasonic Leica lenses
58
+ - Added a couple of new Canon RF lenses (thanks Norbert Wasser)
59
+ - Added a number of new CPUType values for ELF executables
60
+ - Added some new Olympus CameraType values
61
+ - Decode a few more ID3v2.2 tags (github #142)
62
+ - Decode a few new Canon G5X Mark II tags (thanks Martin B.)
63
+ - Decode WB_RGGBLevels for a few more Nikon cameras
64
+ - Extract information from FujiFilm M-RAW header
65
+ - Improved decoding of a few Nikon Z tags (thanks Warren Hatch)
66
+ - Marked misspelt XMP-drone-dji:GPSLongtitude tag to Avoid when writing
67
+ - Changed RIFF MaxDataRate conversion to use SI prefixes by default
68
+ - Fixed decoding of unknown ColorBalance information for some Nikon models
69
+ - Fixed an incorrect Nikon Z LensID
70
+ - API Changes:
71
+ - Added ByteUnit option
72
+
10
73
  Oct. 26, 2023 - Version 12.69
11
74
 
12
75
  - Added support for DNG version 1.7.0.0
@@ -19,6 +82,11 @@ Oct. 26, 2023 - Version 12.69
19
82
  Hasselblad programmers (wrong IFD count for some values)
20
83
  - Patched WebP reader to be more tolerant of the mess made by incompetent
21
84
  Google programmers (EXIF with wrong header and XMP with wrong ID)
85
+ - Fixed writing of MakerNotes as a block to CR3 images (now properly stored in
86
+ the CMT3 chunk instead of the ExifIFD) and added ability to delete them from
87
+ the ExifIFD of CR3 images
88
+ - Fixed problem which could cause runtime error when copying MakerNotes from a
89
+ file that contains multiple maker note blocks
22
90
  - Fixed problem which could cause "use of uninitialized variable" warnings
23
91
  when reading images from some Nikon cameras
24
92
  - Fixed List type for new XMP-photomech:CreatorIdentity tag
@@ -26,7 +94,7 @@ Oct. 26, 2023 - Version 12.69
26
94
  Oct. 16, 2023 - Version 12.68
27
95
 
28
96
  - Added preliminary read support for XISF images
29
- - Added the ability to delete JUMBF metadata from PNG images
97
+ - Added the ability to delete CAI JUMBF metadata from PNG images
30
98
  - Added support for writing Canon burst-roll CR3 images
31
99
  - Added a new Nikon Z9 SubjectDetection value, and improved Zf support (thanks
32
100
  Warren Hatch)
@@ -38,7 +106,7 @@ Oct. 16, 2023 - Version 12.68
38
106
  - Added a new Canon LensType
39
107
  - Support decimal values for FujiFilm ShadowTone and HighlightTone tags
40
108
  - Decode some new Sony tags (thanks Jos Roost)
41
- - Decode ShutterCount for Canon EOS R6 (thanks gamin)
109
+ - Decode ShutterCount for Canon EOS R6 (thanks Martin B.)
42
110
  - Decode QuickTime VideoFullRangeFlag
43
111
  - Decode JPGCompression for the Nikon D3S
44
112
  - Enhanced -geotag feature to allow writing QuickTime:GPSCoordinates
@@ -193,8 +261,6 @@ Apr. 5, 2023 - Version 12.60 (production release)
193
261
  - Fixed problem where setting the Geotime value didn't work when using an
194
262
  advanced-formatting expression containing a greater-than symbol (>)
195
263
 
196
- History of older versions (back to Nov. 19, 2003 - Version 1.00) -->
197
-
198
264
  Mar. 28, 2023 - Version 12.59
199
265
 
200
266
  - COMPATIBILITY WARNING: Changed the calculated ImageDataMD5 for JPEG images
@@ -324,7 +390,7 @@ Dec. 6, 2022 - Version 12.52
324
390
  Nov. 21, 2022 - Version 12.51
325
391
 
326
392
  - Added a new Olympus LensType (thanks Herb)
327
- - Extract C2PA JUMBF metadata from PNG images and extract C2PA Salt values
393
+ - Extract C2PA CAI JUMBF metadata from PNG images and extract C2PA Salt values
328
394
  - Decode NikonSettings for Z9 firmware 3.0 (thanks Warren Hatch)
329
395
  - Decode additional camm metadata from Insta360 Pro2 MP4 videos
330
396
  - Improved Verbose output when writing Composite tags to add a "+" sign to
@@ -707,8 +773,8 @@ Oct. 16, 2021 - Version 12.33
707
773
 
708
774
  Sept. 30, 2021 - Version 12.32
709
775
 
710
- - Added support for CBOR-format metadata in JUMBF (note that JUMBF support is
711
- still experimental)
776
+ - Added support for CBOR-format metadata in CAI JUMBF (note that JUMBF support
777
+ is still experimental)
712
778
  - Added a new Nikon LensID
713
779
  - Added a new Pentax LensType
714
780
  - Decode timed GPS for two more dashcam formats
@@ -767,7 +833,7 @@ July 9, 2021 - Version 12.29
767
833
  - Improved a QuickTime "File format error" message to be more meaningful, and
768
834
  made it a minor error
769
835
  - Changed PNG writer to add EXIF before IDAT
770
- - Some changes the way JUMBF metadata is handled
836
+ - Some changes the way CAI JUMBF metadata is handled
771
837
  - Patched to read timed GPS from a different type of INSV videos
772
838
  - Patched a security issue
773
839
  - Fixed problem where ExifTool could hang when processing mebx timed metadata
@@ -843,7 +909,7 @@ Apr. 13, 2021 - Version 12.24
843
909
  - Decode a few new Panasonic and FujiFilm tags (thanks LibRaw and Greybeard)
844
910
  - Updated acdsee.config in distribution (thanks StarGeek)
845
911
  - Recognize AutoCAD DXF files
846
- - More work on experimental JUMBF read support
912
+ - More work on experimental CAI JUMBF read support
847
913
  - More work on experimental JPEG XL read/write support
848
914
  - Patched security vulnerability in DjVu reader
849
915
 
@@ -851,8 +917,8 @@ Apr. 1, 2021 - Version 12.23
851
917
 
852
918
  - Added support for Olympus ORI files
853
919
  - Added experimental read/write support for JPEG XL images
854
- - Added experimental read support for JUMBF metadata in JPEG and Jpeg2000
855
- images
920
+ - Added experimental read support for CAI (Content Authenticity Initiative)
921
+ JUMBF-format metadata in JPEG and Jpeg2000 images
856
922
  - Added built-in support for parsing GPS track from Denver ACG-8050 videos
857
923
  with the -ee option
858
924
  - Added a some new Sony lenses (thanks Jos Roost and LibRaw)
@@ -14,13 +14,14 @@ supported by ExifTool (r = read, w = write, c = create):
14
14
 
15
15
  File Types
16
16
  ------------+-------------+-------------+-------------+------------
17
- 360 r/w | DPX r | ITC r | NUMBERS r | RAW r/w
18
- 3FR r | DR4 r/w/c | J2C r | O r | RIFF r
19
- 3G2 r/w | DSS r | JNG r/w | ODP r | RSRC r
20
- 3GP r/w | DV r | JP2 r/w | ODS r | RTF r
21
- 7Z r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
22
- A r | DVR-MS r | JSON r | OFR r | RWL r/w
23
- AA r | DYLIB r | JXL r | OGG r | RWZ r
17
+ 360 r/w | DOCX r | ISO r | NRW r/w | RAR r
18
+ 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w
19
+ 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r
20
+ 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r
21
+ 7Z r | DV r | JP2 r/w | ODS r | RTF r
22
+ A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
23
+ AA r | DVR-MS r | JSON r | OFR r | RWL r/w
24
+ AAC r | DYLIB r | JXL r | OGG r | RWZ r
24
25
  AAE r | EIP r | K25 r | OGV r | RM r
25
26
  AAX r/w | EPS r/w | KDC r | ONP r | SEQ r
26
27
  ACR r | EPUB r | KEY r | OPUS r | SKETCH r
@@ -56,7 +57,6 @@ supported by ExifTool (r = read, w = write, c = create):
56
57
  DLL r | INSP r/w | MXF r | RA r | XLSX r
57
58
  DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c
58
59
  DOC r | INX r | NKSC r/w | RAM r | ZIP r
59
- DOCX r | ISO r | NRW r/w | RAR r |
60
60
 
61
61
  Meta Information
62
62
  ----------------------+----------------------+---------------------
@@ -108,8 +108,8 @@ your home directory, then you would type the following commands in a
108
108
  terminal window to extract and run ExifTool:
109
109
 
110
110
  cd ~/Desktop
111
- gzip -dc Image-ExifTool-12.69.tar.gz | tar -xf -
112
- cd Image-ExifTool-12.69
111
+ gzip -dc Image-ExifTool-12.72.tar.gz | tar -xf -
112
+ cd Image-ExifTool-12.72
113
113
  ./exiftool t/images/ExifTool.jpg
114
114
 
115
115
  Note: These commands extract meta information from one of the test images.
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.69';
14
+ my $version = '12.72';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -4636,13 +4636,14 @@ DESCRIPTION
4636
4636
 
4637
4637
  File Types
4638
4638
  ------------+-------------+-------------+-------------+------------
4639
- 360 r/w | DPX r | ITC r | NUMBERS r | RAW r/w
4640
- 3FR r | DR4 r/w/c | J2C r | O r | RIFF r
4641
- 3G2 r/w | DSS r | JNG r/w | ODP r | RSRC r
4642
- 3GP r/w | DV r | JP2 r/w | ODS r | RTF r
4643
- 7Z r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
4644
- A r | DVR-MS r | JSON r | OFR r | RWL r/w
4645
- AA r | DYLIB r | JXL r | OGG r | RWZ r
4639
+ 360 r/w | DOCX r | ISO r | NRW r/w | RAR r
4640
+ 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w
4641
+ 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r
4642
+ 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r
4643
+ 7Z r | DV r | JP2 r/w | ODS r | RTF r
4644
+ A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
4645
+ AA r | DVR-MS r | JSON r | OFR r | RWL r/w
4646
+ AAC r | DYLIB r | JXL r | OGG r | RWZ r
4646
4647
  AAE r | EIP r | K25 r | OGV r | RM r
4647
4648
  AAX r/w | EPS r/w | KDC r | ONP r | SEQ r
4648
4649
  ACR r | EPUB r | KEY r | OPUS r | SKETCH r
@@ -4678,7 +4679,6 @@ DESCRIPTION
4678
4679
  DLL r | INSP r/w | MXF r | RA r | XLSX r
4679
4680
  DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c
4680
4681
  DOC r | INX r | NKSC r/w | RAM r | ZIP r
4681
- DOCX r | ISO r | NRW r/w | RAR r |
4682
4682
 
4683
4683
  Meta Information
4684
4684
  ----------------------+----------------------+---------------------
@@ -4745,7 +4745,7 @@ OPTIONS
4745
4745
  -n (--printConv) No print conversion
4746
4746
  -p FMTFILE (-printFormat) Print output in specified format
4747
4747
  -php Export tags as a PHP Array
4748
- -s[NUM] (-short) Short output format
4748
+ -s[NUM] (-short) Short output format (-s for tag names)
4749
4749
  -S (-veryShort) Very short output format
4750
4750
  -sep STR (-separator) Set separator string for list items
4751
4751
  -sort Sort output alphabetically
@@ -5458,7 +5458,7 @@ OPTIONS
5458
5458
  file must have the same format as the exported JSON files with the
5459
5459
  exception that options exporting JSON objects instead of simple
5460
5460
  values are not compatible with the import file format (ie. export
5461
- with -D, -H, -l, or -T is not compatable, and use -G instead of
5461
+ with -D, -H, -l, or -T is not compatible, and use -G instead of
5462
5462
  -g). Additionally, tag names in the input JSON file may be suffixed
5463
5463
  with a "#" to disable print conversion.
5464
5464
 
@@ -5604,7 +5604,7 @@ OPTIONS
5604
5604
 
5605
5605
  produces output like this:
5606
5606
 
5607
- -- Generated by ExifTool 12.69 --
5607
+ -- Generated by ExifTool 12.72 --
5608
5608
  File: a.jpg - 2003:10:31 15:44:19
5609
5609
  (f/5.6, 1/60s, ISO 100)
5610
5610
  File: b.jpg - 2006:05:23 11:57:38
@@ -6595,21 +6595,26 @@ OPTIONS
6595
6595
  -file*NUM* *ALTFILE*
6596
6596
  Read tags from an alternate source file. Among other things, this
6597
6597
  allows tags from different files to be compared and combined using
6598
- the -if and -p options. Tags from alternate files are accessed via
6599
- the corresponding family 8 group name (eg. "File1:TAG" for the
6600
- -file1 option, "File2:TAG" for -file2, etc). *ALTFILE* may contain
6601
- filename formatting codes like the -w option (%d, %f, etc), and/or
6602
- tag names with a leading "$" symbol to access tags from the source
6603
- file in the same way as the -p option (so any other dollar symbol
6604
- in the file name must be doubled, eg. "money$$.jpg"). For example,
6605
- assuming that the OriginalFileName tag has been set in the edited
6606
- file, a command to copy Rights from the original file could look
6607
- like this:
6608
-
6609
- exiftool -file1 "$originalfilename" "-rights<file1:rights" edited.jpg
6610
-
6611
- Composite tags may access tags from alternate files using the
6612
- appropriate (case-sensitive) family 8 group name.
6598
+ the -if and -p options. *NUM* is any string of digits. Tags from
6599
+ alternate files are accessed via the corresponding family 8 group
6600
+ name (eg. "File1:TAG" for the -file1 option, "File2:TAG" for
6601
+ -file2, etc). *ALTFILE* may contain filename formatting codes like
6602
+ the -w option (%d, %f, etc), and/or tag names with a leading "$"
6603
+ symbol to access tags from the source file in the same way as the
6604
+ -p option (so any other dollar symbol in the file name must be
6605
+ doubled, eg. "money$$.jpg"). For example, assuming that the
6606
+ OriginalFileName tag has been set in the edited file, a command to
6607
+ copy Rights from the original file could look like this:
6608
+
6609
+ exiftool -file1 '$originalfilename' '-rights<file1:rights' edited.jpg
6610
+
6611
+ Subtle note: If a -tagsFromFile option is used, tags in the
6612
+ *ALTFILE* argument come from the *SRCFILE* that applies to the
6613
+ first argument accessing tags from the corresponding "FileNUM"
6614
+ group.
6615
+
6616
+ User-defined Composite tags may access tags from alternate files
6617
+ using the appropriate (case-sensitive) family 8 group name.
6613
6618
 
6614
6619
  -list_dir
6615
6620
  List directories themselves instead of their contents. This option
@@ -0,0 +1,175 @@
1
+ #------------------------------------------------------------------------------
2
+ # File: AAC.pm
3
+ #
4
+ # Description: Read AAC audio files
5
+ #
6
+ # Revisions: 2023-12-29 - P. Harvey Created
7
+ #------------------------------------------------------------------------------
8
+
9
+ package Image::ExifTool::AAC;
10
+
11
+ use strict;
12
+ use vars qw($VERSION);
13
+ use Image::ExifTool qw(:DataAccess :Utils);
14
+ use Image::ExifTool::FLAC;
15
+
16
+ $VERSION = '1.00';
17
+
18
+ my %convSampleRate = (
19
+ 0 => 96000, 7 => 22050,
20
+ 1 => 88200, 8 => 16000,
21
+ 2 => 64000, 9 => 12000,
22
+ 3 => 48000, 10 => 11025,
23
+ 4 => 44100, 11 => 8000,
24
+ 5 => 32000, 12 => 7350,
25
+ 6 => 24000,
26
+ );
27
+
28
+ %Image::ExifTool::AAC::Main = (
29
+ PROCESS_PROC => \&Image::ExifTool::FLAC::ProcessBitStream,
30
+ GROUPS => { 2 => 'Audio' },
31
+ # Bit000-011 - sync word (all 1's)
32
+ # Bit012 - ID (seems to be always 0)
33
+ # Bit013-014 - layer (00)
34
+ # Bit015 - CRC absent (0=crc exists, 1=no crc)
35
+ 'Bit016-017' => {
36
+ Name => 'ProfileType',
37
+ PrintConv => {
38
+ 0 => 'Main',
39
+ 1 => 'Low Complexity',
40
+ 2 => 'Scalable Sampling Rate',
41
+ },
42
+ },
43
+ 'Bit018-021' => {
44
+ Name => 'SampleRate',
45
+ ValueConv => \%convSampleRate,
46
+ },
47
+ # Bit022 - private
48
+ 'Bit023-025' => {
49
+ Name => 'Channels',
50
+ PrintConv => {
51
+ 0 => '?',
52
+ 1 => 1,
53
+ 2 => 2,
54
+ 3 => 3,
55
+ 4 => 4,
56
+ 5 => 5,
57
+ 6 => '5+1',
58
+ 7 => '7+1',
59
+ },
60
+ },
61
+ # Bit026 - original/copy
62
+ # Bit027 - home
63
+ # Bit028 - copyright ID
64
+ # Bit029 - copyright start
65
+ # Bit030-042 - FrameLength
66
+ # Bit043-053 - buffer fullness
67
+ # Bit054-055 - BlocksInFrame (minus 1)
68
+ # Note: Bitrate for frame = FrameLength * 8 * SampleRate / ((BlocksInFrame+1) * 1024)
69
+ # - but all frames must be scanned to calculate average bitrate
70
+ Encoder => {
71
+ Name => 'Encoder',
72
+ Notes => 'taken from filler payload of first frame',
73
+ },
74
+ );
75
+
76
+ #------------------------------------------------------------------------------
77
+ # Read information from an AAC file
78
+ # Inputs: 0) ExifTool object reference, 1) Directory information reference
79
+ # Returns: 1 on success, 0 if this wasn't a valid AAC file
80
+ sub ProcessAAC($$)
81
+ {
82
+ my ($et, $dirInfo) = @_;
83
+ my $raf = $$dirInfo{RAF};
84
+ my ($buff, $buf2);
85
+
86
+ # format of frame header (7 bytes):
87
+ # SSSS SSSS SSSS ILLC PPRR RRpC CCoh csff ffff ffff fffb bbbb bbbb bbNN
88
+ # 1111 1111 1111 0001 0110 0000 0100 0000 0000 0101 0101 1111 1111 1100 (eg.)
89
+ # S = sync word o = original/copy
90
+ # I = ID h = home
91
+ # L = layer (00) c = copyright ID
92
+ # C = CRC absent s = copyright start
93
+ # P = profile object type f = frame length
94
+ # R = sampling rate index b = buffer fullness
95
+ # p = private N = number of raw data blocks in frame
96
+ # C = channel configuration
97
+
98
+ $raf->Read($buff, 7) == 7 or return 0;
99
+ return 0 unless $buff =~ /^\xff[\xf0\xf1]/;
100
+ my @t = unpack('NnC', $buff);
101
+ return 0 if (($t[0] >> 16) & 0x03) == 3; # (reserved profile type)
102
+ return 0 if (($t[0] >> 12) & 0x0f) > 12; # validate sampling frequency index
103
+ my $len = (($t[0] << 11) & 0x1800) | (($t[1] >> 5) & 0x07ff);
104
+ return 0 if $len < 7;
105
+
106
+ $et->SetFileType();
107
+
108
+ my $tagTablePtr = GetTagTable('Image::ExifTool::AAC::Main');
109
+ $et->ProcessDirectory({ DataPt => \$buff }, $tagTablePtr);
110
+
111
+ # read the first frame data to check for a filler with the encoder name
112
+ if ($len > 8 and $raf->Read($buff, $len-7) == $len-7) {
113
+ my $noCRC = ($t[0] & 0x00010000);
114
+ my $blocks = ($t[2] & 0x03);
115
+ my $pos = 0;
116
+ $pos += 2 + 2 * $blocks unless $noCRC;
117
+ last if $pos + 2 > length($buff);
118
+ my $tmp = unpack("x${pos}n", $buff);
119
+ my $id = $tmp >> 13;
120
+ # read filler payload
121
+ if ($id == 6) {
122
+ my $cnt = ($tmp >> 9) & 0x0f;
123
+ ++$pos;
124
+ if ($cnt == 15) {
125
+ $cnt += (($tmp >> 1) & 0xff) - 1 if $cnt == 15;
126
+ ++$pos;
127
+ }
128
+ if ($pos + $cnt < length($buff)) {
129
+ my $dat = substr($buff, $pos, $cnt);
130
+ $dat =~ s/^\0+//;
131
+ $dat =~ s/\0+$//;
132
+ $et->HandleTag($tagTablePtr, Encoder => $dat) if $dat =~ /^[\x20-\x7e]+$/;
133
+ }
134
+ }
135
+ }
136
+
137
+ return 1;
138
+ }
139
+
140
+ 1; # end
141
+
142
+ __END__
143
+
144
+ =head1 NAME
145
+
146
+ Image::ExifTool::AAC - Read AAC audio files
147
+
148
+ =head1 SYNOPSIS
149
+
150
+ This module is used by Image::ExifTool
151
+
152
+ =head1 DESCRIPTION
153
+
154
+ This module contains definitions required by Image::ExifTool to read AAC
155
+ audio files.
156
+
157
+ =head1 NOTES
158
+
159
+ Since ISO charges money for the official AAC specification, this module is
160
+ based on unofficial sources which may be incomplete, inaccurate or outdated.
161
+
162
+ =head1 AUTHOR
163
+
164
+ Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
165
+
166
+ This library is free software; you can redistribute it and/or modify it
167
+ under the same terms as Perl itself.
168
+
169
+ =head1 SEE ALSO
170
+
171
+ L<Image::ExifTool::TagNames/AAC Tags>,
172
+ L<Image::ExifTool(3pm)|Image::ExifTool>
173
+
174
+ =cut
175
+
@@ -219,7 +219,8 @@ writable directly, but is written automatically by ExifTool (often when a
219
219
  corresponding L<Composite|Image::ExifTool::TagNames/Composite Tags> or
220
220
  L<Extra|Image::ExifTool::TagNames/Extra Tags> tag is written). A colon
221
221
  (C<:>) indicates a I<Mandatory> tag which may be added automatically when
222
- writing. Normally MakerNotes tags may not be deleted individually, but a
222
+ writing (use the API L<NoMandatory|../ExifTool.html#NoMandatory> option to avoid creating mandatory EXIF
223
+ tags). Normally MakerNotes tags may not be deleted individually, but a
223
224
  caret (C<^>) indicates a I<Deletable> MakerNotes tag.
224
225
 
225
226
  The HTML version of these tables also lists possible B<Values> for
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # References: 1) https://c2pa.org/public-draft/
9
9
  # 2) https://datatracker.ietf.org/doc/html/rfc7049
10
+ # 3) https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml
10
11
  #------------------------------------------------------------------------------
11
12
 
12
13
  package Image::ExifTool::CBOR;
@@ -15,7 +16,7 @@ use vars qw($VERSION);
15
16
  use Image::ExifTool qw(:DataAccess :Utils);
16
17
  use Image::ExifTool::JSON;
17
18
 
18
- $VERSION = '1.01';
19
+ $VERSION = '1.02';
19
20
 
20
21
  sub ProcessCBOR($$$);
21
22
  sub ReadCBORValue($$$$);
@@ -28,15 +29,27 @@ my %cborType6 = (
28
29
  3 => 'negative bignum',
29
30
  4 => 'decimal fraction',
30
31
  5 => 'bigfloat',
32
+ 16 => 'COSE Encrypt0', #3 (COSE Single Recipient Encrypted Data Object)
33
+ 17 => 'COSE Mac0', #3 (COSE Mac w/o Recipients Object)
34
+ 18 => 'COSE Sign1', #3 (COSE Single Signer Data Object)
35
+ 19 => 'COSE Countersignature', #3 (COSE standalone V2 countersignature)
31
36
  21 => 'expected base64url encoding',
32
37
  22 => 'expected base64 encoding',
33
38
  23 => 'expected base16 encoding',
34
39
  24 => 'encoded CBOR data',
40
+ 25 => 'string number', #3 (reference the nth previously seen string)
41
+ 26 => 'serialized Perl', #3 (Serialised Perl object with classname and constructor arguments)
42
+ 27 => 'serialized code', #3 (Serialised language-independent object with type name and constructor arguments)
43
+ 28 => 'shared value', #3 (mark value as (potentially) shared)
44
+ 29 => 'shared value number', #3 (reference nth marked value)
45
+ 30 => 'rational', #3 (Rational number)
46
+ 31 => 'missing array value', #3 (Absent value in a CBOR Array)
35
47
  32 => 'URI',
36
48
  33 => 'base64url',
37
49
  34 => 'base64',
38
50
  35 => 'regular expression',
39
51
  36 => 'MIME message',
52
+ # (lots more after this in ref 3, but don't include them unless we see them)
40
53
  55799 => 'CBOR magic number',
41
54
  );
42
55
 
@@ -212,7 +225,7 @@ sub ReadCBORValue($$$$)
212
225
  {
213
226
  $val = $$val[1] * ($num == 4 ? 10 : 2) ** $$val[0];
214
227
  }
215
- } elsif ($fmt == 7) {
228
+ } elsif ($fmt == 7) {
216
229
  if ($dat == 31) {
217
230
  undef $val; # "break" = end of indefinite array/hash (not used in C2PA)
218
231
  } elsif ($dat < 24) {
@@ -263,6 +276,7 @@ sub ProcessCBOR($$$)
263
276
  my ($val, $err, $tag, $i);
264
277
 
265
278
  $et->VerboseDir('CBOR', undef, $$dirInfo{DirLen});
279
+ SetByteOrder('MM');
266
280
 
267
281
  $$et{cbor_datapos} = $$dirInfo{DataPos} + $$dirInfo{Base};
268
282
 
@@ -320,6 +334,8 @@ under the same terms as Perl itself.
320
334
 
321
335
  =item L<https://datatracker.ietf.org/doc/html/rfc7049>
322
336
 
337
+ =item L<https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml>
338
+
323
339
  =back
324
340
 
325
341
  =head1 SEE ALSO