ffmpeg -i input.mp4 -i subtitle.srt -c copy -c:s mov_text -metadata:s:s:0 language=eng output.mp4 ffmpeg -i input.mp4 -i subtitle.srt -c copy -c:s srt -metadata:s:s:0 language=eng output.mkv
NOTE: Different syntax is used for MP4 and MKV.
ffmpeg -i input.mp4 -vf subtitles=subtitle.srt output.mp4
NOTE: The subtitles will be added to the video using the default font styles.
Use a SRT subtitle file and change the size of the font by putting ASS style format KEY=VALUE pairs separated by a comma.
ffmpeg -i input.mp4 -vf subtitles=sub.srt:force_style='FontName=DejaVu Serif,FontSize=24' -vcodec libx264 -acodec copy -q:v 0 -q:a 0 output.mp4
NOTE: This will put the subtitles with DejaVu font and size 24 while keeps the quality of the video.