Main Menu

Windows metadata

Started by Phil Harvey, July 07, 2015, 07:07:50 AM

Previous topic - Next topic

neebah

Thanks

What about those crazy Microsoft tags that are added to MOV and MP4.  These are where descriptive tags are stored in these files (and called categories) when set in windows.  Is there a camera make and model for these tags that can be set by something. 

neebah

A possible known note about XP keyword tags. 

I've noticed that when you delete descriptive tags (at least in WPG, not 100% on properties pane) that the xmp gets deleted but the XP keywords are still in the file.  Only the pointer is deleted.  I"m sure this is known behaviour.  But wanted to make sure.

jo.dor

Testing now writing tags in Windows 10 Explorer, I'm finding that EXIF:XPKeywords and XMP:Subject are written, but not IPTC:Keywords. However, if I manually create an IPTC:Keywords value, it will be read in Windows 10 Explorer, and if I then update the tags in Windows 10 Explorer it will write to all three EXIF:XPKeywords, IPTC:Keywords, and XMP:Subject.
So it seems that Windows 10 will always read from IPTC:Keywords if present, but will not write to IPTC:Keywords unless already present.

StarGeek

Ah, yes, I had forgotten about that.  As I noted in my first post, IPTC data isn't written unless the IPTC block already exists.  It doesn't have to be Keywords.  Even if the only thing in the IPTC block is ApplicationRecordVersion, then IPTC data will be written. 
* 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).

StarGeek

Updated to match Windows 10 details tab and added video metadata.
* 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).

visusys

Quote from: StarGeek on May 07, 2021, 04:22:48 PMUpdated to match Windows 10 details tab and added video metadata.

Sorry if this has been answered. I am new here. Has anyone put together a command-line command, batch file, or PowerShell script that will exactly and surgically remove everything outlined by StarGeek in this thread?

I am creating a Powershell module that will have the ability to remove metadata from TIFF+TIF/JPG+JPEG/PNG/BMP/WebP/GIF files. I'm also going to have an option to do this on PSD and AI/EPS/PDF files, but that's out of the scope of this thread.

Anyone?

StarGeek

For most of it
exiftool -All= /path/to/files/

There are a few Microsoft specific tags in the above list that exiftool can't edit, but then, neither can any other program, as far as I can tell. I'm not even sure what program can write them in the first place

And Windows built in option works pretty well
* 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).

Martin Z

1. @STARGEEK - THANKS FOR YOUR EPIC POST!

Quote from: StarGeek on July 07, 2015, 04:23:25 PM@StarGeek: Your post on the mapping between Windows properties and EXIF values is amazing!

I'm actually a bit gutted I've only just seen this today, as I've been tinkering on this topic for well over a year and have been looking through the EXIF documentation on Microsoft Tags, Microsoft's pages on Windows Properties, and testing out a small plethora of tools like:
  • EXIFtool (obv :) )
  • FFmpeg
  • AtomicParsley
  • NirSoft SystemPropertyView
  • PropertyEdit
  • MP3 Tag Editor
  • Creating custom PowerShell
  • Using VB / WShell object

... to work out the best option to try and create some kind of 'master metadata manager' tool, to sort out all the metadata for my images, videos and other files once and for all. I've already done quite a bit of property mapping / exploration and have been writing and using a few work-in-progress scripts as I've been going, but your post should now let me build on that significantly - thanks so much for sharing! (and thanks to @Phil for kicking this topic off and getting the ball rolling)



2. QUESTION ON "TAG COMPLETENESS" (e.g. IPTC Keywords)

I've read a few replies around the fact that not all tags are read/written by Microsoft (e.g. jo.dor's post on IPTC:Keywords) and was wondering...

  • In terms of the "best" way to being setting and managing metadata, is it a problem that Windows's will only write IPTC keywords if they exist already (but will always create/write EXIF and XMP keywords) for example?
  • Should we be manually creating IPTC:Keywords for every image, so that they then can be written and updated by Windows when it updates the other two?
  • ... Or is this just going to cause unnecessary overhead? -- When you consider in reality new images will keep on being generated from things like downloaded files, saved email attachments, phone transfers, etc. So if the main goal is tag consistency/completeness, to avoid gaps creeping back in almost immediately you'd have to set up broad folder scanning to detect for any new images and then run a script to create whatever tags were needed (which sounds a bit much)
  • ... Is it "better" to instead just ignore IPTC and remove it from the equation altogether, as in if tags won't be there 100% of the time and this would cause problems(?), then essentially treat it as an "unreliable" tag group and instead gear any scripts to read/write from other tag groups like XMP / EXIF exclusively?



Phil Harvey

In your recent update you say that ExifTool can't set EXIF FlashEnergy in a WEBP file, but I have no problems doing this:

> exiftool a.webp -exif:flashenergy=2
1 image files updated
> exiftool a.webp -flashenergy -G1
[ExifIFD]       Flash Energy                    : 2

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

StarGeek

I didn't actually try it, but looked up the tag on the EXIF Tags page where it is listed a "no" in the writable column.

Ah, I see, the first listing 0x920b is listed as no, but there is a second listing, 0xa20b which is writable.

Testing it, Windows does read that tag, so I'll fix it.
* 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).

StarGeek

Somehow I missed or forgot to respond to this.

Quote from: Martin Z on April 04, 2023, 12:08:00 AMIn terms of the "best" way to being setting and managing metadata, is it a problem that Windows's will only write IPTC keywords if they exist already (but will always create/write EXIF and XMP keywords) for example?

Should we be manually creating IPTC:Keywords for every image, so that they then can be written and updated by Windows when it updates the other two?

I believe the Metadata Working Group standard is followed here.  As it says on the MWG tags page
    IPTC information is written only if the original file contained IPTC.
See page 28 of the Metadata Working Group Guidelines for Handling Image Metadata under "Writing IPTC-IIM and XMP"

QuoteIs it "better" to instead just ignore IPTC and remove it from the equation altogether, as in if tags won't be there 100% of the time and this would cause problems(?), then essentially treat it as an "unreliable" tag group and instead gear any scripts to read/write from other tag groups like XMP / EXIF exclusively?

The MWG standard has detailed suggestions on how to reconcile and sync the data.  It's worth reading the full spec.  Though the Metadata Working Group has apparently become defunct, the standard is still used, at least by the better programs.

I faintly recall someone saying that the IPTC is working on a newer spec along these lines.

Of course, for personal use, you have to decide what is best for your workflow.  As I often say in these forums, if you can, ditch the IPTC IIM and use the XMP tags.  Trying to keep the ITPC and XMP tags in sync is an extra step and complicates your workflow.  Unfortunately, my main image viewer, Irfanview, still hasn't added the ability to display XMP data, even though it's been requested for over a decade.  And I often use it to take a quick peak at the data.
* 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).

Martin Z

#26
Hi @StarGeek,

Thanks for the replies and advice, I appreciate the info and will try and check out the links but just to be 100% honest, this is probably reaching the limit of my knowledge in terms of tagging/groups (hadn't heard of 'IPTC IIM' before, etc) but keen to try and understand this space better.

To check my understanding, I wanted to try and re-answer my original q's more directly and include some additional information/extrapolation as best I understand it. I realise the below may not be 100% accurate and/or I may have used the wrong term, etc however it would be great to get a quick "👍🏼" from you if the below is broadly correct (or corrections, if any of the below is too far off the mark)...

Is it a problem that Windows's will only write IPTC keywords if they exist already?
✅ No, this is fine: This approach follows the official guidance from the Metadata Working Group [MWG])

❓ Is it better to instead just ignore IPTC?
✅ Generally, yes: This does not mean you need to go out of your way to purge IPTC data/tags, however they are an older set of tags which have now been replaced by the likes of XMP and so there is no need to run extra scripts/workflows to try and populate these tags explicitly. The fact that Windows doesn't create them if they don't already exist, is simply alignment with the general shift away from IPTC.

Thanks once again for your help as I try to get my head round this!



[Minor FYI]: I did initially use the "quote" feature however I didn't want you to think I was trying to turn any of your comments into into official guidance (from the likes of MWG, etc) or equally mis-quote you because of mis-understanding something.

Martin Z

PS -- I have a few things I can add to the table at the start of the thread (mapping Windows properties to EXIF ones, etc)... Assuming you don't mind, what's the best way for me to provide this?

StarGeek

Quote from: Martin Z on April 23, 2023, 08:51:55 AMIs it a problem that Windows's will only write IPTC keywords if they exist already?
✅ No, this is fine: This approach follows the official guidance from the Metadata Working Group [MWG])

Sounds good.

Quote❓ Is it better to instead just ignore IPTC?
✅ Generally, yes: This does not mean you need to go out of your way to purge IPTC data/tags, however they are an older set of tags which have now been replaced by the likes of XMP and so there is no need to run extra scripts/workflows to try and populate these tags explicitly. The fact that Windows doesn't create them if they don't already exist, is simply alignment with the general shift away from IPTC.

This is "it depends" and varies by your workflow and what programs you are using.  You don't want to update Description and not change Caption-Abstract if one of your programs is going to give priority to Caption-Abstract, as I believe this is what the MWG guide suggests.

This is something you have to work out what is best for you depending upon what programs you are using.  If you want to not deal with IPTC data, then you should probably remove it rather than just ignoring it.  You probably should check to make sure things match before deleting.  For example
exiftool -if "$Caption-Abstract eq $Description" -Caption-Abstract= /path/to/files/
Unfortunately, it would require a separate command to check each pair.
* 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).

StarGeek

Quote from: Martin Z on April 23, 2023, 11:25:55 AMAssuming you don't mind, what's the best way for me to provide this?

Go ahead and post it hear or send me a DM.  I'll double check it and add it to the main table.
* 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).