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

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page