Main Menu

Recent posts

#21
Metadata / Need a favor from a Exiftool g...
Last post by cdubea - July 07, 2025, 11:17:07 AM
So,

In the preceding months, I've transitioned my image ingest duties from LightRoom v6.14 on a Windows box to Rapid Photo Downloader on a Linux box.

RPD works well, but one of the things it doesn't do is any kind of IPTC metadata handling.

Typically, I will ingress to a folder thusly:

/photos/2025/0617-Wyatt

And rename the photos in the folder thusly:

20250617-Wyatt.001.jpg

I use Capture One for my post-processing, but unfortunately metadata handling in C1 is challenging. It's possible, but it's a cluge at best.

Would some kind soul please advise an ExifTool command to set the descriptor of the file (in this case Wyatt) to be the IPTC Caption for a folder full of images? Obviously, the descriptor would be different for different folders.

Thank you.
#22
The Image::ExifTool API / Re: Problem with tag qualifier...
Last post by Phil Harvey - July 07, 2025, 06:24:00 AM
I meant to use the Verbose option when writing.

Here is what I get from the command line when trying to write your value:

% exiftool a.jpg -xmp:datetimeoriginal'=2025:06:16 19:41:49-0700' -v2
Writing XMP-exif:DateTimeOriginal
======== a.jpg
Rewriting a.jpg...
  Editing tags in: APP1 XMP
  Creating tags in: APP1 XMP
JPEG APP1 (11914 bytes)
JPEG APP1 (1119 bytes)
  Rewriting XMP
    + XMP-exif:DateTimeOriginal = '2025-06-16T19:41:49-07:00'
JPEG APP5 (49950 bytes)
JPEG DQT (130 bytes)
JPEG SOF0:
JPEG DHT (416 bytes)
JPEG SOS
    1 image files updated

Also, looking at your post #7, doesn't XMP-exif:DateTimeOriginal have the value you were trying to write?  I don't see the problem.

- Phil
#23
The Image::ExifTool API / Re: Problem with tag qualifier...
Last post by Tom Cunningham - July 06, 2025, 11:12:24 PM
I get a return value of 2 from WriteInfo, which means the file was written but no changes were made. Using $exifTool->Options(Verbose => 2), the only places I see mention of DateTimeOriginal are here:

  | + [ExifIFD directory with 40 entries]
  | | 0)  ExposureTime = 0.02 (1/50)
  | |     - Tag 0x829a (8 bytes, rational64u[1])
  | | 1)  FNumber = 4 (40/10)
  | |     - Tag 0x829d (8 bytes, rational64u[1])
  | | 2)  ExposureProgram = 2
  | |     - Tag 0x8822 (2 bytes, int16u[1])
  | | 3)  ISO = 6400
  | |     - Tag 0x8827 (2 bytes, int16u[1])
  | | 4)  TimeZoneOffset = -7
  | |     - Tag 0x882a (2 bytes, int16s[1])
  | | 5)  SensitivityType = 2
  | |     - Tag 0x8830 (2 bytes, int16u[1])
  | | 6)  RecommendedExposureIndex = 6400
  | |     - Tag 0x8832 (4 bytes, int32u[1])
  | | 7)  ExifVersion = 0231
  | |     - Tag 0x9000 (4 bytes, undef[4])
  | | 8)  DateTimeOriginal = 2025:06:16 19:41:49
  | |     - Tag 0x9003 (20 bytes, string[20])
  | | 9)  CreateDate = 2025:06:16 19:41:49-0700
  | |     - Tag 0x9004 (25 bytes, string[25])

and here:

  + [XMP directory, 5526 bytes]
  | XMPToolkit = XMP Core 4.4.0-Exiv2
  | Warning = [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto
  | CountryCode = USA
  | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/Iptc4xmpCore:CountryCode'
  | Location = Bow Lake Residential Mobile Home Community
  | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/Iptc4xmpCore:Location'
  | ColorLabel = 0
  | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/digiKam:ColorLabel'
  | DateTimeDigitized = 2025-06-16T19:41:49-07:00
  | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/exif:DateTimeDigitized'
  | DateTimeOriginal = 2025-06-16T19:41:49
  | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/exif:DateTimeOriginal'
  | GPSAltitude = 104/1
  | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/exif:GPSAltitude'

The latter value is what I want to write to the file, but it looks like it doesn't happen. No other errors or warnings from WriteInfo.
#24
Great, thanks for the sample.

ExifTool 13.33 will extract the EXIF from this video.

- Phil
#25
The Image::ExifTool API / Re: Problem with tag qualifier...
Last post by Phil Harvey - July 06, 2025, 09:45:08 PM
You should be looking at the return value of WriteInfo to see if everything went OK.  Also to debug this you could do $exifTool->Options(Verbose => 2); to see what it is doing when writing.

- Phil
#26
Bug Reports / Feature Requests / Re: Feature request: support S...
Last post by Jhe - July 06, 2025, 09:33:37 PM
Thank you for the excellent performance of ExifTool.
I have some .MOV files from a Sigma fp and Sigma fp L, which should be in the same format as the Sigma BF, but they are not being parsed correctly. The metadata such as maker, model, and focal length cannot be read.

Could you please take a look at the following MOV video shot with the Sigma fp? ;D
https://drive.google.com/file/d/13KxeE6lkfDHiYpehnIk6BBDGNycw2ubT/view?usp=drive_link
#27
The "exiftool" Application / Re: Concatenating several exif...
Last post by StarGeek - July 06, 2025, 07:19:37 PM
Quote from: Kloomnik on July 06, 2025, 05:18:24 PMI want to concatenate several existing EXIF fields (e.g., Caption, City, State, Country) into that single field.

Minor nitpick. None of those are EXIF tags. They are either XMP tags or IPTC tags. Or both in one case. Use the command in FAQ #3 to see the groups they belong to. That command will also give you the actual names of the tags, which can be different from what other programs list. For example, you say "Caption", but if you actually write to the Caption tag, you are writing to a tag that will only work with the ACDSee image management program. What you probably want to write it is either Caption-Abstract (part of the older IPTC standard) or Description (the newer, modern XMP standard).

This example from the Copying Examples section of the docs shows you how to combine simple text and tag values when copying to another tag.

As the example shows, you simply add a dollar sign to the front of the tag name. If the tag name isn't followed by a space, you add braces as with ShutterSpeed in that example.
#28
The Image::ExifTool API / Re: Problem with tag qualifier...
Last post by Tom Cunningham - July 06, 2025, 06:23:27 PM
Still having some issues. Here's a debug run:

Loading DB routines from perl5db.pl version 1.80
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

IO::Socket::SSL::CODE(0xa037ee6d0)(/usr/share/perl5/vendor_perl/5.40/IO/Socket/SSL.pm:276):
276:            INIT { init() }
277:            init();
  DB<1> n
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:41):
41:     my $exifTool = new Image::ExifTool;
  DB<1>
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:42):
42:     my $geo = My::GeoNames->new(username => USERNAME);
  DB<1> b 1125
  DB<2> c
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1125):
1125:                   my $timestamp_str = $exifTool->GetValue($tag);
  DB<2> p $tag
XMP:DateTimeOriginal
  DB<3> n
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1126):
1126:                   if ($timestamp_str) {
  DB<3> p $timestamp_str
2025:06:16 21:41:49-07:00
  DB<4> n
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1129):
1129:                       if ($timestamp_str =~ /(\d{4}):(\d{2}):(\d{2}) (\d{2}):(\d{2}):(\d{2})/) {
  DB<4>
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1130):
1130:                           my ($year, $month, $day, $hour, $minute, $second) = ($1, $2, $3, $4, $5, $6);
  DB<4>
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1133):
1133:                           my $original_dt = DateTime->new(
1134:                               year      => $year,
1135:                               month     => $month,
1136:                               day       => $day,
1137:                               hour      => $hour,
1138:                               minute    => $minute,
1139:                               second    => $second,
1140:                               time_zone => 'America/Chicago' # Assume Central time
1141:                           );
  DB<4>
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1144):
1144:                           $original_dt->set_time_zone($location_timezone);
  DB<4>
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1147):
1147:                           my $adjusted_timestamp = $original_dt->ymd(':') . ' ' . $original_dt->hms(':') . $original_dt->strftime('%z');
  DB<4>
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1150):
1150:                           $exifTool->SetNewValue($tag, $adjusted_timestamp);
  DB<4> p $adjusted_timestamp
2025:06:16 19:41:49-0700
  DB<5> p $tag
XMP:DateTimeOriginal
  DB<6> n
main::TzUpdate(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:1154):
1154:               $updates = 1;  # we'll always update
  DB<6>
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:91):
91:             if ($unique) {
  DB<6>
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:94):
94:             if ($updates && !$try) {
  DB<6>
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:95):
95:                 $exifTool->WriteInfo($fn);
  DB<6>
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:96):
96:                 $updates = 0;
  DB<6>
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:98):
98:             if (defined $geoError) {
  DB<6>
main::(/cygdrive/c/Users/Tom/Pictures/Metadata/EXIF/ExifTool/exiftidy.pl:125):
125:        exit;
  DB<6>
Debugged program terminated.  Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
S<h q>, S<h R> or S<h o> to get additional info.
  DB<6>

This all looks hunky-dory, but then when I do:

$ exiftool -time:all -G1 -a -s pic.jpg
[System]        FileModifyDate                  : 2025:07:06 22:41:13+01:00
[System]        FileAccessDate                  : 2025:07:06 23:09:20+01:00
[System]        FileCreateDate                  : 2025:07:06 20:09:53+01:00
[IFD0]          ModifyDate                      : 2025:06:16 19:41:49-0700
[ExifIFD]       DateTimeOriginal                : 2025:06:16 19:41:49-0700
[ExifIFD]       CreateDate                      : 2025:06:16 19:41:49-0700
[ExifIFD]       OffsetTime                      : -05:00
[ExifIFD]       OffsetTimeOriginal              : -05:00
[ExifIFD]       OffsetTimeDigitized             : -05:00
[Sony]          SonyDateTime                    : 2025:06:16 21:41:49
[GPS]           GPSTimeStamp                    : 04:41:49
[GPS]           GPSDateStamp                    : 2025:06:17
[IFD1]          ModifyDate                      : 2025:06:16 19:41:49-0700
[XMP-exif]      DateTimeDigitized               : 2025:06:16 19:41:49-07:00
[XMP-exif]      DateTimeOriginal                : 2025:06:16 21:41:49-07:00
[XMP-exif]      GPSDateTime                     : 2025:06:17 04:41:49Z
[XMP-xmp]       ModifyDate                      : 2025:06:16 21:41:49-07:00
[Composite]     GPSDateTime                     : 2025:06:17 04:41:49Z

Huh? I thought I changed the XMP DateTimeOriginal, but it doesn't appear to have changed. I'm stumped.
#29
The "exiftool" Application / Concatenating several exif fie...
Last post by Kloomnik - July 06, 2025, 05:18:24 PM
Hi Exiftool'ers

I intend to import several thousand scanned images into Mac Photos. Practically, its only "free" field of information is Caption, and I want to concatenate several existing EXIF fields (e.g., Caption, City, State, Country) into that single field.

I succeeded in rewriting one EXIF field with another, but not in concatenating several fields.

Because of the number of photos involved, this has to be batched. That is, solving the problem for each image separately in a GUI interface is not feasible.

Hence, can I do it with command-line ExifTool?

Any help with be appreciated.
#30
The Image::ExifTool API / Re: Problem with tag qualifier...
Last post by Phil Harvey - July 06, 2025, 04:29:10 PM
That's what I assumed.

- Phil