Why does deleting ItemList also delete Keys

Started by wywh, February 13, 2023, 11:33:32 AM

Previous topic - Next topic

wywh

I am trying to delete only ItemList, but why does it also delete Keys? (exiftool 12.50)

exiftool -a -G1 -s -n -Keys:All -ItemList:All movie.mp4
[Keys]          Author                          : Author Keys
[Keys]          Description                     : Description Keys
[Keys]          DisplayName                     : DisplayName Keys
[Keys]          Keywords                        : Keyword 1 Keys,Keyword 2 Keys
[Keys]          Title                           : Title Keys [displayed if DisplayName does not exist]
[Keys]          CreationDate                    : 2001:01:01 12:00:00+02:00
[Keys]          GPSCoordinates                  : -36.6101 -66.91515 119.9
[ItemList]      Keyword                         : Keyword 1 ItemList,Keyword 2 ItemList
[ItemList]      Author                          : Author ItemList_ID-a9aut
[ItemList]      Description                     : Description ItemList
[ItemList]      Title                           : Title ItemList
[ItemList]      Author                          : Author ItemList

exiftool -m -P -overwrite_original_in_place -ItemList:All= movie.mp4                 
    1 image files updated

exiftool -a -G1 -s -n -Keys:All -ItemList:All movie.mp4
[blank]

Deleting just UserData in the same way works as expected and Keys are preserved.

- Matti

Phil Harvey

Hi Matti,

Good point, I will add this to the QuickTime Tags documentation:

        Beware that the Keys tags are actually stored inside the ItemList in
        the file, so deleting the ItemList group as a block (ie. -ItemList:all=)
        also deletes Keys tags.  Instead, to preserve Keys tags the ItemList tags
        may be deleted individually with -QuickTime:ItemList:all=.


- 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 ($).

wywh

Quote from: Phil Harvey on February 13, 2023, 03:13:10 PMto preserve Keys tags the ItemList tags
        may be deleted individually with -QuickTime:ItemList:all=

Thanks for the info. Also deleting just individual ItemList tags like this does not touch Keys:

exiftool -m -P -overwrite_original -ItemList:Title= movie.mp4
- Matti

StarGeek

And then there's always copying the data back in
C:\>exiftool -G1 -a -s -Keys:all -Itemlist:all Y:\!temp\aa\Test.mp4
[Keys]          Author                          : Author Keys
[Keys]          Description                    : Description Keys
[ItemList]      Author                          : Author ItemList_ID-a9aut
[ItemList]      Description                    : Description ItemList

C:\>exiftool -P -overwrite_original -ItemList:all= -TagsFromFile @ -Keys:All Y:\!temp\aa\Test.mp4
    1 image files updated

C:\>exiftool -G1 -a -s -Keys:all -Itemlist:all Y:\!temp\aa\Test.mp4
[Keys]          Author                          : Author Keys
[Keys]          Description                    : Description Keys
* 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).