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.
Documentation is available at http://webvtt-py.readthedocs.io.
Installation
$ pip install webvtt-py
Usage
import webvtt
for caption in webvtt.read('captions.vtt'):
print(caption.start)
print(caption.end)
print(caption.text)
Segmenting for HLS
import webvtt
webvtt.segment('captions.vtt', 'output/path')
CLI
Caption segmentation is also available from the command line:
$ webvtt segment captions.vtt --output output/path
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 Distribution
webvtt-py-0.5.0.tar.gz
(53.9 kB
view hashes)
Built Distribution
webvtt_py-0.5.0-py3-none-any.whl
(19.5 kB
view hashes)
Close
Hashes for webvtt_py-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92080e4248b51646f80b1d8a8238a06245e1d1970f26b7f6ea866777cc0e2d2b |
|
MD5 | dd58e2bc0442e85b1710a44eab1a139b |
|
BLAKE2b-256 | e7142cc1f1b21c54fce63d1abf4d12708bfcb082a2f9ffd9b5c122c7c55594bd |