Skip to main content

SubRip (.srt) subtitle parser and writer

Project description

pysrt is a Python library used to edit or create SubRip files.


from pysrt import SubRipFile, SubRipItem, SubRipTime
subs ='some/')
subs[42].end.hours += 3
subs[42].text = "Never end !"

part = subs.slice(ends_after=SubRipTime(0, 0, 40))
part = subs.slice(ends_after=(0, 0, 40))
part = subs.slice(ends_after={'seconds': 40})

part.shift(seconds=-2)'other/', 'utf-8')

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 pysrt, version 0.2.5
Filename, size File type Python version Upload date Hashes
Filename, size pysrt-0.2.5.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View

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