Giter VIP home page Giter VIP logo

srtmerge's Introduction

srtmerge

Merge and clean up multi-line and multi-language subtitle files.


Purpose

Some closed caption subtitle files contain multiple lines of subtitle in a single subtitle timing block.

This script merges multiple lines into a single line. If Non-English translation lines are also present, they will be seperately merged into another line, on top of the English line.

We use Chinese as the intended translated language. This script may not apply to some languages with the same charset to English.

Usage

To merge a subtitle file containing multiple lines of English and/or translated lines:
python merge.py /path/to/original/subtitle.srt /path/to/output/subtitle.srt
To split a subtitle file containing multiple lines of English and/or translated lines, into two separate subtitle files -- one for English, and one for translated:
python split.py /path/to/original/subtitle.srt /path/to/output/subtitle
Note that /path/to/output/subtitle.en.srt and /path/to/output/subtitle.ch.srt will be created.

用途

merge.py 将带有多行英文的SRT字幕合并成单行。如果同时有中文翻译行,中文翻译单独合并成单行,并置于对应的英文行上方。
split.py 将带有多行英文的SRT字幕合并成单行。如果同时有中文翻译行,中文翻译单独合并成单行放进一个文件,英文行放在另外一个文件里。

用法如上方。

License
Copyright (c) sundaymouse 2014
License: GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007.
For full license details, see: http://www.gnu.org/copyleft/gpl.html

srtmerge's People

Contributors

sundaymouse 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.