FFmpeg add Metadata to QuickTime/MOV/MP4/M4A

Basic Usage

FFmpeg has a free-form command line option that allows the user to specify key/value pairs for encoding metadata. The option is -metadata and is used as such:

 ffmpeg -i inputfile -metadata title="Movie Title" -metadata year="2010" outputfile

Whether the metadata key/value pairs are actually encoded into the output file is dependent upon the file format being muxed. Many formats only support a handful of metadata keys. This page documents which keys FFmpeg will encode into which formats.

QuickTime/MOV/MP4/M4A/et al.

The following table shows the metadata keys that FFmpeg honors when muxing a QuickTime file. The low-level identifier column lists the atom name that the format uses to encode the data on disc, which is not interesting to most readers. For the interested but uninitiated, the notation, e.g., ‘\251nam’ indicates a 4-byte code consisting of the byte A9 in hexadecimal (or 251 in octal) followed by the ASCII characters ‘n’, ‘a’, and ‘m’.

Key iTunes field Low-level identifier
“title” Name ‘\251nam’
“author” Artist ‘\251ART’
“album_artist” Album Artist ‘aART’
“album” Album ‘\251alb’
“grouping” Grouping ‘\251grp’
“composer” Composer ‘\251wrt’
“year” Year ‘\251day’
“track” Track Number ‘trkn’
“comment” Comments ‘\251cmt’
“genre” Genre ‘\251gen’
“copyright” ?? ‘\251cpy’
“description” Description ‘desc’
“synopsis” Information dialog when selecting “Show Description” in context menu ‘ldes’
“show” Show ‘tvsh’
“episode_id” Episode ID ‘tven’
“network” ?? ‘tvnn’
“lyrics” Lyrics ‘\251lyr’

Further, the MOV muxer encodes libavformat version string into the ‘\251too’ field. FFmpeg does not allow this key to be overridden from the command line

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.