Skip to content

Python3 script to merge two srt subtitles into one srt file. The idea of using merged subtitles (let's call them dual subtitles or bilingual subtitles) is to watch movies/series in original version with two sets of subtitles. This can be used to learn a second language while watching movies/series.

License

Notifications You must be signed in to change notification settings

malfroid/merge-srt-subtitles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

merge-srt-subtitles

This is a python3 script that allows a user to merge two .srt subtitles with different languages, and create one dual-language subtitle.

The idea of using merged subtitles (let's call them dual subtitles or bilingual subtitles) is to watch movies/series in original version with two sets of subtitles. This can be used to learn a second language while watching movies/series.

The primary subtitle will be shown at the bottom of the screen in yellow. The secondary subtitle will be shown at the top of the screen in white.

Screenshot of dual subtitle

Setup

  • Clone this repo to your desktop
  • Install srt library: pip3 install srt

Test

After cloning this repo to your desktop and installing the srt library, go to its root directory and test:

python3 merge_subtitles.py -p de -s nl

This tests the script using the primary subtitle a.de.srt and secondary b.nl.srt, creating the merged file a.merged.srt.


Usage examples

The script expects in the working directory two subtitle files, with the filename in the following format: <title>.<language>.srt. Example: a.de.srt.

Run the script as follows:

python3 merge_subtitles.py -p <primary_language> -s <secondary_language>

or

python3 merge_subtitles.py --primary <primary_language> --secondary <secondary_language>

License

You can check out the full license here

This project is licensed under the terms of the MIT license.

About

Python3 script to merge two srt subtitles into one srt file. The idea of using merged subtitles (let's call them dual subtitles or bilingual subtitles) is to watch movies/series in original version with two sets of subtitles. This can be used to learn a second language while watching movies/series.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages