Created
September 22, 2016 22:11
-
-
Save andrearota/82873d2d6e5ae21a03fd79fc7ebaf170 to your computer and use it in GitHub Desktop.
How to extract srt subtitles from an mkv file
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 characters
# Find all the .mkv file in the current folder and for each one extract the srt with ffmpeg | |
# We assume that the srt is the stream 0:2, change it according to your file | |
find . -name "*.mkv" -exec ffmpeg -i {} -map 0:2 {}.srt \; | |
# Now rename the .mkv.srt to .srt, in order to have them automatically loaded by VLC and other players | |
for j in *.mkv.srt; do mv -v -- "$j" "${j%.mkv.srt}.srt"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment