Writing unsupported XMP-drone-dji tags

Started by Stephen Marsh, February 07, 2019, 07:24:48 AM

Previous topic - Next topic

Stephen Marsh

I have been attempting to use the following without any success:

https://www.exiftool.org/TagNames/DJI.html#XMP
https://exiftool.org/config.html
https://raw.githubusercontent.com/exiftool/exiftool/master/config_files/dji.config

I have to admit that I am just not getting the syntax for adding new tags to an existing XMP namespace via a .config file.

Sample output that I would like to write:

[XMP-drone-dji] RtkFlag   : 16
[XMP-drone-dji] RtkStdLon : 1.85592
[XMP-drone-dji] RtkStdLat : 1.25373
[XMP-drone-dji] RtkStdHgt : 3.37184


Can you please point me in the right direction, thank you...

Stephen Marsh

Sample .config:

'Image::ExifTool::XMP::drone-dji' => {
        RtkFlag => { Groups => { 2 => 'Author' } },
    },
1;


Output:

Useless use of a constant ("Image::ExifTool::XMP::drone-dji") in void context at drone-dji.config line 1.
Useless use of anonymous hash ({}) in void context at drone-dji.config line 1.
Warning: Tag 'XMP-drone-dji:RtkFlag' is not defined
Nothing to do.

StarGeek

Unfortunately, not my area of expertise.  But I think you're missing part of the config.  And I assume you don't actually want it to be part of the Author group.  I haven't tested it but it should resemble this.  Still trying to find the relevant list of what to put in the braces where "Writable" is.

%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::drone-dji' => {
        RtkFlag => { Writable => 'rational',  },
    },
);
1;
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Stephen Marsh

Thank you StarGeek, incremental progress:

exiftool -config drone-dji.config -XMP-drone-dji:RtkFlag='16' -r FILEorDIR

Can't find table Image::ExifTool::XMP::drone-dji
Warning: Sorry, XMP-drone-dji:RtkFlag doesn't exist or isn't writable
Nothing to do.


I'll look through the config file again, I have spent hours looking over the forum and the config file testing different options with many varied error messages but no actual changes made to the file. I find the .config side of ExifTool to be very esoteric to say the least! :]

StarGeek

Ok, got it.  While it might seem logical that the table would be named something like "Image::ExifTool::XMP::drone-dji", it's not.  You have to go to the "DJI.pm" file of the source and copy the name from there.  It's actually Image::ExifTool::DJI::XMP.  Change the Writable value to whatever might be reasonable.

%Image::ExifTool::UserDefined = (
'Image::ExifTool::DJI::XMP' => {
        RtkFlag => { Writable => 'rational',  },
    },
);
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Stephen Marsh

#5
Fantastic, thank you for your help StarGeek, that worked!... Not sure if I need to use the same writable option as used for GPS "rational64s" instead of "rational" ...

%Image::ExifTool::UserDefined = (
'Image::ExifTool::DJI::XMP' => {
        RtkFlag => { Writable => 'rational',  },
        RtkStdLon => { Writable => 'rational',  },
        RtkStdLat => { Writable => 'rational',  },
        RtkStdHgt => { Writable => 'rational',  },
    },
);

StarGeek

I'm not sure myself.  I'm pretty sure the answer is somewhere in the source, but I can't find a list of the options.  The only other thing that I could think of that might be relevant would be to add the Lon, Lat, and Hgt to the group "location".  But that certainly not necessary for your personal use.

RtkStdLon => { Writable => 'rational',  Groups => { 2 => 'Location' } },
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Stephen Marsh

#7
Thanks StarGeek, I have access to a drone image with this metadata as written by the camera, I usually use -a -G1 -s – however I'm not sure how to verify in which group location they were originally stored?

EDIT: Using the -G option when dumping to CSV, it appears that the group is XMP...is that what the Group 2 is indicating? Not sure about Location...