MP4 Tags for MP4 Files

I've looked at some of the other topics regarding tagging MP4 files and it's never clear to me whether they are referring to MP4-type tags for MP4 files, or all tag types for MP4 files. Just to be clear, my issue / question is in regard to MP4-type tags (as opposed to MP3TAG, ID3, iTunes, etc.)-type tags, as defined in this crucial table ( Mp3tag Help - Tag field mappings ).

My limited experience with mapping tags for MP4 files is with ID3v2 tags. They seem to work as advertised. But I have big problems with mapping MP4-type tags. When I use an ID3v2-type tag, the value assigned to the tag via MP3TAG gets attached to the tag, as evidenced by View > Extended Tags…, and it continues to be displayed on the MP3TAG tag panel. In other words, it behaves as you'd expect it to behave.

But when I use at MP4-type tag, the value assigned to the tag via MP3TAG still gets attached to the tag, as evidenced by View > Extended Tags…, but it disappears from the MP3TAG tag panel, never to be seen again.

Specifically: if I map

Tag: IDv3 - Source: COMPOSER - Target: TCOM

all's well. But if I map

Tag: MP4 - Source: COMPOSER - Target: ©wrt

the value assigned via MP3TAG shows up attached to ©WRT in View > Extended Tags BUT it's disappeared from the tag panel and to the best of my knowledge the only way to get rid of it would be to delete the MP4 file

Please note - I'm assuming that the "Tag (type)" field on the left of the mapping table refers to the "Target" field on the right. The center column, "Source" always refers to the MP3TAG name, as I understand it. If that's the case I think the Mapping Table would make more sense if the columns were adjusted such that "Source" came first, then "Tag (type)", and then "Target". And a pull-down list for "Source" would be an outstanding improvement.

I've seen one other topic to that addressed this point but it wasn't as specific as I've tried to be.

As an aside, the whole subject of mapping metadata for MP4 files from MP3TAG all the way through to Plex is a huge can of worms but it can't be addressed until and unless we can present the data to Plex via metadata. There are bound to be instances where that will require the use of MP4-type tags, and I'm thinking of DIRECTOR and WRITER specifically.

Well I think I figured out what I did wrong. I should have known that Florian would lay the mapping table out logically. So since I misinterpreted the headings I reversed the source and target fields. I went back and switched them in the table and everything works fine. Sorry for the false alarm.

But the field ©WRT is in the table as the MP4 name for what MP3TAG internally refers to as COMPOSER. I’m assuming that WRT stands for writer, which makes me think that if I can get what MP3TAG (and MP3) consider COMPOSER to Plex via metadata to Plex as the MP4 metadata field ©WRT, Plex will use it to populate the WRITER field in the Plex database and display it on the Plex screen.

Name in Mp3tag ID3v2.3 ID3v2.4 MP4 Matroska WMA iTunes WMP Winamp
COMPOSER TCOM " ©wrt T=30 WM/Composer Composer Composer Composer

OK so let’s step back from how I’m trying to do this and talk a little bit about what I’m trying to do. I am trying to get MP3TAG to load metadata into an MP4 container and pass it to Plex, which will then scan the MP4 container using something conveniently known as a scanner, put it in the Plex server database, and then display it in one of the several Plex client apps as needed. This works without fiddling around on some of the metadata fields, such as artists, titles, albums (which Plex interprets as “collections”), genres, etc. But the number of fields that work straight out of the box is limited. And at least one works with minor tweaking. The classic example of a minor tweak is “description”. Long story short, in order to get a description from MP3TAG to Plex, you need to put PODCASTDESC in the MP3TAG Tag Panel (the MP4 name for PODCASTDESC is ‘ldes’ which is ‘long descriptor, so it’s not totally whimsical). That PODCASTDESC solution, as originally published, required an entry in the mapping table, but it now works without the entry in the mapping table, probably thanks for to Florian.

There are other important, if not essential, fields that I (and I assume others as well) would like to load into the MP4 container as metadata and pass them to Plex for processing. All of the fields I’m interested in can be entered into the Plex database using the plex PC client. But if something happens to the Plex database, or if I decide to move from plex to Kodi or whatever alternatives to Plex there are, I lose all the info that I’ve entered directly into the Plex database. Using MP4 metadata is convenient and more importantly, durable.

Florian has already added DIRECTOR as an MP4-only field. I haven’t been able to make it work. I’ve added DIRECTOR to the tag panel and fiddled around with various mapping schemes (including no user mapping at all!) but nothing so far has gotten the Plex scanner to recognize DIRECTOR. Again, I can add Director/s directly to the Plex database, bypassing MP4 metadata, but there are disadvantages. And note that DIRECTOR is actually directors, because it’s possible for an video opus to have scenes directed by different people. Director/s work/s the same way that Actor/s does; using commas as a separator.

OK now we can talk about COMPOSER. Composer is to a musical opus as Writer is to a video opus. So that’s probably why the MP4 name for COMPOSER is ©wrt . Or not, I really don’t know.

All I know is that I want to get writer, in the video opus sense, and DIRECTOR from MP3TAG to metadata in the MP4 container, so that the Plex scanner can find them and add them to the Plex Database, and ultimately to the Plex client. Once we get the fields in MP4-standard format and -location in the MP4 container, it’ll be guesswork and trial and error to get the Plex scanner to load them into the Plex database.

COMPOSER already gets written to ©wrt by default, no need to set up a custom mapping for this.

What you need to figure out is from which MP4 tag Plex reads the writer, or whether it reads it at all.

Their documentation on this is rather bad, all I found was Identifying Music Media Using Embedded Metadata | Plex Support . And that basically only says that Plex can read data from tags, but does not tell anything about what data it can read and from which tags that gets populated.

2 Likes

And regarding DIRECTOR for use with Plex, I think we've already discussed this here (and concluded, that Plex doesn't get the information from this field).

1 Like

Indeed. The same is probably true for the writers, at least the XML mentioned at What MP4 tags can be read into Plex with local assets agent? - #15 by FlixAdmin - Development - Plex Forum shows a screenwriters section. So Plex likely does not read ©wrt either.

The documentation in this regard is really bad indeed. They apparently want users to use their editor and primarily rely on online sources based upon folder and file name matching. If Plex is (still) anything like Kodi/XBMC here, it relies on FFmpeg to read the MP4 user metadata tags.

MP4 FFmpeg (read) Kodi =? Plex
©nam title SetTitle
©com, ©wrt composer SetWritingCredits, split at " / "
gnre, ©gen genre SetGenre, split at " / "
©day date SetYear, parsed as integer
desc description SetPlotOutline, toggle tag precedence
ldes synopsis SetPlot, toggle tag precedence
trkn, ©trk track m_iTrack, parsed as integer
©alb album SetAlbum
©ART, ©aut artist SetArtist

Yes I agree the Plex documentation on what the MP4 metadata scanner looks for is very bad. That's what I was referring to when I said guesswork and trial and error. As in, I send Plex some metadata and see what, if anything, it does with it. I did find a thread that attempts to address the issue but for me at least it is not very helpful.

What MP4 tags can be read into Plex with local assets agent? - Third Party / Development - Plex Forum

Well you're a step ahead of me. I just posted a link to the thread and was about to mention the part about ITUNMOVI and the xml script that goes with it. Interestingly enough the XML is not necessary for actors because the MP3TAG "ARTIST" tag flows through perfectly. But apparently Director does not, nor does Writer. So that brings up the question of "how difficult would it be to add ITUNMOVI to MP3TAG? I myself am (or at least at one time I was) fluent in HTML so although it's awkward, I could use it for Director, at least. That said, I'm not sure how many other people would find it useful or usable.

Plex has different scanners and agents, one for movies, one for TV programs, and one for "other" MP4 files such as youtube vids, etc. The movie and TV scanner/agent combos tend to rely on online info sources instead of metadata. The "other" scanner/agent category relies on metadata. The movie and TV scanner/agent combos work surprisingly well. I use MakeMKV and Handbrake to transfer my movies from DVD/blu-ray to MP4s and all I have to do is make sure the filename and release year are correct and I get a ton of info, including cast, directors, screen writers, etc. But the metadata-driven agent doesn't seem to get much attention from the developers.