-
-
Save tomickigrzegorz/570ddb5c4d2d60f5f665a6e74ea53e67 to your computer and use it in GitHub Desktop.
Revisions
-
pavelbinar revised this gist
Apr 28, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,18 @@ # Extract Subtitles From `.mkv` These instructions shall work on Mac OS X and Linux. ## Install `mkvtoolnix` (Mac OS X) Installation via [Homebrew](http://brew.sh/): brew install mkvtoolnix ## List content of the `.mkv` file mkvmerge -i myFile.mkv ### Example of the file content File 'myFile.mkv': container: Matroska Track ID 1: video (V_MPEG4/ISO/AVC) @@ -33,7 +33,7 @@ Enjoy! ## Extract Multiple Files In case you need this in batch for all files in a directory (works only if all files have the same subtitle Track IDs). Make sure you use correct file extension (`*.mkv`) and track-ids (`3`) -
pavelbinar revised this gist
Aug 16, 2019 . 1 changed file with 18 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,4 +27,21 @@ Track ID 3 and 4 are subtitles. mkvextract tracks myFile.mkv 3:myFile1.srt 4:myFile2.srt Enjoy! --- ## Extract Multiple Files In case you need to this in batch for all files in a directory. Works only if all files have same subtitle Track IDs. Make sure you use correct file extension (`*.mkv`) and track-ids (`3`) Example: ```bash for file in *.mkv; do sub=$(echo $file | sed 's/\.mkv$/.srt/'); mkvextract tracks "${file}" 3:"${sub}"; done ``` -
pavelbinar revised this gist
Oct 10, 2016 . 2 changed files with 30 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ # 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](http://brew.sh/) 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! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +0,0 @@ -
bmaeser revised this gist
Sep 2, 2011 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,20 @@ 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 created this gist
Sep 2, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ 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