exiftool: no Keywords field in .MOV or .HEIC files? #1231
-
I'm new to osxphotos and I think I have read most of the (excellent) documentation. This tool seems fantastic! Anyway, one of my goals is to embed Photos.app keywords, album names, and folder names into the exported files such that it would be possible to programatically re-create the logical albums, folders, and "keyword groups" at some future date. In my testing, I'm using the --exiftool and --keyword-template "{folder_album(>)} options on export. I then use the 'exiftool' command to display the exported image file's "EXIF fields" (as I'll call them; I'm not sure of the proper terminology). I notice for most images there exists an embedded EXIF field called "Keywords" which contains the expected Photos.app keywords and album names. Great! However, to my surprise there is no such embedded EXIF field called "Keywords" within my exported .MOV and .HEIC files, even if Photos.app has keywords assigned to them! I've seen no mention of this in the documentation. Question (1): Is this expected behavior or a bug or a limitation of exiftool? I did notice that (apparently) all types of exported files have the EXIF fields of "Subject" and "Tags List" which do appear to contain all the Photos.app keywords I was looking for. Question (2): Which "EXIF field" should I expect to be most reliable to contain an image's or movie's complete set of keywords? Question (3): Also, does anyone whether the "Subject" and "Tags List" fields will always be exactly the same? Any comments appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Looking into exiftool more, I find a handy option when displaying the file's embedded metadata: exiftool -groupNames myfile shows me that the "Keywords" field is part of the IPTC group, while the "Subject" and "Tags List" fields are part of the XMP group. None of my .MOV or .HEIC files have any fields of the IPTC group. Perhaps IPTC fields are not allowed in those filetypes? While this would explain why my movie files don't include "Keywords", it is rather confusing for the osxphotos user, who might assume "Keywords" should contain the keywords assigned in Photos.app, even for movies or .heic photos. Perhaps this is mostly a documentation issue? |
Beta Was this translation helpful? Give feedback.
-
Hi @Brian-M-Holmes Glad you found osxphotos useful. To answer your questions:
Yes, it's expected and it's a limitation of the actual file formats, not exiftool or osxphotos. osxphotos will use exiftool to write whichever metadata is supported by the file type. The The There are 3 types of metadata in image/video files: EXIF, IPTC, and XMP. osxphotos (and exiftool) support all three but not every file supports all three.
Every photo app works differently and prefers certain tags. Photo metadata is surprisingly not standardized. osxphotos attempts to use the most common fields in an effort to ensure that maximum metadata is preserved. The readme help text for
In the case of osxphotos, yes. I can make no such guarantees for other software. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much -- I think I'm understanding this better, after looking more into exiftool, and the documentation of the --exiftool and --sidecar options of osxphotos. I plan to use osxphotos to "back up" my photos/videos in a simple filesystem organization by date (the --export-by-date is perfect for me). My goal here was to discover which embedded metadata fields would make it possible for a script to re-create the groupings (albums, folders, and smart albums based on keywords) that currently exist only in my Photos Library, and save those groupings in some other way. (For example, the script could create folders containing filesystem links to the relevant image and movie files.) I probably won't ever write such a script -- I just want to be reassured that it could be done, if Apple's Photos apps were to somehow "go crazy" and totally mess up my library! According to my testing so far, it seems that the XMP and EXIF groups will contain the metadata I desire and I can ignore the IPTC fields. Thank you for your help, and for authoring this impressive tool! |
Beta Was this translation helpful? Give feedback.
Hi @Brian-M-Holmes Glad you found osxphotos useful. To answer your questions:
Yes, it's expected and it's a limitation of the actual file formats, not exiftool or osxphotos. osxphotos will use exiftool to write whichever metadata is supported by the file type. The
IPTC:Keywords
tag, which is what you're looking at asKeywords
is not supported in HEIC or MOV files.The
Subject
andTagsList
are XMP fields which are supported.There are 3 types of metadata in image/video files: EXIF, IPTC, and XMP. osxphotos (and exiftool) support all three but not every file supports all three.