Hi Phil,
I'm struggling to figure out a tricky issue I hope can be solved using exiftool.
In the process of fine tuning a lapse sequence (1000+ files) there are 2 stages resulting in 2 equally named sidecar files per image(!).
- One of the xmp sidecar file (a) is stored in subfolder named /stage1.
- The other xmp sidecar file (b) is stored together with the image file.
As a final step the value for -XMP-crs:Exposure2012 from both xmp files needs to be added up and then written into -NikonCapture:ExposureAdj2.
for instance: -0.85 + -.01 = -0.86 ($valexp_ba = $val_b + $val_a)
Writing into -NikonCapture:ExposureAdj2 is done by using an -args file like so:
exiftool.exe -v1 -tagsfromfile %d%f.xmp -@ Develop\Myxmp2NEF.args -@ filelist.txt
exiftool.exe -v1 -tagsfromfile stage1\%d%f.xmp -@ Develop\Myxmp2NEF.args -@ filelist.txt
where the Myxmp2NEF.args contains the line:
-XMP-crs:Exposure2012 > NikonCapture:ExposureAdj2
The question is how to read and then add the value of -XMP-crs:Exposure2012 from both xmp files, store the result in $val_exp_ba which then gets written into NikonCapture:ExposureAdj2 by means of say Myxmp_ab2NEF.args containing the line:
-NikonCapture:ExposureAdj2 < $val_exp_ba
Kind of something like this (of course that does not work):
$val_exp_ba = $val_b XMP-crs:Exposure2012 from xmp(b) + $val_a XMP-crs:Exposure2012 from xmp(a)
I would assume this could (hopefully) be achieved with an appropriate -conf file.
But really I am lost here and hope you can help me out proposing a solution to add up them 2 values.
The folder structure is as follows:
/project/
nefs and xmp(b)
/project/stage1
xmp(a)
Tried hard to explain this properly and hope this makes sense.
Greetings, Hans.
Hi Hans,
You are lucky that ExifTool is so flexible... ;)
This can be done in 2 steps. Very similar to what you are already doing, with a minor change to the argfile you use in your second command to add the value from the second XMP file:
-NikonCapture:ExposureAdj2+<XMP-crs:Exposure2012
- Phil
Bingo! 8) That little plus sign works just fine, right there. Thank you very much.
QuoteYou are lucky that ExifTool is so flexible... ;)
Indeed!Greetings, Hans.