How to extract metadata with information about "writable" of each TAG?

Started by dmytro.babenko, August 08, 2016, 12:55:19 PM

Previous topic - Next topic

dmytro.babenko

Hi all,
I was searching in this forum and from official Exiftool web site, but unfortunately I did not found answer for my question.
I want to extract metadata with "writable" property something like that:

"Megapixels": {
    "desc": "Megapixels",
    "num": 0.2304,
    "val": 0.230
     "writable" : false
  },
  "Rotation": {
    "desc": "Rotation",
    "val": 0,
    "writable" : false
  }
This info except writable  was got by using exiftool -struct -j -l.

I can check whether this property is writable by set new value or check from table (http://www.exiftool.org/TagNames/XMP.html). Also I can use -listx option, which show  a lot of information about all TAGs. But I need to check it dynamically for each TAG with value.

For example: I want to implement UI, where user can edit value of metadata and it is needed to disable metadata TAG which are not writable. So it would be very convenient to extract all metadatas from media with values and values of writable TAG ("value": 0,  "writable" : false).

Which option of exiftool should I use  to get info about writable TAG.

Thanks,
Dmytro

Phil Harvey

Hi Dmytro,

You can sort-of get what you want with 2 options:

The -listx gives you the output of all pre-defined ExifTool tags.

The -X option gives you information about the tags in a specific file.  If you look up the existing tags in the -listx output then you will be able to tell if they are writable.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dmytro.babenko

Hi Phil,

Thanks a lot for reply.

I got all pre-defined ExifTool tags by using -listx. Also I got information about the tag by using -X option.
For example I have "QuickTime:Duration" tag, but there are a lot of "Duration" in pre-defined tags, and there is not exactly  "QuickTime:Duration" table or tag in pre-defined tags.

Does it exist option like -X, which can give information about tags with "writable" property in a specific file?
Which algorithm to look up existing tag in the -listx output?

Best regards,
Dmytro

Phil Harvey

Hi Dmytro,

Add the -t option to -X to see the tag ID and table name corresponding to the organization of the -listx output.  Use these to look up the tag in the -listx output.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dmytro.babenko

Hi Phil,

Thanks you so much, you really helped me a lot.
I got tag ID by using -t option and now I know how to look up the exactly tag in the -listx output.

Best regards,
Dmytro