This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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


$ pip install webvtt-py


from webvtt import WebVTT

for caption in WebVTT().read('captions.vtt'):

Segmenting for HLS

from webvtt import WebVTTSegmenter

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

Converting captions from other formats

Supported formats:

  • SubRip (.srt)
  • YouTube SBV (.sbv)
from webvtt import WebVTT

webvtt = WebVTT().from_srt('')

# we can convert captions in one line


Caption segmentation is also available from the command line:

$ webvtt segment captions.vtt --output destination/directoy


Licensed under the MIT License.

Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
webvtt_py-0.3.0-py3-none-any.whl (10.4 kB) Copy SHA256 Checksum SHA256 py3 Wheel Jun 2, 2016 (12.7 kB) Copy SHA256 Checksum SHA256 Source Jun 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting