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

Uploaded Source

Built Distribution

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

pysubs2-1.3.0-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysubs2-1.3.0.tar.gz
  • Upload date:
  • Size: 24.4 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.3.0.tar.gz
Algorithm Hash digest
SHA256 15f8f283fdba448408bfbc95e7ff14091ce3a6ce1d32dc43dcb5ab34638124ae
MD5 e895eaf1eef6da2dbf7a9f393768f4bd
BLAKE2b-256 0415f90aad6930a0cf8628b12c6b89f1fec1a812afa26f22c6e16b61d1bf22ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysubs2-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 31.1 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1da203c13123ace3d6b8c60be4586be3c2fb79f728ec9b56d371effd1df32f1c
MD5 c85f7f76702d9123b39ba4162f1ae32e
BLAKE2b-256 18e2cbe75c54cf9e3594513d8f55f6e4b6f3557cf3ecc25b4554aa7c76d82ac3

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