Skip to main content

Closed caption converter

Project description

Build Status

pycaption is a caption reading/writing module. Use one of the given Readers to read content into a CaptionSet object, and then use one of the Writers to output the CaptionSet into captions of your desired format.

Tested with Python 3.4 and 3.5. (for Python 2 use pycaption < 1.0.0)

For details, see the documentation.



  • Added language parameter to WebVTTWriter
  • Fix for TranscriptWriter merging words at caption boundary
  • Updated documentation with positioning information
  • Updated DFXP reader to fallback to the document’s language if no language is present on individual <div>
  • Introduced PYCAPTION_DEFAULT_LANG environment variable and set it to default to ‘und’
  • Fixed DFXPReader timestamp validation to accept frames and frames conversion to microseconds


  • Included tests in PyPI tarball
  • Ignore WebVTT empty cues instead of raising an exception
  • Updated BeautifulSoup version to >=4.8.1,<4.9 and fixed failing tests
  • Handled index error when sending bad timestamp for DFXP format


  • Fixed issue with SCC reader including both special characters and their potential substitute
  • Modified enum34 dependency to versions under Python 3.4
  • Removed Python 3.4 and added 3.6, 3.7 and 3.8 to Travis tests


  • Fixed typos in SCC positioning codes
  • Added missing SCC positioning codes to positioning map


  • Added Python 3 support


  • Added positioning support
  • Created documentation


This module is Copyright 2012 and is available under the Apache License, Version 2.0.

Project details

Download files

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

Files for pycaption, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size pycaption-1.0.5-py3-none-any.whl (310.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pycaption-1.0.5.tar.gz (280.5 kB) File type Source Python version None Upload date Hashes View

Supported by

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