How to add new — and non-defined — metadata to an MP4 file?

I have been trying to understand how to add some additional metadata to a MP4 file. I understand how to add metadata, like this:

ffmpeg -i bb.mp4 -metadata title="my title" bb2.mp4 

But what I am looking for is how to add some new tags something like this:

ffmpeg -i bb.mp4 -metadata newTag="newTag" bb2.mp4 

newTag might be something like author's birthday, anything new not already existing!

Is this even possible?

1

3 Answers

By default, FFmpeg supports the limited number of iTunes tags in the MP4 format. These are listed below. But custom tags can be written if -movflags use_metadata_tags is added. This applies both for adding new tags or carrying over custom global tags from the input.

iTunes tags supported in MP4:

"title" "artist" "album_artist" "composer" "album" "date" "encoding_tool" "comment" "genre" "copyright" "grouping" "lyrics" "description" "synopsis" "show" "episode_id" "network" "episode_sort" "season_number" "media_type" "hd_video" "gapless_playback" "compilation" 

The Matroska format accepts custom tags.

I've found that for my needs I wanted the exif metadata and the exiftool was the right solution.

You can copy metadata between video files:

There's a trick to copy all metadata using the option -all:all>all:all:

You can use this:

ffmpeg -i bb.mp4 -movflags use_metadata_tags -metadata newTag="newTag" bb2.mp4 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like