webvtt-py 0.5.1
pip install webvtt-py
Latest version
Released:
WebVTT reader, writer and segmenter
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Alejandro Mendez
- Tags webvtt, captions
- Requires: Python >=3.7
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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')
Converting captions from other formats
Supported formats:
SubRip (.srt)
YouTube SBV (.sbv)
import webvtt
webvtt = webvtt.from_srt('captions.srt')
webvtt.save()
# one liner if we just need to convert without editing
webvtt.from_sbv('captions.sbv').save()
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
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Alejandro Mendez
- Tags webvtt, captions
- Requires: Python >=3.7
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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
Built Distribution
File details
Details for the file webvtt-py-0.5.1.tar.gz
.
File metadata
- Download URL: webvtt-py-0.5.1.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2040dd325277ddadc1e0c6cc66cbc4a1d9b6b49b24c57a0c3364374c3e8a3dc1 |
|
MD5 | e667a20cc493849bcf59b78a9385d553 |
|
BLAKE2b-256 | 5ef67c9c964681fb148e0293e6860108d378e09ccab2218f9063fd3eb87f840a |
File details
Details for the file webvtt_py-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: webvtt_py-0.5.1-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d517d286cfe7fc7825e9d4e2079647ce32f5678eb58e39ef544ffbb932610b7 |
|
MD5 | 75c39989701173a500272e68ea3466f3 |
|
BLAKE2b-256 | f3edaad7e0f5a462d679f7b4d2e0d8502c3096740c883b5bbed5103146480937 |