howto:mkv-edit
This is an old revision of the document!
Edit MKV Files
To remove audio or subtitle tracks from mkv files, the mkvmerge command can be used.
First, identify the track ids contained in the mkv file:
mkvmerge -i videofile.mkv
The output will look something like this:
kax i am at 6718 File 'videofile.mkv': container: Matroska Track ID 0: audio (AC3/EAC3) Track ID 1: subtitles (SubRip/SRT) Track ID 2: subtitles (SubRip/SRT) Track ID 3: video (MPEG-4p10/AVC/h.264) Track ID 4: audio (DTS) Chapters: 17 entries Tags for track ID 0: 7 entries Tags for track ID 1: 7 entries Tags for track ID 2: 7 entries Tags for track ID 3: 7 entries Tags for track ID 4: 7 entries
To create a new mkv file with the subtitles removed and only keeping the second audio stream, use the following command:
mkvmerge -o newvideofile.mkv -a 4 -s 0 videofile.mkv
howto/mkv-edit.1504435193.txt.gz · Last modified: 2023/05/29 11:53 (external edit)