solution from https://stackoverflow.com/a/17584272/2627873
This solution adds the subtitles to the video as a separate optional (and user-controlled) subtitle track.
So you can choose the subtitle in VLC for example, it's not hard-coded or burned-in. And it won't re-encode the entire file so it's really fast.
- ffmpeg is required
- movie = great_movie.mp4 (works with mkv too)
- subtitle = great_movie.english.srt
ffmpeg -i great_movie.mp4 -i great_movie.en.srt -c copy -c:s mov_text great_movie_subbed.mp4
Another solution : https://www.reck.dk/use-ffmpeg-to-add-subtitles-to-video/
ffmpeg -i great_movie.mp4 -i great_movie.en.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s mov_text great_movie_subbed.mp4