Skip to content

Instantly share code, notes, and snippets.

@kurlov
Created December 16, 2017 23:41
Show Gist options
  • Star 47 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save kurlov/32cbe841ea9d2b299e15297e54ae8971 to your computer and use it in GitHub Desktop.
Save kurlov/32cbe841ea9d2b299e15297e54ae8971 to your computer and use it in GitHub Desktop.
ffmpeg command to add .srt based subtitles to an .mkv file
ffmpeg -i in.mkv -f srt -i in.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s srt out.mkv
@nxtreaming
Copy link

ffmpeg -i $1 -f ass -i $2 -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s ass $RANDOM.mkv

I confirm this code is fine.

Thanks.

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