Rename MKV Video Track Title with FFmpeg

This guide explains how to rename or set the title of a specific video track inside an MKV (Matroska) container using the FFmpeg command-line tool. By using metadata mapping and stream copying, you can update the track name in seconds without losing quality or re-encoding the video.

To rename a specific video track, you need to target the metadata of that stream using the -metadata:s:v option. Here is the basic command to rename the title of the first video track:

ffmpeg -i input.mkv -map 0 -c copy -metadata:s:v:0 title="Your New Track Title" output.mkv

Command Breakdown

Renaming Multiple Video Tracks

If your MKV container has multiple video tracks (for example, a main video and a picture-in-picture commentary video) and you want to rename a specific one, change the index number at the end of the stream identifier:

Verifying the Changes

After running the command, you can verify that the metadata has been updated successfully by running ffprobe on the output file:

ffprobe output.mkv

Look for the video stream information in the output, where you should see the title tag updated to your new name.