Hi,
I am trying to modify a couple of tags; one from FLIR and one from DJI. For DJI, I have this config file:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::DJI::XMP' => {
AbsoluteAltitude => { Writable => 'rational', },
RtkStdLon => { Writable => 'rational', },
RtkStdLat => { Writable => 'rational', },
RtkStdHgt => { Writable => 'rational', },
},
);
But when I try to modify the value of AbsoluteAltitude, it does nothing nor says anything. I am calling the command from PowerShell and it is like this:
& $exifToolPath -config ExiftoolConfigDJI.config -overwrite_original -JPEG-APP1-IFD0-ExifIFD-XMP:XMP-drone-dji:AbsoluteAltitude="$newAbsoluteAltitude" "$filePath" | Out-Null
Other tags are correctly modified so I am pretty sure there is something I am not getting from config files and tag syntax. The same happens with FLIR tags.
How do I know how to correctly write the tag?
In this case, I get this when invoking with -G5:1 flags on the original file:
[JPEG-APP1-IFD0-ExifIFD-XMP:XMP-drone-dji] AbsoluteAltitude: 520.837524
How should I modify such tag value?
Thanks in advance,
Jose
Hi Jose,
From the documentation for -TAG=VALUE
TAG may contain one or more leading family 0, 1, 2 or 7 group
names, prefixed by optional family numbers, and separated colons.
You can't specify a family 5 group name.
- Phil
Quote from: kankamuso on May 29, 2023, 07:12:06 AM[JPEG-APP1-IFD0-ExifIFD-XMP:XMP-drone-dji] AbsoluteAltitude: 520.837524
How should I modify such tag value?
My advice is to keep it simple. Use only the tag name, adding the group 0 name (XMP: IPTC: EXIF:) only if necessary to avoid collisions, such as
XMP:Headline vs
IPTC:Headline. Use the group 1 names only if absolutely necessary. And about the only time that is necessary is if you are trying to write a tag that is marked as Avoid.
Writing to group 1 specific locations without a deep understanding of the metadata can lead to writing to incorrect locations. As an example, for some reason Sony didn't properly read the EXIF specs and some Sony cameras write the
ModifyDate tag to the incorrect location (IFD1 instead of IFD0). And unless you knew before hand that this was incorrect, it would lead you to thinking that IFD1 was the correct location. If you didn't include the specific group, exiftool would by default write to the correct location.