Depending on a video or audio container it can store various metadata or information like title, description, year, author, episode, album, track etc.
Using FFmpeg to add this metadata to a media file is a simple task. The parameter is
-metadata X=
With X being the type of metadata being added, you can find this information in the tables below. If I wanted to add a title to my video here is the command:
ffmpeg -i input.mp4 -metadata title="The video titile" -c copy output.mp4
This will produce:
As i used copy no encoding was done and this process happened instantly.
Here are the metadata keys:
MP4, MOV, and Quicktime
| Data key |
|---|
| “title” |
| “author” |
| “album_artist” |
| “album” |
| “grouping” |
| “composer” |
| “year” |
| “track” |
| “comment” |
| “genre” |
| “copyright” |
| “description” |
| “synopsis” |
| “show” |
| “episode_id” |
| “network” |
| “lyrics” |
MP3
| Data key | Tag |
|---|---|
| album | TALB |
| composer | TCOM |
| genre | TCON |
| copyright | TCOP |
| encoded_by | TENC |
| title | TIT2 |
| language | TLAN |
| artist | TPE1 |
| album_artist | TPE2 |
| performer | TPE3 |
| disc | TPOS |
| publisher | TPUB |
| track | TRCK |
| encoder | TSSE |
| lyrics | USLT |
| compilation | TCMP |
| date | TDRC |
| date | TDRL |
| creation_time | TDEN |
| album-sort | TSOA |
| artist-sort | TSOP |
| title-sort | TSOT |
| album | TAL |
| genre | TCO |
| compilation | TCP |
| title | TT2 |
| encoded_by | TEN |
| artist | TP1 |
| album_artist | TP2 |
| performer | TP3 |
| track | TRK |
