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.4+.
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 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.4.3-py3-none-any.whl
(15.2 kB
view details)
File details
Details for the file webvtt_py-0.4.3-py3-none-any.whl
.
File metadata
- Download URL: webvtt_py-0.4.3-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30343d02dc4a3b760a4d8384230dde618eaa432ba12a82034765599d7db50fc7 |
|
MD5 | 9e97ec79464570e9b234d04faad5b564 |
|
BLAKE2b-256 | 0ad3fa192ee7174bef38363cc76fca3a10df3f52da2e4a6a60f32f2437c948ff |