Skip to content

openSUSE-Python/pysubs2

This branch is up to date with tkarabela/pysubs2:master.

Folders and files

NameName
Last commit message
Last commit date
Dec 23, 2024
Dec 24, 2024
Dec 24, 2024
Feb 15, 2025
Dec 28, 2023
Nov 27, 2022
May 5, 2024
May 19, 2024
Jul 27, 2024
Dec 23, 2024
Dec 24, 2024
Nov 15, 2022
May 19, 2024
Jul 26, 2024
Dec 23, 2024

Repository files navigation

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, WebVTT, TTML and SAMI 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).

About

A Python library for editing subtitle files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Makefile 0.2%