Delay and Merge Multiple SRT Subtitles into MKV with FFmpeg

This article provides a straightforward guide on how to use FFmpeg to multiplex multiple SRT subtitle tracks into a single MKV video file while applying individual time delays to each subtitle track. By using the -itsoffset option, you can precisely synchronize each language track with the video without permanently altering the original SRT files.

To multiplex multiple subtitles with unique delay offsets, you must structure your FFmpeg command so that the offset option is placed immediately before the input subtitle file it is meant to affect.

Here is the template command to achieve this:

ffmpeg -i input.mp4 \
  -itsoffset 2.5 -i subtitle_eng.srt \
  -itsoffset -1.8 -i subtitle_spa.srt \
  -map 0:v -map 0:a -map 1 -map 2 \
  -c:v copy -c:a copy -c:s copy \
  -metadata:s:s:0 language=eng -metadata:s:s:0 title="English" \
  -metadata:s:s:1 language=spa -metadata:s:s:1 title="Spanish" \
  output.mkv

Command Breakdown