PGTS PGTS Pty. Ltd.   ACN: 007 008 568

point Site Navigation

point Other Blog Threads



  Valid HTML 4.01 Transitional

   Stop The Internet Filter!

   No Clean Feed

   The Internet Filter Is An Ex-parrot!






PGTS Humble Blog

Thread: Tips/Tricks For Programming etc

Author Image Gerry Patterson. The world's most humble blogger
Edited and endorsed by PGTS, Home of the world's most humble blogger

Editing MP4 Tags.


Chronogical Blog Entries:



Date: Mon, 31 Mar 2014 23:30:00 +1000

There's been many changes to audio and video tools in Linux. Recently I found myself searching for something that would enable modifying MP4 tags from the command line.

The package mp4-utils is now called mp4v2-utils. You can download it with:

    sudo apt-get install mp4v2-utils

There doesn't appear to be any man page for the package, but it should be easy to figure out the various functions. The list of commands is as follows:

    /usr/bin/mp4art
    /usr/bin/mp4chaps
    /usr/bin/mp4extract
    /usr/bin/mp4file
    /usr/bin/mp4info
    /usr/bin/mp4subtitle
    /usr/bin/mp4tags
    /usr/bin/mp4track
    /usr/bin/mp4trackdump

For some of these you can get help by using the option -h or --help ... Or just the command with no arguments.

You can view tag info with a command like the following

    mp4info foo*mp4

Which would process all the files with that skeleton and put the details to STDOUT.

If you enter this command:

    mp4tags --help

You will be given a list of the tags that can be modified (printed to STDERR):

    usage mp4tags 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(tvshow, movie, music, ...)
      -I, -contentid   NUM  Set the content ID
      -j, -genreid     NUM  Set the genre ID
      -l, -longdesc    STR  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
      -O, -category    STR  Set the category
      -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 song title
      -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)
      -X, -rating      STR  Set the Rating(none, clean, explicit)
      -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
      -r, -remove      STR  Remove tags by code (e.g. "-r cs"
                            removes the comment and song tags)

Other Blog Posts In This Thread:

Copyright     2014, Gerry Patterson. All Rights Reserved.