Rename Audio Track Title in MKV with FFmpeg
This guide provides a straightforward method for renaming a specific audio track’s title within an MKV container using the powerful command-line tool FFmpeg. You will learn the exact command structure needed to target a specific audio stream, modify its metadata title, and save the file instantly without re-encoding the audio or video.
Step 1: Identify the Audio Track Index
Before renaming a track, you must identify its index number. Run the following command in your terminal to list all streams within your MKV file:
ffprobe input.mkvLook at the output to find the audio streams. FFmpeg indexes audio
streams starting from 0. * The first audio track is s:a:0 *
The second audio track is s:a:1 * The third audio track is
s:a:2 (and so on)
Step 2: Run the FFmpeg Command to Rename the Title
Once you know the index of the audio track you want to change, use
the following FFmpeg command. In this example, we will rename the
second audio track (s:a:1) to “Director’s
Commentary”.
ffmpeg -i input.mkv -map 0 -c copy -metadata:s:a:1 title="Director's Commentary" output.mkvCommand Breakdown:
-i input.mkv: Specifies the input file.-map 0: Tells FFmpeg to copy all streams (video, audio, subtitles) from the input file to the output file. If you omit this, FFmpeg might only copy one video and one audio stream.-c copy: Copies all streams without re-encoding. This process is lossless and takes only a few seconds.-metadata:s:a:1 title="Director's Commentary": Targets the metadata of stream (s), specifically audio (a), index1(the second audio track), and changes itstitletag.output.mkv: The name of the newly created MKV file containing the updated track title.