--- id: webvtt-py version: "0.5.1" license: MIT license_treatment: permissive maintenance: dormant --- # webvtt-py — WebVTT reader, writer and segmenter License: permissive · Maintenance: dormant · Downloads: 1.9M/mo ## What it is and what it does webvtt-py is a lightweight Python library for working with WebVTT caption files—the standard subtitle format for web video. It lets you read captions from .vtt files, write them back out, and convert from SubRip (.srt) and YouTube SBV (.sbv) formats. The library also includes a segmentation feature for HLS video streaming, which splits captions into chunks aligned with video segments. The package has no external runtime dependencies, making it quick to install. It supports Python 3.7 through 3.12 and offers both a Python API and a command-line interface for caption segmentation. The codebase is stable but dormant—last updated 806 days ago—so it's best suited for straightforward caption I/O tasks rather than projects requiring active maintenance. Use it for: - Parse and extract timing and text from existing WebVTT caption files for analysis or re-use. - Convert subtitle files from SubRip or YouTube SBV format to WebVTT for web video playback. - Segment captions into chunks aligned with HLS video segments for streaming delivery. - Batch-process and write modified captions back to WebVTT format programmatically. - Build a caption management tool that reads, edits, and exports captions in multiple formats. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads, writes, and segments WebVTT caption files; converts captions from SubRip and YouTube SBV formats. Yes, if you need straightforward WebVTT reading, writing, or format conversion without active maintenance requirements. The permissive MIT license, zero dependencies, and broad Python version support make it low-risk. However, if your project demands ongoing feature development or active bug fixes, verify first whether a more actively maintained alternative exists. ## Install pip install webvtt-py uv add webvtt-py poetry add webvtt-py ## Installing webvtt-py Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was 806 days ago, though the repository remains active with a recent commit on 2024-06-13. Suitable for stable, read-heavy caption workflows. License in practice: MIT license is permissive and poses no restrictions on commercial or proprietary use. You can use, modify, and distribute this package freely with minimal legal overhead. Quickstart: pip install webvtt-py import webvtt for caption in webvtt.read('captions.vtt'): print(caption.start) print(caption.end) print(caption.text) Verify before relying: - Whether caption segmentation for HLS is suitable for modern streaming workflows or if alternatives are preferred. - Performance characteristics when processing large caption files or many segments. - Completeness of WebVTT spec compliance beyond documented operations. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags webvtt caption parser, read write vtt files, subtitle format conversion, hls video caption segmentation, srt to webvtt converter, caption file processing, caption-subtitles, format-conversion, hls-streaming [View on SkillFed](https://skillfed.io/packages/webvtt-py) · [View on PyPI](https://pypi.org/project/webvtt-py/)