How to do everything in ffmpeg
This is everything I know to do in ffmpeg.
Adding a subtitle track from an external source:
ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4
Burning subtitles into a video from an external source:
ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi
Burning subtitles into a video from the subtitle track:
ffmpeg -i video.mkv -vf subtitles=video.mkv out.avi
Extracting a subtitle track to a subtitle file:
ffmpeg -txt_format text -i input_file.mkv out.srt
Delay subtitles in file by 2.5 seconds (pull ahead with negative value, cannot pull ahead more than first timestamp):
ffmpeg -itsoffset 2.5 -i subtitles.srt -c copy subtitles-delayed.srt