ExifTool 12.03 writes the QuickTime ItemList BeatsPerMinute tag as a 16-bit unsigned integer. This seems to be a bug. I believe it should be a signed integer instead.
Apple iTunes (12.06) and AtomicParsley (0.9.6) don't read ilst.tmpo atoms as written by ExifTool (12.03), although ExifTool reads it as written by them.
There is a comment to Image::ExifTool::QuickTime (https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/QuickTime.pm#L3031-L3034) saying that tmpo is an int16u in your sample:
%Image::ExifTool::QuickTime::ItemList = (
[...]
tmpo => {
Name => 'BeatsPerMinute',
Format => 'int16u', # marked as boolean but really int16u in my sample
},
But, as an int16u, iTunes and AtomicParsley ignore it. See bpm on this screenshot (https://i.imgur.com/7r54ClB.png) for iTunes, and this for AtomicParsley:
$ exiftool -ItemList:BeatsPerMinute=100 exiftool.m4a
1 image files updated
$ AtomicParsley exiftool.m4a -t | grep -w tmpo
$
But if we change the Format key to int16s, then they're able to read it. See another screenshot (https://i.imgur.com/i9F4CHM.png) for iTunes and this for AtomicParsley:
$ exiftool -ItemList:BeatsPerMinute=100 exiftool.m4a
1 image files updated
$ AtomicParsley exiftool.m4a -t | grep -w tmpo
Atom "tmpo" contains: 100
A tmpo.data atom edited with ExifTool 12.03 comes with a 0x16 data-type flag:
$ hexdump -C -s 77134 -n 26 exiftool.m4a
00012d4e 00 00 00 1a 74 6d 70 6f 00 00 00 12 64 61 74 61 |....tmpo....data|
00012d5e 00 00 00 16 00 00 55 c4 00 64 |......U..d|
00012d68
But a tmpo.data atom edited with either iTunes or AtomicParsley comes with a 0x15 data-type flag:
$ hexdump -C -s 77129 -n 26 itunes.m4a
00012d49 00 00 00 1a 74 6d 70 6f 00 00 00 12 64 61 74 61 |....tmpo....data|
00012d59 00 00 00 15 00 00 00 00 00 64 |.........d|
00012d63
$ hexdump -C -s 78843 -n 26 atomicparsley.m4a
000133fb 00 00 00 1a 74 6d 70 6f 00 00 00 12 64 61 74 61 |....tmpo....data|
0001340b 00 00 00 15 00 00 00 00 00 64 |.........d|
00013415
0x15 (21) is a signed, 0x16 (22) is an unsigned, integer (QuickTime specification (https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/Metadata/Metadata.html#//apple_ref/doc/uid/TP40000939-CH1-SW35)).
Finally, here (https://github.com/wez/atomicparsley/blob/2586007ad78b272887bcc85940715680870d39b7/src/ap_types.h#L18-L19) and here (https://github.com/wez/atomicparsley/blob/2586007ad78b272887bcc85940715680870d39b7/src/main.cpp#L1646) is the code showing that AtomicParsley writes tmpo as a signed integer.
Thank you. :)
Great, thanks. I'll patch this in ExifTool 12.04
- Phil
P.S. I would like to see a negative beats per minute! And brain-dead software that won't read something because it isn't the expected format really bugs me (you eventually get into the situation where one piece of software will only read a tag written in format X, while another requires format Y).
Quote from: Phil Harvey on August 05, 2020, 05:24:49 PM
P.S. I would like to see a negative beats per minute!
;D you've just given me an idea.
Phil,
Other integer QuickTime tags such as Compilation have the same signed/unsigned data-type issue. I will report in another thread soon.
d