ExifTool Forum

General => Metadata => Topic started by: wywh on February 13, 2023, 11:33:32 AM

Title: Why does deleting ItemList also delete Keys
Post by: wywh on February 13, 2023, 11:33:32 AM
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
Title: Re: Why does deleting ItemList also delete Keys
Post by: Phil Harvey on February 13, 2023, 03:13:10 PM
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
Title: Re: Why does deleting ItemList also delete Keys
Post by: wywh on February 14, 2023, 08:41:57 AM
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
Title: Re: Why does deleting ItemList also delete Keys
Post by: StarGeek on February 14, 2023, 10:17:06 AM
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