help with xmp tags

Started by agyaan, April 30, 2022, 01:43:52 PM

Previous topic - Next topic

agyaan

i am trying to add xmp, but it shows 5 image files updated for jpeg file using termux on android.

"Warning: [minor] Unknown APP4 segment"  and XMP Toolkit: Image::ExifTool 12.40
License   https://creativecommons.org/licenses/by-sa/4.0/ is shown by http://exif.regex.info/exif.cgi for my image.

exiftool -ImageDescription="This is an example image" -Artist="Artist's name" \
-Copyright="This work is licensed under the Creative Commons Attribution ShareAlike 1.0 Generic, 2.0 Generic, 2.5 Generic, 3.0 Unported and 4.0 International License. \
To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/1.0/deed, https://creativecommons.org/licenses/by-sa/2.0/deed, https://creativecommons.org/licenses/by-sa/2.5/deed, https://creativecommons.org/licenses/by-sa/3.0/deed,  https://creativecommons.org/licenses/by-sa/4.0/ or send a \
letter to Creative Commons, PO Box 1866, Mountain View, CA 94042 USA." \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/1.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.5/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/3.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/4.0/" /storage/emulated/0/DCIM/201917.jpg


i request whether my approach and exif data addition is correct?

StarGeek

I'm not exactly sure what the question is but this part
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/1.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.5/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/3.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/4.0/" /storage/emulated/0/DCIM/201917.jpg

repeats the filename multiple times.  You only need to provide the file name once.  Also, you try to set XMP-cc:License to multiple values.  Only the last assignment works, as it overrides previous assignments.  See Note #1 under the -TAG[+-^]=[VALUE] option.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

agyaan

Quote from: StarGeek on April 30, 2022, 02:55:12 PM
I'm not exactly sure what the question is but this part
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/1.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.5/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/3.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/4.0/" /storage/emulated/0/DCIM/201917.jpg

repeats the filename multiple times.[/tt] option[/url].

yes, intentionally. i dont want to create ambiguity by stating different licenses on both copyright and xmp.

i think its better to drop updating xmp. or is any other tool to update multiple xmp tags.

-agyaan

StarGeek

To clarify, my point is that all of this
[code]-XMP-cc:License="https://creativecommons.org/licenses/by-sa/1.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/2.5/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/3.0/" /storage/emulated/0/DCIM/201917.jpg \
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/4.0/" /storage/emulated/0/DCIM/201917.jpg


is the same as just this.
-XMP-cc:License="https://creativecommons.org/licenses/by-sa/4.0/" /storage/emulated/0/DCIM/201917.jpg
Only the last assignment is used.  License 1-3 will not appear in the file.  You are only stating one license with that command.

The XMP-cc:License, by default, can only hold 1 URI.  Exiftool will write multiple if you assign them all at once, but will give a warning
C:\>exiftool -P -overwrite_original "-XMP:License=https://creativecommons.org/licenses/by-sa/1.0/ https://creativecommons.org/licenses/by-sa/2.0/ https://creativecommons.org/licenses/by-sa/2.5/ https://creativecommons.org/licenses/by-sa/3.0/ https://creativecommons.org/licenses/by-sa/4.0/" y:\!temp\Test4.jpg
Warning: [minor] XMP-cc:License written as a literal because value is not a valid URI - y:/!temp/Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -License y:\!temp\Test4.jpg
[XMP-cc]        License                         : https://creativecommons.org/licenses/by-sa/1.0/ https://creativecommons.org/licenses/by-sa/2.0/ https://creativecommons.org/licenses/by-sa/2.5/ https://creativecommons.org/licenses/by-sa/3.0/ https://creativecommons.org/licenses/by-sa/4.0/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

agyaan

Quote from: StarGeek on May 01, 2022, 12:24:26 AM

The XMP-cc:License, by default, can only hold 1 URI.  Exiftool will write multiple if you assign them all at once, but will give a warning
C:\>exiftool -P -overwrite_original "-XMP:License=https://creativecommons.org/licenses/by-sa/1.0/ https://creativecommons.org/licenses/by-sa/2.0/ https://creativecommons.org/licenses/by-sa/2.5/ https://creativecommons.org/licenses/by-sa/3.0/ https://creativecommons.org/licenses/by-sa/4.0/" y:\!temp\Test4.jpg
Warning: [minor] XMP-cc:License written as a literal because value is not a valid URI - y:/!temp/Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -License y:\!temp\Test4.jpg
[XMP-cc]        License                         : https://creativecommons.org/licenses/by-sa/1.0/ https://creativecommons.org/licenses/by-sa/2.0/ https://creativecommons.org/licenses/by-sa/2.5/ https://creativecommons.org/licenses/by-sa/3.0/ https://creativecommons.org/licenses/by-sa/4.0/


viola, my issue is resolved.