Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.55 KB

README.md

File metadata and controls

49 lines (31 loc) · 1.55 KB

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.