Long base64 string as custom XMP tag value

Started by Exifusr, June 02, 2017, 06:44:03 PM

Previous topic - Next topic

Exifusr

Hi everyone! :)

I want to set a base64 string, that's representing an image, as a the value of a custom XMP tag.
For testing purposes I took the example config file [1] and executed exiftool -config example.config -NewXMPxxxTag1="$input" my.pdf

As result I get the error message bash: /usr/bin/exiftool: argument list too long

How do you load longer stings into the XMP tag variable?


[1] https://exiftool.org/config.html

StarGeek

You might be hitting the command line limit.  In Windows, for example, the command can't be longer then about 8,000 characters.  In bash it's a lot longer (see this Stackoverflow answer) but there is still a limit.

You might try writing the string to a temp file and then using -TAG<=DATFILE
* 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).

Exifusr

#2
Thank you very much StarGeek (^.^)b ! That was exaktly the option I was looking for :)

So to set very long strings as the value of a custom XMP tag you have to put the string into a file and pass the file as an quoted argument. That means exiftool -config example.config "-NewXMPxxxTag1<=/path/to/file_containing_string_value" my.pdf