Skip to main content

WebVTT reader, writer and segmenter

Project description

https://travis-ci.org/glut23/webvtt-py.svg?branch=master

webvtt-py is a Python module for reading/writing WebVTT caption files. It also features caption segmentation useful when captioning HLS videos.

Usage

from webvtt import WebVTT

webvtt = WebVTT().read('captions.vtt')
for c in webvtt.captions:
    print(c.start)
    print(c.end)
    print(c.text)

Segmenting for HLS

from webvtt import WebVTTSegmenter

WebVTTSegmenter().segment('captions.vtt', 'output/path')

Converting SRT captions

from webvtt import WebVTT

webvtt = WebVTT().from_srt('captions.srt')
webvtt.save()

Project details


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.1.zip (10.5 kB view details)

Uploaded Source

Built Distribution

webvtt_py-0.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file webvtt-py-0.1.zip.

File metadata

  • Download URL: webvtt-py-0.1.zip
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for webvtt-py-0.1.zip
Algorithm Hash digest
SHA256 09e43f27da61c5bbeff5f68548a72899d500598e30f38d9efa72330465afb585
MD5 e3a1e2013ee44093dd9016622eb497bb
BLAKE2b-256 1361160c89a4f72e708419d081b5ee049d3862b9a0a3a6aedf9cda13a85ca728

See more details on using hashes here.

File details

Details for the file webvtt_py-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for webvtt_py-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ba3a5936b1a79ff55f705d4a568236946000b220b49247081b489ea94cbcc8c
MD5 b246ef67a96bec6ddbef6ca7b56cd033
BLAKE2b-256 601d363b1154475f4dd2f67cac6c1538a976fcb45ba9d30c9c211c58df298a37

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page