Mapping of iTunesMediaType Values

Started by Invindicator, March 28, 2018, 08:03:08 PM

Previous topic - Next topic

Invindicator

Hi Phil,

Was reading an mp4 file with exiftool after writing the iTunesMediaType using mp3tag and it appears either exiftool or mp3tag is using an incorrect value mapping somewhere. Here is where the current error lies

Movie (mp3tag) -> Short Film (exiftool)
Short Film (mp3tag) -> Movie (exiftool)
iTunes U (mp3tag) -> doesnt exist in exiftool (Unknown)

From the documentation of mp3tag there appears to be a couple of values missing as well compared to the exiftool documentation so I am unsure which values are correct and incorrect. Below are the mp3tag values, found here: http://help.mp3tag.de/main_tags.html, which I compared to the exiftool values I used here (included for convenience ;)): https://exiftool.org/TagNames/QuickTime.html

Syntax: Enter the media type
Possible values: Movie, Normal, Audiobook, Music Video, Short Film, TV Show, Ringtone, iTunes U

I tried to have a look to see what the documented values were for the stik atom in the quicktime documentation but couldnt find them anywhere so I was also wondering where they are actually documented if you know :)

It may be that this is an error with the values that mp3tag is writing but after downloading a test movies from iTunes, reading the value in mp3tag results in a correct value value of Movie and reading the value with exiftool results in an incorrect value of Short Film

As always thanks for the help,
Regards, Nick

Phil Harvey

Thanks Nick,

I'll look into this and post back here after if I have any questions or news about what I discover.

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

Phil Harvey

#2
Hi Nick,

If you are talking about the tag that ExifTool calls "iTunesMediaType", then this is a string, and ExifTool is just reporting the string value.

But I think you must be talking about the ExifTool "MediaType" tag, which is numerical.  I can switch the values of Short Film and Movie if you think that is correct, but I was unable to locate a reference to verify this.

What number does ExifTool report for the iTunes U video?  It should give something like "Unknown (7)".  I can add this if you give me the number.

- Phil

Edit:  Ah ha!  I found a reference!  Apparently Apple has changed this definition.  How about setting these to 0 = "Movie (old)", 9 = "Movie"?

Note that this reference doesn't give a value for iTunes U, so that question still needs to be answered.
...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 ($).

Invindicator

Hi Phil,

Yes the media type was indeed what I was referring too (just that mp3tag calls it iTunesMediaType, but it is indeed the numeric information stored under the stik atom which I am talking about). A few suggestions/notes to maybe take into consideration/discuss

1) I have just had a look after reading your reply and I can confirm mp3tag writes the value of iTunes U = "23"
[QuickTime]     Media Type                      : 23

2) I have also looked at the value mp3tag writes for a value of Short Film which I can confirm is 0. However after reopening the file to view the metadata after writing this value, exiftool changes the value to "unknown". I'm assuming the value of 0 is unsupported anymore by iTunes and that a 0 value in this field means nothing so I would agree with you in changing this to 0 = "Movie (old)" and 9 = "Movie". I will also message Florian, the author of mp3tag, and let him know to update his references or see if he has any more insight on this matter (in which case I will post an update here)

3) Finally I have checked the AtomicParsley link you provided and after earlier testing similarities and differences between mp3tag and exiftool stik tag values, I believe this is the list that exiftool should implement:

0 = Movie (old)
1 = Normal (Music)
2= Audiobook
6= Music Video
9 = Movie
10 = TV Show
11 = Booklet
14 = Ringtone
23 = iTunes U
This list removes the 5 = "Whacked Bookmark" and 21 = "Podcast" from the current quicktime value list exiftool is using. I have looked for both of these and have found no mention of either anywhere except here (https://ffmpeg.org/pipermail/ffmpeg-devel/2009-November/077331.html) which is possibly where the original exiftool list of values was generated from as it matches up exactly, but is from Nov of 2009? The whacked bookmark I have no idea what it is or was intended for but I am aware from the mp3tag website that iTunes reads the podcast type from a custom Podcast tag which is either set to 1 for true and 0 for false. As for the iTunes U value, again I shall message Florian and see what he has to say about it

Hopefully this points have shed some light somewhere, happy to discuss any thoughts you have. Is a real pain that Apple has not released official documentation of these values anywhere, makes it extremely hard to determine the correct values haha. Look forward to hearing your thoughts and seeing this feature updated soon :)

Regards, Nick

Phil Harvey

Hi Nick,

Thanks.  I'll change the values 0 and 9 as mentioned, and add the value 23 you provided.  I will leave the Whacked Bookmark and Podcast values since they aren't doing any harm.

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

Invindicator

No worries Phil, sounds awesome  8)

Thanks once again, Nick