bennynihon
13th August 2014, 19:50
Figured I'd share this since I had a hard time finding Windows binaries of mp4v2. I built the latest repository revision (504) and added a patch (more info (https://code.google.com/p/mp4v2/issues/detail?id=18)) that includes a greater number of tags that can be added with the mp4tags binary (e.g. actors, directors, rating, etc.).
usage d:\apps\mp4v2\mp4tags.exe OPTION... FILE...
Adds or modifies iTunes-compatible tags on MP4 files.
-help Display this help text and exit
-version Display version information and exit
-A, -album STR Set the album title
-a, -artist STR Set the artist information
-b, -tempo NUM Set the tempo (beats per minute)
-c, -comment STR Set a general comment
-C, -copyright STR Set the copyright information
-d, -disk NUM Set the disk number
-D, -disks NUM Set the number of disks
-e, -encodedby STR Set the name of the person or company who encoded the file
-E, -tool STR Set the software used for encoding
-g, -genre STR Set the genre name
-G, -grouping STR Set the grouping name
-H, -hdvideo NUM Set the HD flag (1\0)
-i, -type STR Set the Media Type("Movie", "TV Show", "Music Video", ...)
-I, -contentid NUM Set the content ID
-j, -genreid NUM Set the genre ID
-l, -longdesc NUM Set the long description
-L, -lyrics NUM Set the lyrics
-m, -description STR Set the short description
-M, -episode NUM Set the episode number
-n, -season NUM Set the season number
-N, -network STR Set the TV network
-o, -episodeid STR Set the TV episode ID
-p, -playlistid NUM Set the playlist ID
-P, -picture PTH Set the picture as a .png
-B, -podcast NUM Set the podcast flag.
-R, -albumartist STR Set the album artist
-s, -song STR Set the title of the song, movie, tv show,...
-S -show STR Set the TV show
-t, -track NUM Set the track number
-T, -tracks NUM Set the number of tracks
-x, -xid STR Set the globally-unique xid (vendor:scheme:id)
-w, -writer STR Set the composer information
-y, -year NUM Set the release date
-z, -artistid NUM Set the artist ID
-Z, -composerid NUM Set the composer ID
-W, -cast STR Set the cast|actors tag (AppleTV)
-F, -director STR Set the director tag (AppleTV)
-J, -codirector STR Set the codirector tag (AppleTV)
-K, -producers STR Set the producers tag (AppleTV)
-O, -swriters STR Set the screen writers tag (AppleTV)
-Q, -copywarning STR Add copy warning (AppleTV)
-U, -studio STR Add film studio (AppleTV)
-Y, -rating STR Add film ratings (AppleTV)
-V -rannotation STR Add rating annotation to the ratings, ie rated r for violence
-X -crating STR Add content rating tag. "Inoffensive", "Clean", "Explicit"
-r, -remove STR Remove tags by code (e.g. "-r cs"
removes the comment and song tags)
An example that first uses mp4box to mux and then tags and touches up the file for optimal support on Apple devices
"c:\Program Files\GPAC\mp4box.exe" -add "video.264:fps=23.976:delay=0:lang=en:name=H.264 AVC" \
-add "audio.m4a:group=1:delay=0:lang=en:name=AAC Dolby Pro Logic II" \
-add "audio.ac3:group=1:delay=0:lang=en:disable:name=AC3 Dolby Digital 5.1" \
-add "subtitles.srt:hdlr=sbtl:group=2:layer=-1:delay=0:lang=en:disable:name=English" \
-add "chapters.txt:chap" -ipod -new "output.m4v"
"d:\apps\mp4v2\mp4chaps.exe" --convert --chapter-qt output.m4v
"d:\apps\mp4v2\mp4tags.exe" -s "Terminator 2: Judgement Day" -hdvideo 2 -type "Movie" \
-year "1991" -genre "Sci-Fi" -rating "R" -studio "TriStar Pictures" -director "James Cameron" \
-cast "Arnold Schwarzenegger, Linda Hamilton, Robert Patrick, Edward Furlong" \
-description "A cyborg, identical to the one who failed to kill Sarah Connor, must now protect \
her teenage son, John, from a more advanced cyborg, made out of liquid metal." output.m4v
"d:\apps\mp4v2\mp4art.exe" --add cover.jpg output.m4v
"d:\apps\mp4v2\mp4file.exe" --optimize output.m4v
usage d:\apps\mp4v2\mp4tags.exe OPTION... FILE...
Adds or modifies iTunes-compatible tags on MP4 files.
-help Display this help text and exit
-version Display version information and exit
-A, -album STR Set the album title
-a, -artist STR Set the artist information
-b, -tempo NUM Set the tempo (beats per minute)
-c, -comment STR Set a general comment
-C, -copyright STR Set the copyright information
-d, -disk NUM Set the disk number
-D, -disks NUM Set the number of disks
-e, -encodedby STR Set the name of the person or company who encoded the file
-E, -tool STR Set the software used for encoding
-g, -genre STR Set the genre name
-G, -grouping STR Set the grouping name
-H, -hdvideo NUM Set the HD flag (1\0)
-i, -type STR Set the Media Type("Movie", "TV Show", "Music Video", ...)
-I, -contentid NUM Set the content ID
-j, -genreid NUM Set the genre ID
-l, -longdesc NUM Set the long description
-L, -lyrics NUM Set the lyrics
-m, -description STR Set the short description
-M, -episode NUM Set the episode number
-n, -season NUM Set the season number
-N, -network STR Set the TV network
-o, -episodeid STR Set the TV episode ID
-p, -playlistid NUM Set the playlist ID
-P, -picture PTH Set the picture as a .png
-B, -podcast NUM Set the podcast flag.
-R, -albumartist STR Set the album artist
-s, -song STR Set the title of the song, movie, tv show,...
-S -show STR Set the TV show
-t, -track NUM Set the track number
-T, -tracks NUM Set the number of tracks
-x, -xid STR Set the globally-unique xid (vendor:scheme:id)
-w, -writer STR Set the composer information
-y, -year NUM Set the release date
-z, -artistid NUM Set the artist ID
-Z, -composerid NUM Set the composer ID
-W, -cast STR Set the cast|actors tag (AppleTV)
-F, -director STR Set the director tag (AppleTV)
-J, -codirector STR Set the codirector tag (AppleTV)
-K, -producers STR Set the producers tag (AppleTV)
-O, -swriters STR Set the screen writers tag (AppleTV)
-Q, -copywarning STR Add copy warning (AppleTV)
-U, -studio STR Add film studio (AppleTV)
-Y, -rating STR Add film ratings (AppleTV)
-V -rannotation STR Add rating annotation to the ratings, ie rated r for violence
-X -crating STR Add content rating tag. "Inoffensive", "Clean", "Explicit"
-r, -remove STR Remove tags by code (e.g. "-r cs"
removes the comment and song tags)
An example that first uses mp4box to mux and then tags and touches up the file for optimal support on Apple devices
"c:\Program Files\GPAC\mp4box.exe" -add "video.264:fps=23.976:delay=0:lang=en:name=H.264 AVC" \
-add "audio.m4a:group=1:delay=0:lang=en:name=AAC Dolby Pro Logic II" \
-add "audio.ac3:group=1:delay=0:lang=en:disable:name=AC3 Dolby Digital 5.1" \
-add "subtitles.srt:hdlr=sbtl:group=2:layer=-1:delay=0:lang=en:disable:name=English" \
-add "chapters.txt:chap" -ipod -new "output.m4v"
"d:\apps\mp4v2\mp4chaps.exe" --convert --chapter-qt output.m4v
"d:\apps\mp4v2\mp4tags.exe" -s "Terminator 2: Judgement Day" -hdvideo 2 -type "Movie" \
-year "1991" -genre "Sci-Fi" -rating "R" -studio "TriStar Pictures" -director "James Cameron" \
-cast "Arnold Schwarzenegger, Linda Hamilton, Robert Patrick, Edward Furlong" \
-description "A cyborg, identical to the one who failed to kill Sarah Connor, must now protect \
her teenage son, John, from a more advanced cyborg, made out of liquid metal." output.m4v
"d:\apps\mp4v2\mp4art.exe" --add cover.jpg output.m4v
"d:\apps\mp4v2\mp4file.exe" --optimize output.m4v