Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

resync-srt

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resync-srt

offset a SRT (SubRip) file's timestamps forward or backward

latest
Source
npmnpm
Version
3.1.0
Version published
Weekly downloads
2
-50%
Maintainers
2
Weekly downloads
 
Created
Source

resync-srt

Streaming* command and module that reads SRT data and a time offset and outputs the resultant SRT.

example

To use resync-srt as a command, install it using npm:

$ npm install -g resync-srt

You can feed it either files or raw data from stdin:

$ resync-srt 500
1
00:00:00,000 --> 00:03:00,000
Hello, warld!
^D

which will output

1
00:00:00,500 --> 00:03:00,500
Hello, warld!

If this data was in an .srt file you could also use the filename as the first argument:

$ resync-srt foo.srt -1000

usage

resync-srt [FILE] MILLISECOND-OFFSET

api

var resync = require('resync-srt')

resync(offsetMs)

resync-srt exports a single method, which accepts an offset in millseconds. Positive values push the timestamps forward in time, while negative values push them backward.

This returns a Transform stream: reading SRT data and outputting SRT data that has been time-shifted.

streaming*

This is still using subtitle.js which doesn't offer a streaming interface. This module merely wraps its functionality into a convenient interface. See the issue.

license

MIT

FAQs

Package last updated on 13 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts