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 Distribution
webvtt-py-0.3.0.zip
(12.7 kB
view details)
Built Distribution
webvtt_py-0.3.0-py3-none-any.whl
(10.4 kB
view details)
File details
Details for the file webvtt-py-0.3.0.zip
.
File metadata
- Download URL: webvtt-py-0.3.0.zip
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f0d6dbbe77b3d2f7aec414f1fc71a92ec636d4bd27623be1499747538f8ff12 |
|
MD5 | 7d04e1c5f368994ece1471656d9f299d |
|
BLAKE2b-256 | cd8046c4e7e057761d7e82e9b174748c7b76a7ef0d08975e7b5513ecdc9eff47 |
File details
Details for the file webvtt_py-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: webvtt_py-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77124b4b4d7e804463a077420b2668cbc0e632c27643ac3633138521c7b2c065 |
|
MD5 | f19c2aeed6acd8769b99408990b2e9bc |
|
BLAKE2b-256 | 92a1378995b6c93277e19f8d6cb3133970461cf0923ad5c169f733d033b515b3 |