How do you edit the category metadata of a MP4 file?
Here is a same video which has the category set to "John Doe, Mary Doe"
https://ufile.io/0d52fc80
You would write to the Microsoft:Category tag. It is a list type tag so everything is FAQ #17 (https://exiftool.org/faq.html#Q17) applies.
To replace the categories in your example video, which started with John Doe, Mary Doe
C:\>exiftool -P -overwrite_original -Microsoft:Category="Indiana Jones" -Microsoft:Category="Han Solo" Y:\!temp\dddd\ShortVideo.mp4
1 image files updated
C:\>exiftool -g1 -a -s -Microsoft:Category Y:\!temp\dddd\ShortVideo.mp4
---- Microsoft ----
Category : Indiana Jones, Han Solo
To add categories without replacing
C:\>exiftool -P -overwrite_original -Microsoft:Category+="John Doe" -Microsoft:Category+="Mary Doe" Y:\!temp\dddd\ShortVideo.mp4
1 image files updated
C:\>exiftool -g1 -a -s -Microsoft:Category Y:\!temp\dddd\ShortVideo.mp4
---- Microsoft ----
Category : Indiana Jones, Han Solo, John Doe, Mary Doe
This is what I get as an output in the terminal with the first command you given me.
$exiftool -P -overwrite_original -Microsoft:Category="Indiana Jones" -Microsoft:Category="Han Solo" ShortVideo.mp4
Warning: Sorry, Microsoft:Category doesn't exist or isn't writable
Warning: Sorry, Microsoft:Category doesn't exist or isn't writable
Nothing to do.
I am on Linux Mint if that helps
The ability to write Microsoft tags was added in version 12.20 (https://exiftool.org/history.html#v12.20). You'll need to update to a newer version.
Darn, I will have to wait until exiftools is updated on my distro
Wont this work also?
exiftool -P -overwrite_original -Microsoft:Category="Indiana Jones, Han Solo" ShortVideo.mp4
instead of using this.
exiftool -P -overwrite_original -Microsoft:Category="Indiana Jones" -Microsoft:Category="Han Solo" ShortVideo.mp4
No, that will make a single entry of
"Indiana Jones, Han Solo"
when what you want would be
Indiana Jones
Han Solo
Category is a list type tag, not a comma separated string. Make sure and read the FAQ 17 I linked above.
A good visual example would be to look at the raw XMP of a list type tag, such as Subject
<rdf:Description rdf:about=''
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<dc:subject>
<rdf:Bag>
<rdf:li>One</rdf:li>
<rdf:li>Two</rdf:li>
</rdf:Bag>
</dc:subject>
</rdf:Description>
</rdf:RDF>
As you can see, the two keywords, "One" and "Two" are completely separate. While Microsoft:Category doesn't use the same format as it's not XMP, the idea is the same. Each entry is completely separate.
Good to know, would this command delete the Category metadata fully from the file?
exiftool -P -overwrite_original -Microsoft:Category="" FILE.mp4
Quotes aren't needed, simply -Microsoft:Category= will do.
Excellent, thank you for helping me again!