Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Python library for editing subtitle files

License

NotificationsYou must be signed in to change notification settings

tkarabela/pysubs2

Repository files navigation

pysubs2 build master branchpysubs2 test code coverageStatic BadgePyPI - VersionPyPI - StatusPyPI - Python VersionPyPI - LicenseGitHub Repo stars

pysubs2 is a Python library for editing subtitle files.It’s based onSubStation Alpha, the native format ofAegisub; it also supportsSubRip (SRT),MicroDVD,MPL2,TMP,WebVTT,TTML andSAMI formats andOpenAI Whisper captions.

There is a small CLI tool for batch conversion and retiming.

pip install pysubs2pysubs2 --shift 0.3s*.srtpysubs2 --to srt*.ass
importpysubs2subs=pysubs2.load("my_subtitles.ass",encoding="utf-8")subs.shift(s=2.5)forlineinsubs:line.text="{\\be1}"+line.textsubs.save("my_subtitles_edited.ass")

To learn more, pleasesee the documentation.If you'd like to contribute, seeCONTRIBUTING.md.

pysubs2 is licensed under the MIT license (seeLICENSE.txt).


[8]ページ先頭

©2009-2025 Movatter.jp