Skip to content

Commit

Permalink
update to ET 13.00
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Oct 29, 2024
1 parent ca05bfa commit f37cd10
Show file tree
Hide file tree
Showing 14 changed files with 174 additions and 74 deletions.
25 changes: 17 additions & 8 deletions bin/exiftool_files/exiftool.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use warnings;
require 5.004;

my $version = '12.99';
my $version = '13.00';

# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exePath;
Expand Down Expand Up @@ -2375,7 +2375,7 @@ ($$)
$done2{$t2} = 1;
}
my $str = '';
($v > 1 or $same) and $str = " ($same same tag" . ($same==1 ? '' : 's') . ')';
$v and ($same or $v > 1) and $str = " ($same same tag" . ($same==1 ? '' : 's') . ')';
if (not $allGroup) {
print $fp "---- $g2 ----$str\n" if $g2 and ($str or @diffs);
} elsif ($str and $g2) {
Expand Down Expand Up @@ -2415,12 +2415,12 @@ ($$)
$grp .= ' ' x (15 - length($grp)) if length($grp) < 15 and $outFormat < 2;
push @diffs, sprintf "< %s %s%s: %s\n", $grp, $name, $pad, Printable($val);
if (defined $val2) {
$v < 3 and $grp = ' ' x length($grp), $name = ' ' x $len;
$grp = ' ' x length($grp), $name = ' ' x $len if $v < 3;
push @diffs, sprintf "> %s %s%s: %s\n", $grp, $name, $pad, Printable($val2);
}
} else {
push @diffs, sprintf "< %s%s: %s\n", $name, $pad, Printable($val);
$v < 3 and $name = ' ' x $len;
$name = ' ' x $len if $v < 3;
push @diffs, sprintf "> %s%s %s\n", $name, $pad, Printable($val2) if defined $val2;
}
}
Expand Down Expand Up @@ -3635,7 +3635,7 @@ ($$$;$)
print $fp $bra;
foreach (@$val) {
print $fp ',' if $comma;
FormatJSON($fp, $_, $ind);
FormatJSON($fp, $_, $ind, $quote);
$comma = 1,
}
print $fp $ket,
Expand All @@ -3651,7 +3651,7 @@ ($$$;$)
if ($showTagID and $_ eq 'id' and $showTagID eq 'H' and $$val{$_} =~ /^\d+\.\d+$/) {
print $fp qq{"$$val{$_}"};
} else {
FormatJSON($fp, $$val{$_}, "$ind ");
FormatJSON($fp, $$val{$_}, "$ind ", $quote);
}
$comma = 1,
}
Expand Down Expand Up @@ -3817,7 +3817,14 @@ ($)
$val = '(Binary data '.length($$val).' bytes)';
}
}
$val =~ tr/\0-\x1f\x7f/./; # translate unprintable characters
if ($escapeC) {
$val =~ s/([\0-\x1f\\\x7f])/$escC{$1} || sprintf('\x%.2x', ord $1)/eg;
} else {
# translate unprintable chars in value and remove trailing spaces
$val =~ tr/\x01-\x1f\x7f/./;
$val =~ s/\x00//g;
$val =~ s/\s+$//;
}
return $val;
}

Expand Down Expand Up @@ -4819,7 +4826,9 @@ ()
my $docFile = "$Image::ExifTool::exeDir/exiftool_files/windows_exiftool.txt";
# try backslashes first if it seems we may be running in cmd.exe
$docFile =~ tr/\//\\/ if $ENV{ComSpec} or $docFile =~ /\\/;
system(qq{more < "$docFile"}) and warn "Error running more $docFile\n";
# trap warnings and run in eval to avoid Perl bug which gives "Can't spawn" warning on ^C
local $SIG{'__WARN__'} = sub { $evalWarning = $_[0] };
eval { system(qq{more < "$docFile"}) };
}

# end
8 changes: 4 additions & 4 deletions bin/exiftool_files/lib/Image/ExifTool.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
%static_vars $advFmtSelf);

$VERSION = '12.99';
$VERSION = '13.00';
$RELEASE = '';
@ISA = qw(Exporter);
%EXPORT_TAGS = (
Expand Down Expand Up @@ -740,7 +740,7 @@ my %fileDescription = (
OGV => 'video/ogg',
ONP => 'application/on1',
ORF => 'image/x-olympus-orf',
OTF => 'application/x-font-otf',
OTF => 'application/font-otf',
PAGES=> 'application/x-iwork-pages-sffpages',
PBM => 'image/x-portable-bitmap',
PCD => 'image/x-photo-cd',
Expand Down Expand Up @@ -798,8 +798,8 @@ my %fileDescription = (
THMX => 'application/vnd.ms-officetheme',
TIFF => 'image/tiff',
Torrent => 'application/x-bittorrent',
TTC => 'application/x-font-ttf',
TTF => 'application/x-font-ttf',
TTC => 'application/font-ttf',
TTF => 'application/font-ttf',
TXT => 'text/plain',
VCard=> 'text/vcard',
VRD => 'application/octet-stream', #PH (NC)
Expand Down
2 changes: 1 addition & 1 deletion bin/exiftool_files/lib/Image/ExifTool/Exif.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2931,7 +2931,7 @@ my %opcodeInfo = (
0xa433 => { Name => 'LensMake', Writable => 'string' }, #24
0xa434 => { Name => 'LensModel', Writable => 'string' }, #24
0xa435 => { Name => 'LensSerialNumber', Writable => 'string' }, #24
0xa436 => { Name => 'Title', Writable => 'string', Avoid => 1 }, #33
0xa436 => { Name => 'ImageTitle', Writable => 'string' }, #33
0xa437 => { Name => 'Photographer', Writable => 'string' }, #33
0xa438 => { Name => 'ImageEditor', Writable => 'string' }, #33
0xa439 => { Name => 'CameraFirmware', Writable => 'string' }, #33
Expand Down
Binary file modified bin/exiftool_files/lib/Image/ExifTool/Geolocation.dat
Binary file not shown.
7 changes: 4 additions & 3 deletions bin/exiftool_files/lib/Image/ExifTool/Geotag.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use vars qw($VERSION);
use Image::ExifTool qw(:Public);
use Image::ExifTool::GPS;

$VERSION = '1.78';
$VERSION = '1.79';

sub JITTER() { return 2 } # maximum time jitter

Expand Down Expand Up @@ -1127,8 +1127,9 @@ sub SetGeoValues($$;$)
$iExt = $i1;
}
if (abs($time - $tn) > $geoMaxExtSecs) {
$err or $err = 'Time is too far from nearest GPS fix'.' '.abs($time-$tn).' > '.$geoMaxExtSecs;
$et->VPrint(2, ' Nearest fix: ', PrintFixTime($tn), "\n") if $verbose > 2;
$err or $err = 'Time is too far from nearest GPS fix';
$et->VPrint(2, ' Nearest fix: ', PrintFixTime($tn), ' (',
int(abs $time-$tn), " sec away)\n") if $verbose > 2;
$fix = { } if $$geotag{DateTimeOnly};
} else {
$fix = $$points{$tn};
Expand Down
4 changes: 2 additions & 2 deletions bin/exiftool_files/lib/Image/ExifTool/M2TS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use strict;
use vars qw($VERSION);
use Image::ExifTool qw(:DataAccess :Utils);

$VERSION = '1.25';
$VERSION = '1.26';

# program map table "stream_type" lookup (ref 6/1/9)
my %streamType = (
Expand Down Expand Up @@ -82,7 +82,7 @@ my %streamType = (
0x86 => 'DTS-HD Audio',
0x87 => 'E-AC-3 Audio',
0x8a => 'DTS Audio',
0x90 => 'PGS Audio', #https://www.avsforum.com/threads/bass-eq-for-filtered-movies.2995212/page-399
0x90 => 'Presentation Graphic Stream (subtitle)', #https://en.wikipedia.org/wiki/Program-specific_information
0x91 => 'A52b/AC-3 Audio',
0x92 => 'DVD_SPU vls Subtitle',
0x94 => 'SDDS Audio',
Expand Down
3 changes: 2 additions & 1 deletion bin/exiftool_files/lib/Image/ExifTool/PhaseOne.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use vars qw($VERSION);
use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::Exif;

$VERSION = '1.10';
$VERSION = '1.11';

sub WritePhaseOne($$$);
sub ProcessPhaseOne($$$);
Expand Down Expand Up @@ -71,6 +71,7 @@ my @formatName = ( undef, 'string', 'int16s', undef, 'int32s' );
# >2 = compressed
# 5 = non-linear
PrintConv => { #PH
0 => 'Uncompressed', #https://github.com/darktable-org/darktable/issues/7308
1 => 'RAW 1', #? (encrypted)
2 => 'RAW 2', #? (encrypted)
3 => 'IIQ L', # (now "L14", ref IB)
Expand Down
76 changes: 69 additions & 7 deletions bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ package Image::ExifTool::QuickTime;
GROUPS => { 2 => 'Location' },
FIRST_ENTRY => 0,
NOTES => q{
Tags extracted from the tx3g sbtl timed metadata of Yuneec drones, and
subtitle text in some other videos.
Tags extracted from the tx3g sbtl timed metadata of Yuneec and Autel drones,
and subtitle text in some other videos.
},
Lat => {
Name => 'GPSLatitude',
Expand All @@ -619,6 +619,32 @@ package Image::ExifTool::QuickTime;
PrintConv => '$self->ConvertDateTime($val)',
},
Text => { Groups => { 2 => 'Other' } },
# the following tags are extracted from Autel Evo II drone videos
GPSDateTime => {
Groups => { 2 => 'Time' },
Description => 'GPS Date/Time',
PrintConv => '$self->ConvertDateTime($val)',
},
HomeLat => {
Name => 'GPSHomeLatitude',
RawConv => '$$self{FoundGPSLatitude} = 1; $val',
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
},
HomeLon => {
Name => 'GPSHomeLongitude',
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
},
ISO => { },
SHUTTER => {
Name => 'ExposureTime',
ValueConv => '1 / $val',
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
},
'F-NUM' => {
Name => 'FNumber',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
},
EV => 'ExposureCompensation',
);

%Image::ExifTool::QuickTime::INSV_MakerNotes = (
Expand Down Expand Up @@ -2361,21 +2387,57 @@ ($$$)
}

#------------------------------------------------------------------------------
# Process Yuneec 'tx3g' sbtl metadata (ref PH)
# Process Yuneec 'tx3g' and Autel sbtl metadata (ref PH)
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1 on success
sub Process_tx3g($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
my $dataPt = $$dirInfo{DataPt};
return 0 if length $$dataPt < 2;
pos($$dataPt) = 2; # skip 2-byte length word
$et->VerboseDir('tx3g', undef, length($$dataPt)-2);
$et->HandleTag($tagTablePtr, 'Text', substr($$dataPt, 2));
if ($$dataPt =~ /^..\w{3} (\d{4})-(\d{2})-(\d{2}) (\d{2}:\d{2}:\d{2}) ?([-+])(\d{2}):?(\d{2})$/s) {
my $text = substr($$dataPt, 2); # remove 2-byte length word
$et->HandleTag($tagTablePtr, 'Text', $text);
if ($text =~ /^HOME\(/) {
# --- sample text from Autel Evo II drone ---
# HOME(W: 109.318642, N: 40.769371) 2023-09-12 10:28:07
# GPS(W: 109.339287, N: 40.768574, 2371.76m)
# HDR ISO:100 SHUTTER:1000 EV:-0.7 F-NUM:1.8
# F.PRY (1.0\xc2\xb0, -3.7\xc2\xb0, -59.0\xc2\xb0), G.PRY (-51.1\xc2\xb0, 0.0\xc2\xb0, -58.9\xc2\xb0)
my $line;
foreach $line (split /\x0a/, $text) {
if ($line =~ /^HOME\(([EW]):\s*(\d+\.\d+),\s*([NS]):\s*(\d+\.\d+)\)\s*(.*)/) {
my ($lon, $lat, $time) = ($2, $4, $5);
$lon = -$lon if $1 eq 'W';
$lat = -$lat if $3 eq 'S';
$time =~ tr/-/:/; # (likely local time zone, but not confirmed)
$et->HandleTag($tagTablePtr, GPSDateTime => $time);
$et->HandleTag($tagTablePtr, HomeLat => $lat);
$et->HandleTag($tagTablePtr, HomeLon => $lon);
} elsif ($line =~ /^GPS\(([EW]):\s*(\d+\.\d+),\s*([NS]):\s*(\d+\.\d+),\s*(.*)m/) {
my ($lon, $lat, $alt) = ($2, $4, $5);
$lon = -$lon if $1 eq 'W';
$lat = -$lat if $3 eq 'S';
$et->HandleTag($tagTablePtr, Lat => $lat);
$et->HandleTag($tagTablePtr, Lon => $lon);
$et->HandleTag($tagTablePtr, Alt => $alt);
} elsif ($line =~ /^F\.PRY\s*\((-?[\d.]+)\xc2\xb0,\s*(-?[\d.]+)\xc2\xb0,\s*(-?[\d.]+)\xc2\xb0/) {
$et->HandleTag($tagTablePtr, Yaw => $1);
$et->HandleTag($tagTablePtr, Pitch => $2);
$et->HandleTag($tagTablePtr, Roll => $3);
if ($line =~ /G\.PRY\s*\((-?[\d.]+)\xc2\xb0,\s*(-?[\d.]+)\xc2\xb0,\s*(-?[\d.]+)\xc2\xb0/) {
$et->HandleTag($tagTablePtr, GimYaw => $1);
$et->HandleTag($tagTablePtr, GimPitch => $2);
$et->HandleTag($tagTablePtr, GimRoll => $3);
}
} else {
$et->HandleTag($tagTablePtr, $1, $2) while $line =~ /([-\w]+):([^:]*[^:\s])(\s|$)/sg;
}
}
} elsif ($text =~ /^\w{3} (\d{4})-(\d{2})-(\d{2}) (\d{2}:\d{2}:\d{2}) ?([-+])(\d{2}):?(\d{2})$/s) {
$et->HandleTag($tagTablePtr, 'DateTime', "$1:$2:$3 $4$5$6:$7");
} else {
$et->HandleTag($tagTablePtr, $1, $2) while $$dataPt =~ /(\w+):([^:]*[^:\s])(\s|$)/sg;
$et->HandleTag($tagTablePtr, $1, $2) while $text =~ /(\w+):([^:]*[^:\s])(\s|$)/sg;
}
return 1;
}
Expand Down
19 changes: 11 additions & 8 deletions bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ my %tagLookup = (
'camerae-mountversion' => { 490 => 0xb },
'cameraelevationangle' => { 124 => 0x9405, 524 => 'CameraElevationAngle' },
'camerafilename' => { 507 => 'CameraFilename' },
'camerafirmware' => { 124 => 0xa439 },
'camerafirmware' => { 124 => 0xa439, 524 => 'CameraFirmware' },
'cameraid' => { 333 => 0x209, 413 => 'cmid', 429 => 0x209 },
'cameraidentifier' => { 407 => 'camera.identifier' },
'cameraimage' => { 495 => [\'Cameras','CamerasCameraImage'] },
Expand Down Expand Up @@ -3728,8 +3728,8 @@ my %tagLookup = (
'imagedustoff' => { 300 => 0xfe443a45 },
'imageeditcount' => { 388 => 0x41 },
'imageediting' => { 388 => 0x32 },
'imageeditingsoftware' => { 124 => 0xa43b },
'imageeditor' => { 124 => 0xa438 },
'imageeditingsoftware' => { 124 => 0xa43b, 524 => 'ImageEditingSoftware' },
'imageeditor' => { 124 => 0xa438, 524 => 'ImageEditor' },
'imageeffects' => { 420 => 0x1010 },
'imagefileconstraints' => { 338 => 'ImageFileConstraints' },
'imagefileformatasdelivered' => { 338 => 'ImageFileFormatAsDelivered' },
Expand Down Expand Up @@ -3805,9 +3805,10 @@ my %tagLookup = (
'imagesuppliername' => { 338 => [\'ImageSupplier','ImageSupplierImageSupplierName'] },
'imagetemperaturemax' => { 126 => 0x1 },
'imagetemperaturemin' => { 126 => 0x2 },
'imagetitle' => { 124 => 0xa436, 524 => 'ImageTitle' },
'imagetone' => { 388 => 0x4f },
'imagetype' => { 136 => 0x82, 338 => 'ImageType' },
'imageuniqueid' => { 1 => 0x15, 68 => 0x28, 124 => 0xa420, 522 => 'ImageUniqueID', 523 => 'ImageUniqueID' },
'imageuniqueid' => { 1 => 0x15, 68 => 0x28, 124 => 0xa420, 522 => 'ImageUniqueID', 523 => 'ImageUniqueID', 524 => 'ImageUniqueID' },
'imagewidth' => { 124 => 0x100, 193 => 0xe, 397 => 0x10c, 502 => 'ImageWidth', 542 => 'ImageWidth' },
'inclinationangle' => { 491 => 0x900f },
'inclinationcorrection' => { 491 => 0x900e },
Expand Down Expand Up @@ -4796,7 +4797,7 @@ my %tagLookup = (
'metadataauthorityidentifier' => { 531 => [\'metadataAuthority','metadataAuthorityIdentifier'] },
'metadataauthorityname' => { 531 => [\'metadataAuthority','metadataAuthorityName'] },
'metadatadate' => { 544 => 'MetadataDate' },
'metadataeditingsoftware' => { 124 => 0xa43c },
'metadataeditingsoftware' => { 124 => 0xa43c, 524 => 'MetadataEditingSoftware' },
'metadatalastedited' => { 531 => 'metadataLastEdited' },
'metadatalasteditor' => { 531 => 'metadataLastEditor' },
'metadatalasteditoridentifier' => { 531 => [\'metadataLastEditor','metadataLastEditorIdentifier'] },
Expand Down Expand Up @@ -5599,7 +5600,7 @@ my %tagLookup = (
'photoeffectsgreen' => { 302 => 0x6 },
'photoeffectsred' => { 302 => 0x4 },
'photoeffectstype' => { 302 => 0x0 },
'photographer' => { 124 => 0xa437 },
'photographer' => { 124 => 0xa437, 524 => 'Photographer' },
'photographicsensitivity' => { 524 => 'PhotographicSensitivity' },
'photoidentifier' => { 1 => 0x2b },
'photoinfoplayback' => { 307 => '17.6', 316 => '33.6' },
Expand Down Expand Up @@ -5946,7 +5947,7 @@ my %tagLookup = (
'rawdevcolorspace' => { 334 => 0x108, 335 => 0x109 },
'rawdevcontrastvalue' => { 334 => 0x106, 335 => 0x105 },
'rawdeveditstatus' => { 334 => 0x10b },
'rawdevelopingsoftware' => { 124 => 0xa43a },
'rawdevelopingsoftware' => { 124 => 0xa43a, 524 => 'RAWDevelopingSoftware' },
'rawdevelopmentprocess' => { 388 => 0x62 },
'rawdevengine' => { 334 => 0x109, 335 => 0x10b },
'rawdevexposurebiasvalue' => { 334 => 0x100, 335 => 0x100 },
Expand Down Expand Up @@ -6940,7 +6941,7 @@ my %tagLookup = (
'timezoneinfo' => { 105 => 0x2 },
'timezoneoffset' => { 124 => 0x882a },
'tint' => { 407 => 'player.movie.visual.tint', 517 => 'Tint', 519 => 'Tint' },
'title' => { 124 => 0xa436, 162 => 'Title', 337 => 'Title', 341 => 'Title', 352 => 0x65, 404 => 'Title', 405 => ['titl',"\xa9nam"], 407 => 'title', 413 => ['titl',"\xa9nam"], 520 => 'title', 533 => 'Title', 544 => 'Title' },
'title' => { 162 => 'Title', 337 => 'Title', 341 => 'Title', 352 => 0x65, 404 => 'Title', 405 => ['titl',"\xa9nam"], 407 => 'title', 413 => ['titl',"\xa9nam"], 520 => 'title', 533 => 'Title', 544 => 'Title' },
'togglestyleamount' => { 517 => 'ToggleStyleAmount', 519 => 'ToggleStyleAmount' },
'togglestyledigest' => { 517 => 'ToggleStyleDigest', 519 => 'ToggleStyleDigest' },
'tonecomp' => { 241 => 0x81 },
Expand Down Expand Up @@ -9742,6 +9743,8 @@ my %tagExists = (
'gpsframingaltitude' => 1,
'gpsframinglatitude' => 1,
'gpsframinglongitude' => 1,
'gpshomelatitude' => 1,
'gpshomelongitude' => 1,
'gpshorizontalaccuracy' => 1,
'gpsinfo' => 1,
'gpslatitude2' => 1,
Expand Down
Loading

0 comments on commit f37cd10

Please sign in to comment.