srt.tools.add

Add a subtitle to subtitles.

add(subs, start, end, content='', adjust=False)

Adds a subtitle to subtitles in the correct position.

Parameters
  • subsSubtitle objects

  • start (datetime.timedelta) – The timestamp the subtitle starts at.

  • end (datetime.timedelta) – The timestamp the subtitle ends at.

  • adjust (boolean) – Whether to adjust the timestamps of subsequent subtitles.

Return type

generator of Subtitle objects