ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: lokatz on April 18, 2023, 12:23:06 PM

Title: Excluding tags while copying metadata between files
Post by: lokatz on April 18, 2023, 12:23:06 PM
Using an args file, I am copying metadata between files using something like this:

-TagsFromFile
[fromFilePathAndName]
-all
--Orientation
--CameraOrientation
--ValidAFPoints
--AFPointsInFocus
--AFAreaWidth
--AFAreaHeight
--AFAreaXPosition
--AFAreaYPosition
[toFilePathAndName]
-overwrite_original
-execute

Judging by a test pair of images, this seems to work fine for the orientation, where source and target (the .CR2 and .PNG versions of the same image) retain different orientations.  However, the AF info gets copied in spite of the --TAG instructions. 

Am I doing something wrong, or is this because the Canon Makernotes group, where these tags reside, can only be copied as a whole?
Title: Re: Excluding tags while copying metadata between files
Post by: Phil Harvey on April 18, 2023, 12:49:21 PM
From the -tagsFromFile section of the application documentation:

            3) The maker note information is copied as a block, so it isn't
            affected like other information by subsequent tag assignments on
            the command line, and individual makernote tags may not be
            excluded from a block copy.

- Phil
Title: Re: Excluding tags while copying metadata between files
Post by: StarGeek on April 18, 2023, 01:16:35 PM
You can find out which tags are MakerNotes by using
exiftool -G -a -s -MakerNotes:all /path/to/files/

You might also read FAQ #9 (https://exiftool.org/faq.html#Q9), as using just -All after the -TagsFromFile option (https://exiftool.org/exiftool_pod.html#tagsFromFile-SRCFILE-or-FMT) has the possibility of changing which groups the copied tags are part of.  For example, if you have XMP:Headline set, using -TagsFromFile file.jpg -all means the new file will have IPTC:Headline set, not XMP:Headline.
Title: Re: Excluding tags while copying metadata between files
Post by: lokatz on April 19, 2023, 03:17:31 AM
Appreciate your hints.  Looks like ExifTool offers no way to copy only some of the makernotes then.

I've read FAQ #9 several times but, to be honest, was still left confused.  If you don't mind a suggestion, it would benefit from an explanation of what a 'family 1 group' is, or an example such as the one @StarGeek gave in the above.  I'm sure this is mentioned somewhere in the ExifTool documentation. But then, I guess I am not the only 'casual user' who is not nearly as familiar with the terminology of metadata as you guys are. (I use ExifTool to extract and change metadata as part of an ambitious C# hobby project that now has almost 90,000 lines of code, so I'll readily admit that my focus is elsewhere. I AM very familiar with what's in the makernotes for many camera brands, though, as ExifTool allowed me to study them for years now.)

Thanks, and thanks for the great tool that ExifTool is.
Title: Re: Excluding tags while copying metadata between files
Post by: StarGeek on April 19, 2023, 10:52:29 AM
Quote from: lokatz on April 19, 2023, 03:17:31 AMAppreciate your hints.  Looks like ExifTool offers no way to copy only some of the makernotes then.

You won't find anything that does. They are proprietary and some companies are overly protective of the format for some reason. Almost none of them release the specs on them.  The meanings of these tags are only known through the hard work of the camera community. And even then, there usually are some tags that are still unknown.  Try adding the -u (unknown) option (https://exiftool.org/exiftool_pod.html#u--unknown) to your commands.  Depending upon the camera, you might see a bunch of unknown tags.