Giter Site home page Giter Site logo

merge_srt_files's Introduction


Merge 2 srt files into 1 srt,for making bilingual subtitle file,by the closest timestamp, e.g.

0x1,srt1 is:

.....

1
00:01:01,774 --> 00:01:04,193
<i>Why are the English still with us?</i>

2
00:01:05,236 --> 00:01:07,029
<i>Why, after everything we've thrown at them,</i>

3
00:01:07,113 --> 00:01:09,865
<i>does the British presence in Ireland still endure?</i>

4
00:01:09,949 --> 00:01:13,410
<i>So many sacrifices have been made.</i>

......

0x2,srt2 is:

......

2
00:01:01,774 --> 00:01:03,859
‎英国人为什么还在我们这里?

3
00:01:05,236 --> 00:01:07,780
‎在我们以各种方式 ‎表达了我们对他们的厌恶之后

4
00:01:07,863 --> 00:01:09,865
‎英国人为什么还在爱尔兰持续出现?

6
00:01:11,158 --> 00:01:13,410
‎人们做了那么多牺牲


......

0x3,After merge, you'll get a srt like:

......

2
00:01:01,774 --> 00:01:04,193
<i>Why are the English still with us?</i>
‎英国人为什么还在我们这里?

3
00:01:05,236 --> 00:01:07,029
<i>Why, after everything we've thrown at them,</i>
‎在我们以各种方式 ‎表达了我们对他们的厌恶之后

4
00:01:07,113 --> 00:01:09,865
<i>does the British presence in Ireland still endure?</i>
‎英国人为什么还在爱尔兰持续出现?

6
00:01:09,949 --> 00:01:13,410
<i>So many sacrifices have been made.</i>
‎人们做了那么多牺牲

......


# howto

"Usage: python merge.py basefile_path.srt transfile_path.srt";

"Merged srt will be found next to the basefile_path.srt";

merge_srt_files's People

Contributors

dex7erhan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.