How to merge two .srt files

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

Suppose we have two subtitle files: CD1.srt and CD2.srt. We want to merge them into one single file CD.srt.

We assume that CD1.srt is properly synchronized. We need to shift all the times in CD2.srt.
We need to find out the duration to add to CD2.srt.

Method 1:
ffmpeg -i CD1.avi
Check the line with the Duration of the file.

Method2:
Simply watch the movie and fast-forward to the beginning of CD2. Note the time at which the first line of CD2.srt appears. Subtract the time which was set for that line.

Install dev-python/pysrt then do:
srt -i shift 64m4s CD2.srt
where 64m4s is the time shift to apply.

Then merge the two files:

cat CD1.srt CD2.srt > CD.srt

Issues related to this page:

ProjectSummaryStatusPriorityCategoryLast updatedAssigned to
Linux softwarepysrt: no option to merge two .srt filesactivenormalfeature request6 years 27 weeks