Skip to content

danielbair/split-media-by-srt

Repository files navigation

Description

Split an audio or video file by using a srt timing file.

Requirements

NodeJS
FFmpeg You will need to have ffmpeg available in your system path. The easiest way to do this is to install the aeneas tools installer which includes ffmpeg.

Installation

Clone or download this repository.
Then in a terminal do the following.

cd split-media-by-srt  
npm install
npm link

Example

split-media-by-srt -i ~/MyVideo.m4v -s ~/MyVideo.srt -o ~/Segments/ -f aac

Note: This script will only copy the source media codec's content and will not convert to another codec.

Options

short long description
-v, --verbose Display verbose output
-d, --debug Display debug information
-h, --help Display this usage guide
-i, --file The input media file to process (required)
-s, --srt The input srt file to process segments (required)
-o, --dir The output directory to save the segments (required)
-f, --fmt The output format to save the segments (optional) [Default: same as source media]

About

Split an audio or video file by using a srt timing file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published