Created
June 4, 2016 21:26
-
-
Save Cougar/0f8b4bc028df9856b7af6fad018bff2e to your computer and use it in GitHub Desktop.
Add new subtitle to MKV file
This file contains 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
ffmpeg -i source.mkv -f srt -i source.srt -map 0 -c:v copy -c:a copy -scodec copy -map 1 -scodec srt -metadata:s:s:10 language=est new.mkv |
To extract subtitle for existing MKV file use (0:4 is subtitle stream):
ffmpeg -i source.mkv -an -vn -map 0:4 -c:s:0 srt subtitle4.srt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"10" is a subtitle index counted from 0. 10 means that there are already 10 subtitles (0-9) and added one will be 10th. If this is the only subtitle, then use index "0". Subtitle stream will be 12 or more (one for video, one or more for audio and then subtitles from 2 or upwards).