srt
A tiny library for parsing, modifying, and composing SRT files.
Decision gist · record as of 2026-08-14
Yes, if you need to work with SRT files. The library is stable, well-tested, and has no dependencies. High install friction (source distribution) is a minor drawback, but the package is lightweight and dormant maintenance is acceptable for a mature, focused tool. No security vulnerabilities and permissive licensing make it a low-risk choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- High install friction due to source distribution; however, the package has no runtime dependencies and is extremely lightweight.
- Maintenance is dormant (last release 2023-03-28, last commit 2024-03-19), but the library is stable and has been in production use since its early releases.
License · maintenance · safety
MIT (permissive) — Released under MIT, a permissive license allowing commercial and private use with minimal restrictions—no licensing concerns for most projects.
last release 2023-03-28 (1235 days) · last repo commit 2024-03-19 · 535 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 689,259 downloads/mo, #5,337 on PyPI
Alternatives
Verify before relying
pip install srt
import srt
data = """1
00:00:33,843 --> 00:00:38,097
Subtitle text"""
for sub in srt.parse(data):
print(sub.content)
output = srt.compose(srt_objects)- Whether the source distribution (tar.gz) requires compilation or has platform-specific build requirements beyond standard Python tooling.
- Current compatibility with Python versions beyond 3.11, given the dormant maintenance status.
What it is and what it does
srt is a minimal Python library for working with SubRip subtitle files. It provides parsing, modification, and composition of SRT files through a simple object-oriented API, converting raw SRT text into Subtitle objects you can inspect and edit, then serialize back to SRT format. The library is designed to handle real-world SRT files that may be malformed or use non-standard formats, including Asian-style (fullwidth) variants.
The package includes both a library API and command-line tools for common subtitle tasks like filtering, time-shifting, and multiplexing. It has no external dependencies beyond the Python standard library, making it lightweight and portable across Linux, macOS, and Windows. The codebase is small (~200 lines excluding docstrings) with high test coverage, and it has been used in production by projects like subsync, NVIDIA RAD-TTS, and manim.
Use it for
- Parse and extract subtitle timing and content from SRT files for video processing pipelines.
- Repair or normalize malformed SRT files that other parsers reject, then re-export them.
- Adjust subtitle timing (shift, scale) programmatically before re-encoding or remuxing.
- Filter or transform subtitle lines based on language or content criteria using the included CLI tools.
- Build subtitle manipulation features into video editing or transcription applications.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to work with SRT files.
The library is stable, well-tested, and has no dependencies. High install friction (source distribution) is a minor drawback, but the package is lightweight and dormant maintenance is acceptable for a mature, focused tool. No security vulnerabilities and permissive licensing make it a low-risk choice.
Install
srt on PyPI
Before you install
High install friction due to source distribution; however, the package has no runtime dependencies and is extremely lightweight. Maintenance is dormant (last release 2023-03-28, last commit 2024-03-19), but the library is stable and has been in production use since its early releases.
License in practice
Released under MIT, a permissive license allowing commercial and private use with minimal restrictions—no licensing concerns for most projects.
Quickstart
pip install srt
import srt
data = """1
00:00:33,843 --> 00:00:38,097
Subtitle text"""
for sub in srt.parse(data):
print(sub.content)
output = srt.compose(srt_objects)
Verify before relying
- Whether the source distribution (tar.gz) requires compilation or has platform-specific build requirements beyond standard Python tooling.
- Current compatibility with Python versions beyond 3.11, given the dormant maintenance status.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=2.7 |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Dormant 1,235 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 689,259 / month, #5,337 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: VideoTopic :: Software Development :: LibrariesTopic :: Text Processing |
Evidence: srt-3.5.3.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “srt subtitle parser”
- srtParse, modify, and compose SRT subtitle files with support for broken…
- pysrtpysrt parses, edits, and writes SubRip (.srt) subtitle files,…
- aeidonaeidon reads, writes, and manipulates text-based subtitle files in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also pysrt · pysubs2 · aeidon · trakit · webvtt-py · human-readable · humanize · ago · subliminal · metomi-isodatetime