I'm trying to figure out how I can put together a python script to tag my MP4/M4V files so that they have all the metadata I want in iTunes.

I have all the information-getting down fine. But I can't for the life of me figure out how metadata and iTunes and MP4/M4v files all work/are related.

At the moment most of what I'm looking to add is TV-related. So I'm looking to add/edit things like Title, TV Show Name, TV Network, Season Number, Episode Number, Description, Track Number, Artwork, Rating, Media Kind, Track Number, Disc Number, Genre, etc.

I can get the atom 4char codes for these, but I can't figure out how to set them.

Some of the documentation I've come across makes it sound like there is a file somewhere within the MP4/M4V container that contains all this information? Could I use a script to open that file, edit the text, save it, and close it?

My project uses FFMPEG some at the moment, so if I'm going to have to use an external program I suppose that would be my preference (if possible).

It seems like for most of these there should be an easy way to edit the metadata; but I don't know enough about any of this to be sure.
Robin Hood Reviewed by Robin Hood on . Metadata & Tagging Video Files for iTunes (Python) I'm trying to figure out how I can put together a python script to tag my MP4/M4V files so that they have all the metadata I want in iTunes. I have all the information-getting down fine. But I can't for the life of me figure out how metadata and iTunes and MP4/M4v files all work/are related. At the moment most of what I'm looking to add is TV-related. So I'm looking to add/edit things like Title, TV Show Name, TV Network, Season Number, Episode Number, Description, Track Number, Rating: 5