Good morning,
I'm facing a problem when trying to write the QuickTime UserData Title and Description tags on my video files. I'm from Brazil, so my language has characters such as acute accent (') and tilde (~)... all other QuickTime tags seem to be written correctly with these characters, except for UserData Title and Description tags.
I'm running exiftool on my Mac, but I've tried running it on my windows pc and the same problem happened.
It happens if I use the command:
exiftool -m -P -overwrite_original_in_place -api QuickTimeHandler=1 -UserData:Title='Além do Arco Íris' -UserData:Description='Amábille cantando Além do Arco Íris' -ClipFileName='Além do Arco Íris - Tenda da Praia 2008'
And it still happens if I use the command:
exiftool -n -m -P -overwrite_original_in_place '-UserData:Description<Keys:Description' '-UserData:Title<Keys:Title' '-ClipFileName<Keys:DisplayName'
Example:
---- UserData ----
Title : Além do Arco Íris
Description : Amábille cantando Além do Arco Íris
ClipFileName : Além do Arco Íris - Tenda da Praia 2008
---- Keys ----
Comment : Amábille cantando Além do Arco Íris
Description : Amábille cantando Além do Arco Íris
Keywords : 2008, Cantando, Música
Title : Além do Arco Íris - Tenda da Praia 2008
As you can see, only ClipFileName is written correctly in User Data, and in all "Keys" tags everything works as expected.
What should I do to correct this?
Thank you.
It looks like this is a bug and will require Phil's attention. It only affects UserData:Title, but not ItemList:Title or Keys:Title.
I have narrowed it down that exiftool ver 12.00 doesn't have this problem, but ver 12.06 does.
The problem here is due to a change in ExifTool 12.04:
- Patched to write a default QuickTime language code of 0x0000 (null) instead
of 0x55c4 ('und')
This was due to an incompatibility with some video software which didn't like the 'und' language code.
This doesn't affect Keys or ItemList tags because these locations include information about the character set.
Unfortunately, a language code of 0x0000 falls into the range of the old Macintosh language codes, so ExifTool defaults to the MacRoman character set when reading. You can fix this by setting -api charsetquicktime=utf8 when extracting the information.
There is a clear asymmetry between reading and writing UserData tags containing special characters. I'm not sure the best way to deal with this. The obvious thing to do is to make UTF8 the default character set when reading if the language code is 0x0000. This will cause incompatibilities with old Macintosh videos where the MacRoman character set should be used, and you won't be able to work around this with the CharsetQuickTime option because it is already MacRoman by default (and I can't change this default because it would affect all other non-0x0000 Macintosh language codes). Resolving this could require another API option to set the character set for only the 0x0000 language code, which is an ugly solution.
I have to think about this.
- Phil
OK. I've got it.
For UserData tags which use the 0x0000 language code, ExifTool will analyze the tag value to see if it contains valid UTF-8 characters, and if so it will use UTF-8 encoding instead of the CharasetQuickTime setting. This should preserve backward compatibility and allow ExifTool to be consistent between reading and writing these tags.
This change only affects the way UserData tags are read back. They are still written in the same way as 12.04 and later, with the 0x0000 language code by default.
This update will appear in ExifTool 12.46.
- Phil
Quote from: Phil Harvey on September 19, 2022, 09:01:27 AMThe problem here is due to a change in ExifTool 12.04:
Ah, I should have looked closer at the patch notes. My mistake.