Skip to main content

A library for editing subtitle files

Project description

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. There is a small CLI tool for batch conversion and retiming.

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")

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.1.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

pysubs2-1.1.0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysubs2-1.1.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pysubs2-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d64e3e8260519d4889bad397e78f0c93bd7ed6b59102e657612166e320da167c
MD5 02a0f0a883c9f5f79b08ced903640cb9
BLAKE2b-256 9fec67901009615aa43fdaa17a1e5e795d91db85057136e7776403155e0acef1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysubs2-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pysubs2-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 250d06cca0edf70fff1c5c7c13800ed6d314f7f8e4daddf29d47f437009c99d8
MD5 69f7d24a61c8cd9accb9f9cd787824d3
BLAKE2b-256 64d76d5423c08403e7a58af572d3cd839800ba6eb23f115b8269423cad5e0ace

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