Skip to main content

WebVTT reader, writer and segmenter

Project description Documentation Status

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.

Project details

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.0-py3-none-any.whl (12.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page