Skip to main content

Apply a time offset to a subtitle .srt file

Project description

Apply a time offset to a subtitle .srt file.

Example:

$ cat ~/example.srt
1
00:00:01,600 --> 00:00:04,200
English (US)

2
00:00:05,900 --> 00:00:07,999
This is a subtitle in American English

3
00:00:10,000 --> 00:00:14,000
Adding subtitles is very easy to do
$ srtoffset ~/example.srt '00:00:05,500'
1
00:00:07,100 --> 00:00:09,700
English (US)

2
00:00:11,400 --> 00:00:13,499
This is a subtitle in American English

3
00:00:15,500 --> 00:00:19,500
Adding subtitles is very easy to do
$ srtoffset ~/example.srt '00:00:01,000' --rewind
1
00:00:00,600 --> 00:00:03,200
English (US)

2
00:00:04,900 --> 00:00:06,999
This is a subtitle in American English

3
00:00:09,000 --> 00:00:13,000
Adding subtitles is very easy to do

Setup the dev environment

$ poetry init
$ poetry install

Run the tests

$ poetry run pytest

Project details


Release history Release notifications

This version

0.1.1

Download files

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

Files for srtoffset, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size srtoffset-0.1.1-py3-none-any.whl (4.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size srtoffset-0.1.1.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page