Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
extract subtitles from *.mkv-files on osx
lines with $ are commands
### install mkvtoolnix:
$ brew install mkvtoolnix
### list content of the mkv-file:
$ mkvmerge -i mymoviefile.mkv
### what will give you:
File 'mymoviefiel.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_DTS)
Track ID 3: subtitles (S_TEXT/UTF8)
Track ID 4: subtitles (S_TEXT/UTF8)
Chapters: 22 entries
### so the subtitle-tracks are number 3 and 4.
### extract all subtitle-tracks into a seperate srt-file / lang
$ mkvextract tracks mymoviefile.mkv 3:sub3.srt 4:sub4.srt
@bmaeser

This comment has been minimized.

Copy link
Owner Author

@bmaeser bmaeser commented Jun 27, 2015

thx for the tip!

@JayHoltslander

This comment has been minimized.

Copy link

@JayHoltslander JayHoltslander commented Jul 29, 2015

@muchbetterbig Did you create a GitHub account just to post a link to that? Seems kind of shady. Don't think I'd trust running that installer.

@JayHoltslander

This comment has been minimized.

Copy link

@JayHoltslander JayHoltslander commented Jul 29, 2015

This free GUI tool worked for me. Saved the subtitles as .mks format. Link

@renanyoy

This comment has been minimized.

Copy link

@renanyoy renanyoy commented Aug 26, 2015

you can also use "mac ports" to install it: sudo port install mkvtoolnix

@MaureenD

This comment has been minimized.

Copy link

@MaureenD MaureenD commented Jul 10, 2016

I do appreciate this gist. Downloaded the free GUI but this is so much easier.

@pavelbinar

This comment has been minimized.

Copy link

@pavelbinar pavelbinar commented Oct 10, 2016

👍 Thank you. Worked as described.

@kesarion

This comment has been minimized.

Copy link

@kesarion kesarion commented Feb 25, 2017

Amazing! This works for any subtitle format and even attachments (fonts). Thank you very much!

@pavelbinar

This comment has been minimized.

Copy link

@pavelbinar pavelbinar commented Apr 28, 2020

I polished your instructions a bit and added some useful info:
https://gist.github.com/pavelbinar/20a3366b54f41e355d2745c89091ec46#file-subtitle-extract-md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment