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

Uploaded Source

Built Distribution

pysubs2-1.4.1-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysubs2-1.4.1.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pysubs2-1.4.1.tar.gz
Algorithm Hash digest
SHA256 2d07157d4e838c7e041ed35b4a69bf5a5570eb47f8bd36bb7a9706736b72ebff
MD5 210fd0bc0b84d2a8fe605a52eceb05ee
BLAKE2b-256 cd7cffca32272a0bb160b54e1f7131465dbcbf2cd62714dc39aee4e55c1a61a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysubs2-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pysubs2-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17f75efc59973c3d5c426212a4c9df98d25b494d3e08ac3fe9d5b67add53267f
MD5 f3b8dae4a3afe0743fac8c4318023d0f
BLAKE2b-256 ea4e25bad62664de4717b87c7de79484f28a6bdae9a4ef3ee2a0791289d30765

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