Skip to main content

A simple tool that translates video subtitles

Project description

<nav class="contents" id="table-of-contents" role="doc-toc">

Table of Contents:



Translate Video Subtitles

subtrs is a simple tool that translates subtitles from files.

The main idea came when using the YouTube auto-tool to translate my videos subtitles, I saw that the translation sucked.
So I decided to create this simple tool and translate my subtitles more successfully.



$ pip3 install subtrs --upgrade

Command line usage

Usage: subtrs [subtitles_file] [destination languages]

       Simple tool that trlanslates video subtitles

       Support subtitles files [*.sbv, *.vtt, *.srt]
       Destination languages [en,de,ru] etc.

Optional arguments:
       --color      View translate text language with colour.
       --progress   Show progress bar.
  -l,  --languages  Show all supported languages.
  -v,  --version    Print the version and exit.
  -h,  --help       Show this message and exit.


$ subtrs el --progress
Processing |########                        | 47/180

An example which create multiple subtitles files:

$ subtrs zh-cn,de,ru --color

[en] <s><< Is everything in place?

[zh-cn] >> 一切都到位了吗?

[en] << You're not to relieve me.

[zh-cn] >> 你不是来解救我的。

[en] << I</s> know, but I felt like taking a shift.

[zh-cn] >> 我知道,但我想换个班。

[en] <s><< You like him, don't you?

[zh-cn] >> 你喜欢他,不是吗?

[en] << You</s> like watching him.

[zh-cn] >> 你喜欢看他。

[en] << Don't be ridiculous.

[zh-cn] >> 别开玩笑了。

[en] << We're going to kill him.

[zh-cn] >> 我们要杀了他。

This command should translate and create three different files, one with Chinese subtitles, one with German and one with Russia subtitles.

Project layout

├── LICENSE.txt
├── README.rst
├── bin
│   ├── __init.py__
│   └── subtrs
├── requirements.txt
└── subtrs

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

subtrs-1.7.tar.gz (36.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page