Hi,
I have been trying to insert a value to the "Category" field and I get the following message as response:
command: exiftool "-Category=sports" testImage.jpg
response:
Warning: [Minor] IPTC:Category exceeds length limit (truncated) - imageTest.jpg
1 image files updated
The value will insert but the value shows as "spo".
Is there a way to extend the char length limitation?
Thank you!
From the docs on IPTC tags (https://exiftool.org/TagNames/IPTC.html)
When writing, ExifTool issues a minor warning and truncates the value if it is longer than allowed by the IPTC specification. Minor errors may be ignored with the IgnoreMinorErrors (-m) option, allowing longer values to be written, but beware that values like this may cause problems for some other IPTC readers.
Though most modern software should be able to read it if the value is longer than the spec limit.
There is also the XMP:Category which does not have the character limit.
Thanks for the reply. I will test it out !
StarGeek,
Using ExifTool with mp4-files has caused some questions:
I have many old mp4-files which I'd like to convert to mp4 (with ffmpeg2 to reduce the space dramatically).
With ffmpeg2 I cannot transfer some metatags like "Category", so I tried to use ExifTool.
If I read the Exif Info of mp4-files with ExifTool I get this metatag listed with the correct value.
But if I try to write this tag with ExifTool to the transformed mp4-file, nothing happens.
Trying another tag, i.e. "Comment" works fine! I can read the correct value from the source file and apply it to the destination file successfully.
Is there something special with the metatag "Category"?
Ulli
Quote from: StarGeek on May 27, 2020, 04:41:31 PM
From the docs on IPTC tags (https://exiftool.org/TagNames/IPTC.html)
When writing, ExifTool issues a minor warning and truncates the value if it is longer than allowed by the IPTC specification. Minor errors may be ignored with the IgnoreMinorErrors (-m) option, allowing longer values to be written, but beware that values like this may cause problems for some other IPTC readers.
Though most modern software should be able to read it if the value is longer than the spec limit.
There is also the XMP:Category which does not have the character limit.
Quote from: vibaulliETF on August 02, 2020, 04:49:04 PM
But if I try to write this tag with ExifTool to the transformed mp4-file, nothing happens.
What is the command you're using and what is the exact output. Saying "nothing happens" doesn't provide any information in which to troubleshoot the problem.
This command works without any problems
C:\>exiftool -g1 -a -s -category="Category" C:\Users\Bryan\OneDrive\Test_Folder\Test1.mp4
1 image files updated
C:\>exiftool -g1 -a -s -category C:\Users\Bryan\OneDrive\Test_Folder\Test1.mp4
---- ItemList ----
Category : Category
---- XMP-photoshop ----
Category : Category
Make sure you are using a recent version of ExifTool because the MP4 writing capabilities are fairly new.
- Phil
Hi, StarGeek, Phil,
my version of exiftools is 12.03
preliminaries of my examples:
2 different video files:
file1: Source\Abschlepper.mp4
file2: Source\Verfolgungsrennen.mp4
the snapshot of the source directory with relevant tags: Before.jpg
I want to transform them with ffmpeg, using the commands:
ffmpeg -i Source\Abschlepper.mp4 Destination\Abschlepper.mp4
ffmpeg -i Source\Verfolgungsrennen.mp4 Destination\Verfolgungsrennen.mp4
the snapshot of the destination directory with relevant tags After.jpg
You can see, that the tag "Kommentare" is transferred correctly, the tag "Markieren" remains empty. (That I meant with "nothing happens")
Since the language of my operating system is German (like myself ;)) I'm using exiftool before to find out the tag names in English.
my commands are:
exiftool Source\Abschlepper.mp4 >SourceAbschlepper.txt
exiftool Source\Verfolgungsrennen.mp4 >SourceVerfolgungsrennen.txt
I can identify "Markieren" as "Category", and "Kommentare" as "Comment", exiftool reads my source values correct.
Then I use exiftool on the destination files
exiftool Destination\Abschlepper.mp4 >DestinationAbschlepper.txt
exiftool Destination\Verfolgungsrennen.mp4 >DestiantionVerfolgungsrennen.txt
It seems that my attempts to write with ffmpeg are not successful.
exiftool shows "Comment" with the correct values, and misses "Category" in both cases.
reason is probably that ffmpeg doesn't transform "Category" at all.
now I try setting the missing tag with the help of exiftool.
using the command:
exiftool -Category=Western destination\Abschlepp.mp4
Result:"1 image files updated"
But: still no Category value!
If I try another tag:
exiftool -Comment=Blubb destination\Abschlepp.mp4
Result: "1 image file updated"
And: Success!
That's all;)
Can you see a solution? Or is like you said "MP4 writing capabilties are fairly new."?
I hope my documentation illustrates my problem a bit;)
Ulli
Hi Ulli,
Quote from: vibaulliETF on August 04, 2020, 06:32:00 AM
You can see, that the tag "Kommentare" is transferred correctly, the tag "Markieren" remains empty. (That I meant with "nothing happens")
OK, but so far you haven't use ExifTool, right?
Quotemy commands are:
exiftool Source\Abschlepper.mp4 >SourceAbschlepper.txt
exiftool Source\Verfolgungsrennen.mp4 >SourceVerfolgungsrennen.txt
You should add
-a -G1 to this command to see all tags and where they were stored.
Quotenow I try setting the missing tag with the help of exiftool.
That's all;)
...and the result was? Could you read it back again with ExifTool? Did you write it in the same location as the original?
- Phil
Sorry, I recognised that I should have added this, but I edited my post just before your answer... hope you see the changes in between
;)
Ulli
Quote from: Phil Harvey on August 04, 2020, 07:51:00 AM
You should add -a -G1 to this command to see all tags and where they were stored.
I suspect you will find that the
Category you're looking for will be a Microsoft
Category tag (https://exiftool.org/TagNames/Microsoft.html#Xtra), not a Quicktime tag. Windows doesn't read many Quicktime tags. I have a test file with about 130 Quicktime tags set and Windows will only show about 4-5 of them.
Very few of the Microsoft video tags can be written by any program. MP3tag (https://www.mp3tag.de/en/), despite it's name, is about the only program I've found that can write them.
Well... since exiftool did not only read "Category" with the proper value from the MP4 file, I hoped, it would be able to write the same item, too.
I think it's nothing from MS, because it gets lost during transforming MP4 -> MP4 by ffmpeg, which is definitely no MS program;)
I don't use Linux, but I think the problem could be the same there.
Let me put my thoughts together:
if the value of Category in an MP4 file is not null, exiftool reads it correctly; but if it's lost (for example by the transforming via ffmpeg) then exiftool doesn't list this tag at all because it doesn't see it.
At least my attached .txt files suggest this.
Ulli
Quote from: vibaulliETF on August 04, 2020, 04:30:22 PM
Well... since exiftool did not only read "Category" with the proper value from the MP4 file, I hoped, it would be able to write the same item, too.
As per my link, there's a very long list of Microsoft Video tags that exiftool can read but cannot write.
QuoteI think it's nothing from MS, because it gets lost during transforming MP4 -> MP4 by ffmpeg, which is definitely no MS program;)
Unless you tell it otherwise, FFMpeg will strip away all embedded metadata. And I don't believe it can write any of the Microsoft video tags, so those will always be stripped away even if you add the
-map_metadata option (https://ffmpeg.org/ffmpeg.html#Advanced-options).
Quoteif the value of Category in an MP4 file is not null, exiftool reads it correctly; but if it's lost (for example by the transforming via ffmpeg) then exiftool doesn't list this tag at all because it doesn't see it.
It doesn't see it because it's no longer there. There's not an empty slot for where it should go. It's completely gone.
Quote from: vibaulliETF on August 04, 2020, 04:30:22 PM
Well... since exiftool did not only read "Category" with the proper value from the MP4 file, I hoped, it would be able to write the same item, too.
I'm not sure I understand the problem. See if this works:
Writing:
exiftool -ItemList:Category=Japan file.mp4Reading:
exiftool -ItemList:Category file.mp4
Quote from: dae65 on August 04, 2020, 06:49:42 PM
I'm not sure I understand the problem. See if this works:
I believe the problem is that they're looking to copy the
Category tag in Window. Markierenin their picture, Tags in English. It's this listing in their attached text.
Category : Western (https://exiftool.org/forum/index.php?action=dlattach;topic=11246.0;attach=3712)
(https://i.imgur.com/D2iJ0v2.png)
The tag that Windows is reading is the
Microsoft:Category tag, which exiftool is cannot write.
C:\>exiftool -g1 -a -s -Category Y:\!temp\Test1.mp4
---- Microsoft ----
Category : tag, more tagsWindows doesn't read very many Quicktime tags, only
QuickTime:Comment,
QuickTime:Artist,
QuickTime:ContentCreateDate,
QuickTime:Genre,
QuickTime:Composer, and
QuickTime:DiskNumber according to my notes, but that data is probably over a year old.
Hi StarGeek, Phil,
from your link to "Microsoft Category Tags" I verified, that different than in this list, there ARE tags that can be written.
I tried "Comment" and "Title", both sucessfully.
In the list they are marked as "no".
Eventually I noticed that different than the values in "Comment" and "Title" (simple strings), "Category" has a multiple string type (separated by comma or semicolon), maybe that's the reason.
Whatever: I decided to transfer my "Category" values to the "Comment" metatag, so I can still get helpful views and filters from Windows Explorer.
Thank you very much for you patient support.
I'm just writing a program to re-tag all of my mp4 files... (could become a long night;)
Ulli
Quote from: vibaulliETF on August 06, 2020, 12:50:07 PM
from your link to "Microsoft Category Tags" I verified, that different than in this list, there ARE tags that can be written.
I tried "Comment" and "Title", both sucessfully.
You have not looked at the data with the
-G1 and
-a options as Phil mentioned here (https://exiftool.org/forum/index.php?topic=11246.msg61627#msg61627)
When you write to
Category,
Comment, and
Title in an MP4 with exiftool, you are writing to the Quicktime
ItemList:Category. If you Right Click -> Properties menu -> Details tab and write to the Tags entry in Windows and then look at the output with the above options, you'll see that the
Microsoft:Category has been written to.
As I said, Windows reads the
Quicktime:Comment tag, and re-checking my notes, the
Quicktime:Title tag (which I missed in the list above).
QuoteEventually I noticed that different than the values in "Comment" and "Title" (simple strings), "Category" has a multiple string type (separated by comma or semicolon), maybe that's the reason.
The reason is there are multiple tags with the same name in different groups. Here's some example output showing the
Category tag as part of three different groups
C:\>exiftool -G0:1 -a -s -category Y:\!temp\Test1.mp4
[QuickTime:Microsoft] Category : Windows Tags
[QuickTime:ItemList] Category : Itemlist Category
[XMP:XMP-photoshop] Category : Exiftool Written CategoryIt can be even worse with some of the Quicktime tags as the same tag name can appear in different sub-groups. For example, the Quicktime Author tag
C:\>exiftool -G0:1 -a -s -Author Y:\!temp\Test1.mp4
[QuickTime:ItemList] Author : Itemlist Author
[QuickTime:UserData] Author : UserDate Author
[QuickTime:Keys] Author : Keys Author
625/5000
Thank you StarGeek for reminding me of the -a -G1 option.
I even found out that after deleting the title tag in Windows, the previous value was displayed as the [XMP-dc] Title.
After I deleted it "exiftool -Title = a1.mp4" it got deleted correctly.
These cross-relationships between the different tag groups are a bit confusing for me;)
Now I can put my customized program into action, which first reads the exif meta tags, then deletes everything I don't want, and only then starts to fill the "Comment" and "Title" tags with the correct values.
thanks again
Ulli