Skip to main content

A library for editing subtitle files

Reason this release was yanked:

Bad build, missing pysubs2.formats subpackage

Project description

pysubs2

pysubs2 build master branch pysubs2 test code coverage Static Badge PyPI - Version PyPI - Status PyPI - Python Version PyPI - License GitHub Repo stars

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. If you'd like to contribute, see CONTRIBUTING.md.

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.7.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysubs2-1.7.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysubs2-1.7.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for pysubs2-1.7.0.tar.gz
Algorithm Hash digest
SHA256 befb8418aac1cc67e9a31204aa21d13d413011ae9c0da22a9f8d5ad2fbec512b
MD5 28d82264db841d16bed77ac021d40ac5
BLAKE2b-256 9209b7b0547044994e357b5f0ada7ddff2c94509ec8ba071a0e2e4d03958a3dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysubs2-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for pysubs2-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02573f3ea56e79c97c5de2edb2048946ecad0c277970f9cca13ad3708112debf
MD5 61a02556ad766f6c4037ba75bd4ef607
BLAKE2b-256 203939a584a7fc7f53cb18e1bf3f5f2a3f5362eb4e03d26509d7393bf5806f19

See more details on using hashes here.

Supported by

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