Skip to main content

A library for editing subtitle files

Project description

pysubs2 build master branch MyPy checked PyPI - Version PyPI - Status PyPI - Python Version PyPI - License

pysubs2 is a Python library for editing subtitle files. It’s based on SubStation Alpha, the native format of Aegisub; it also supports SubRip (SRT), MicroDVD, MPL2, TMP and WebVTT formats and OpenAI Whisper captions.

There is a small CLI tool for batch conversion and retiming.

$ pip install pysubs2
$ pysubs2 --shift 0.3s *.srt
$ pysubs2 --to srt *.ass
import pysubs2
subs = pysubs2.load("my_subtitles.ass", encoding="utf-8")
subs.shift(s=2.5)
for line in subs:
    line.text = "{\\be1}" + line.text
subs.save("my_subtitles_edited.ass")

To learn more, please see the documentation.

pysubs2 is licensed under the MIT license (see LICENSE.txt).

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

pysubs2-1.5.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

pysubs2-1.5.0-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file pysubs2-1.5.0.tar.gz.

File metadata

  • Download URL: pysubs2-1.5.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pysubs2-1.5.0.tar.gz
Algorithm Hash digest
SHA256 64c350caab8939ea1d34c7cec6b7f42a935c28a440de0a316a2218114767129a
MD5 17049ec087a9c6e5e90121e97367b5d8
BLAKE2b-256 a1844d3ebbd7a6616e51c843a8950f31931c78c7735be34f7568c76614f94e2f

See more details on using hashes here.

File details

Details for the file pysubs2-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pysubs2-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pysubs2-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20476d22527ec0523740388354cbd4d7ffddc558e16e2766624449a268bbe612
MD5 658916bd6b19b3921799bbbbd93bcc29
BLAKE2b-256 eddefd8cfaa141f65390902549db9632ac71fa44f0ea31e83ec63ca5a80f8ea0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page