ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4
The order of -c copy -c:s mov_text
is important. You are telling FFmpeg:
- Video: copy, Audio: copy, Subtitle: copy
- Subtitle: mov_text
If you reverse them, you are telling FFmpeg:
- Subtitle: mov_text
- Video: copy, Audio: copy, Subtitle: copy
Alternatively you could just use -c:v copy -c:a copy -c:s mov_text
in any order.