ExifTool Forum

ExifTool => Newbies => Topic started by: Paul Wittle on June 14, 2019, 06:38:18 AM

Title: XPKeywords not writing for a GIF file
Post by: Paul Wittle on June 14, 2019, 06:38:18 AM
I've been trying to add keywords to various file formats and the tool works fine for JPG etc but not so well for GIF and PNG.

Some documentation suggests that GIF doesn't support EXIF data and by implication I would think XMP but Exiftool was able to write out to XMP:Keywords fine.

When writing to XPKeywords it just says "0 image files updated" rather than "Tag 'XPKeywords' does not exist" but I'm trying to work out how I can get a list of truly writable tags?

I tried -listw but that produces a massive list so I suspect that is just the list for the application as a whole. Is there a command that will return a list of writable tags for a specific file format or alternatively am I just doing something wrong in this instance?

-L is not returning XPKeywords but is returning Keywords and the write command is just -XPKeywords=tag which works for other file formats (I'm using both via Windows cmd and also via the .NET tool).

Any hints would be great as this seems to apply to other formats as well?
Title: Re: XPKeywords not writing for a GIF file
Post by: Hayo Baan on June 14, 2019, 06:49:28 AM
For GIF, only XMP and ICC are supported and since XPKeywords is not an XMP tag, it can't be written. Hence the 0 files updated message.
See the table at https://exiftool.org/index.html#supported for what is and what isn't supported.

What do you mean with "-L is not returning XPKeywords"? -L is for setting the character encoding to Windows Latin1...
Title: Re: XPKeywords not writing for a GIF file
Post by: Paul Wittle on June 14, 2019, 07:40:14 AM
Ah, ignore my comment about -L that is a mistake. I just meant it lists -XPKeywords as a blank result.

Am I correct that -listw always returns the full list?
Title: Re: XPKeywords not writing for a GIF file
Post by: Phil Harvey on June 14, 2019, 07:44:31 AM
-listw returns all writable tags with no regard to what sort of file you are writing.

Your problem here is discussed in FAQ 23 (https://exiftool.org/faq.html#Q23).

- Phil
Title: Re: XPKeywords not writing for a GIF file
Post by: Paul Wittle on June 14, 2019, 09:18:02 AM
Thanks for the replies it is really helpful  :)

Out of interest, I assume there is not a command which returns the Supported File Types table?

I only ask as the writable formats is query-able and if the support file types were then I could build some logic off the back of that. As I think I mentioned; I'm using the .NET connector to do this but at the moment I'm just setting things in every possible location in the hope that Windows might pickup at least one.

I've also submitted a feedback to Microsoft asking if they could start searching XMP:Keywords and EXIF:XPKeywords as standard. I've pointed out that one of the other of those seems to work for all the file types I've tested so far.

Feel free to upvote that feedback if you as want to be able to search for keywords in Windows Explorer for all media types. https://aka.ms/AA5bzcg
Title: Re: XPKeywords not writing for a GIF file
Post by: Paul Wittle on June 14, 2019, 09:33:18 AM
I notice you can use -listwf which is so close, I'm really after a function -listwf[GIF] which would then return XMP ICC whilst -listwf[JPG] would return EXIF IPTC XMP ICC.

Anyway, that might be a nice to have but loving the tool anyway and thanks for all your hard work developing it :)
Title: Re: XPKeywords not writing for a GIF file
Post by: Phil Harvey on June 14, 2019, 09:42:40 AM
Quote from: pwit on June 14, 2019, 09:33:18 AM
I notice you can use -listwf which is so close,

I'm glad you found this.

QuoteI'm really after a function -listwf[GIF] which would then return XMP ICC whilst -listwf[JPG] would return EXIF IPTC XMP ICC.

You have no idea how complicated this would be.  The table on the ExifTool home page is actually an over-simplification.  There are many fringe cases ignored by this table where other metadata may exist in a file.  In reality, the actual tags that may be written to a file depend on the details of the specific file, not simply the file type.

- Phil
Title: Re: XPKeywords not writing for a GIF file
Post by: Phil Harvey on June 14, 2019, 09:46:22 AM
Oh, and...

Quote from: pwit on June 14, 2019, 09:18:02 AM
I've also submitted a feedback to Microsoft asking if they could start searching XMP:Keywords and EXIF:XPKeywords as standard.

I think you mean XMP:Subject (known as dc:subject in XMP circles).  Also, XPKeywords isn't part of the EXIF standard (although it is in this ExifTool group), and also "XPKeywords" is a made-up ExifTool tag name (I have no idea what Microsoft calls it).

- Phil
Title: Re: XPKeywords not writing for a GIF file
Post by: Paul Wittle on June 14, 2019, 09:47:21 AM
Yeah, I thought you might say that regarding -listwf; oh well.

Thanks anyway.
Title: Re: XPKeywords not writing for a GIF file
Post by: Paul Wittle on June 17, 2019, 03:01:21 AM
Interesting point re: XPKeyword. I'll be interested to see if Microsoft do reply as if they decide to read XMP:Keywords that would probably be a good result...but I'm not holding out much hope.

Thanks,
Paul
Title: Re: XPKeywords not writing for a GIF file
Post by: Phil Harvey on June 17, 2019, 07:16:48 AM
Quote from: Paul Wittle on June 17, 2019, 03:01:21 AM
I'll be interested to see if Microsoft do reply as if they decide to read XMP:Keywords [...]

I think you mean XMP:Subject
Title: Re: XPKeywords not writing for a GIF file
Post by: mpegleg on June 17, 2019, 10:10:55 AM
There is also an interesting thing I noticed in the the way Microsoft implements their tags. You may already know this, but I was dumbfounded when I deleted a few tags such as XPComment and also comment, only to have another tag's information suddenly appear in the Explorer Comment column, rather than appear blank as I'd expected.

Apparently the Windows Explorer Comments column is designed to show multiple lots of comments, not just XPComment as I had wrongly assumed. So for example, if you give usercomment a value, it will appear in the Comments column in the Explorer window. If you then give XPComment a different value... it won't appear there! Yet if you delete usercomment, good 'ol XPComment shows up there again. Crazy!

I think it's a crazy way that they deal with this. Very confusing for the novice. I think they should just stick to having one and only one type of tag appear in those columns. The same situation also applies to XPSubject, Title, Keywords, etc. with many different types of keyword tags appearing in the Tags column, and a few others that I can't quite remember now. I don't know how well this is documented, but I'd never heard about it before. Nothing worse than deleting some keyword tags, only to then have some other weird tags appear in the same column in place of them.
Title: Re: XPKeywords not writing for a GIF file
Post by: Paul Wittle on June 17, 2019, 10:19:08 AM
All news to me!

I thought XMP:Keywords existed and was the location of the array version whilst EXIF:XPKeywords was the string version. That is from my reading of the documentation and playing around. I'm pretty certain that I referenced XMP:Keywords and it wrote them it so I may have made an assumption but I thought XMP:Keywords was a thing.

Anyway, it has been a bit of a disappointing exercise really as whilst your tool works well there is quite a learning curve and the end product seems to be that Windows doesn't support it properly anyway.

We just wanted to be able to search our media directory with Window Explorer search and find all media relating to say, bridges or fields. Unfortunately I only seem to be able to do that for JPG, TIFF and PDF.
Title: Re: XPKeywords not writing for a GIF file
Post by: Phil Harvey on June 17, 2019, 10:37:51 AM
Hi Paul,

See this post (https://exiftool.org/forum/index.php/topic,6591.msg32875.html#msg32875) for more information about the metadata displayed by Windows.

XMP:Keywords exists (in two namespaces actually, XMP-pdf:Keywords and XMP-acdsee:Keywords), but isn't commonly used.  You should use XMP:Subject (XMP-dc:Subject) instead.

- Phil
Title: Re: XPKeywords not writing for a GIF file
Post by: mpegleg on June 17, 2019, 10:43:37 AM
Yes, it's extremely annoying how Microsoft doesn't take the whole issue of Keyword searching seriously. It's certainly not ExifTool's fault, but Microsoft's!

If Microsoft were serious they could easily overhaul Windows's internal search system to make finding files much easier by watching various tags (which should be completely customizable) and make it much more useful for all types of media files and documents. X1 Search (https://www.x1.com/products/x1-search/) does a pretty good job, but is a bit resource intensive and it's not free, but it does search the contents of files. Not sure how well it handles Exif media data. I'll need to re-install it to find that out.

Everything Search (https://www.voidtools.com/) is FREE, and is mainly what I use to search for my media files, but it only does a filename search, and doesn't look inside the file's contents. It is however lightening quick, across all drives, including mapped network drives as well. It's much better and quicker than Windows built-in search, but I think you want Content search so it might not be so useful to you, unless your filenames are very descriptive.
Title: Re: XPKeywords not writing for a GIF file
Post by: StarGeek on June 18, 2019, 02:59:32 PM
Quote from: mpegleg on June 17, 2019, 10:43:37 AM
Everything Search (https://www.voidtools.com/) is FREE, and is mainly what I use to search for my media files, but it only does a filename search, and doesn't look inside the file's contents.

Does Everything search file contents? (https://www.voidtools.com/faq/#does_everything_search_file_contents)  Also see Everything Functions (https://www.voidtools.com/support/everything/searching/#functions)

Though to be fair, it's probably not very useful unless you limit the search in some other ways.  Like using genre: and not limiting your search to music files or bitdepth: and not limiting to image files.

And also, to be honest, I haven't used it myself, I just had it pointed out to me on reddit once that it was actually an option.  I actually have had a  tab on my browser open to that page now for a year and a half because I'm going to get around to using those options... sometime.
Title: Re: XPKeywords not writing for a GIF file
Post by: mpegleg on June 22, 2019, 10:09:31 PM
Sorry StarGeek, seems I missed your reply here.

StarGeek.... from that ref you gave:

Does Everything search file contents?
Yes, "Everything" can search file content with the content: search function.

File content is not indexed, searching content is slow.


I really should learn to RTFM!

Thanks heaps!
-Paul :)