Adding Title and Author Metadata to MP4 with FFmpeg
This article provides a quick, practical guide on how to embed title and author metadata into an MP4 video file using FFmpeg on the Linux command line. You will learn the exact syntax required to inject these tags, how to preserve the original video and audio quality without re-encoding, and how to verify that the metadata was successfully applied.
The FFmpeg Metadata Command
To add title and author (often mapped to the “artist” tag) metadata
to an MP4 file, you use the -metadata flag. By combining
this with the stream copy command, you can apply the changes instantly
without altering the video or audio tracks.
The standard command structure is:
ffmpeg -i input.mp4 -metadata title="Your Video Title" -metadata artist="Author Name" -c copy output.mp4Command Breakdown
-i input.mp4: Specifies the path to your original video file.-metadata title="Your Video Title": Injects the global title into the file container.-metadata artist="Author Name": Injects the author or creator name into the artist metadata field, which MP4 readers recognize as the author.-c copy: Instructs FFmpeg to copy the video and audio streams directly without re-encoding them. This prevents quality loss and finishes the process in a few seconds.output.mp4: The name of the new file containing the embedded metadata.
Verifying the Metadata
After creating the updated file, you can verify that the tags were correctly written by using FFmpeg’s companion tool, FFprobe. Run the following command in your terminal:
ffprobe -show_entries format_tags=title,artist -of default=noprint_wrappers=1 output.mp4This will output the specific title and artist tags embedded in the container, confirming that your Linux command line operation was successful.