Skip to content

Instantly share code, notes, and snippets.

@Barlog951
Forked from pavelbinar/extract-subtitles-from-mkv.md
Created January 19, 2018 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Barlog951/973dd48cec69ef33993d57ae7af175a4 to your computer and use it in GitHub Desktop.
Save Barlog951/973dd48cec69ef33993d57ae7af175a4 to your computer and use it in GitHub Desktop.
Extract subtitles from *.mkv files on Mac OS X

Extract Subtitles From .mkv

This instructions whall work on any system (Mac OS X, Linux) supporting installation of mkvtoolnix

Install mkvtoolnix

If you don't have Homebrew installed, do it first, the continue with following command:

brew install mkvtoolnix

List content of the .mkv file

mkvmerge -i myFile.mkv

Example of file content

File 'myFile.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

Track ID 3 and 4 are subtitles.

Extract subtitles tracks into separate files

mkvextract tracks myFile.mkv 3:myFile1.srt 4:myFile2.srt

Enjoy!

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