WebVTT reader, writer and segmenter
Project description
webvtt-py is a Python module for reading/writing WebVTT caption files. It also features caption segmentation useful when captioning HLS videos.
Requires Python 3.3+.
Documentation is available at http://webvtt-py.readthedocs.io.
Installation
$ pip install webvtt-py
Usage
from webvtt import WebVTT
for caption in WebVTT().read('captions.vtt'):
print(caption.start)
print(caption.end)
print(caption.text)
Segmenting for HLS
from webvtt import WebVTTSegmenter
WebVTTSegmenter().segment('captions.vtt', 'output/path')
CLI
Caption segmentation is also available from the command line:
$ webvtt segment captions.vtt --output destination/directoy
License
Licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
webvtt_py-0.3.1-py3-none-any.whl
(10.4 kB
view details)
File details
Details for the file webvtt_py-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: webvtt_py-0.3.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3f39a4c74db32e017f032119d484346799f0aba39bfafae534df96c0ed76613 |
|
MD5 | ea5e67677f1f60feb3b93748eb94c7f7 |
|
BLAKE2b-256 | 8c09b66e04708719f9c19a28fe212e13528bfa5340d4d5c0c31f0b23315cb041 |