1.1.9-beta • Published 4 years ago
@bgoodman/video-preview v1.1.9-beta
@bgoodman/video-preview
Installation
Requires ffmpeg.
You may already have it; check via
ffmpeg -version
npm install @bgoodman/video-preview
yarn add @bgoodman/video-preview
Usage
import videoPreview from "@bgoodman/video-preview"
API
videoPreview
videoPreview(input
: string, output
: string, opts?: VideoPreviewOptions): Promise<{output: string, stdout: string, stderr: string}>
Saves a slice of video to file.
Parameters:
Name | Type | Description |
---|---|---|
input | string | filepath of input video. |
output | string | filepath of preview. |
Options:
Name | Default | Description |
---|---|---|
overwrite | true | overwrite output file if exists. |
duration | 5 | specify length of preview (seconds) |
scale.width | -1 | set x-axis scale (px). Default leaves output unchanged. |
scale.height | -2 | set y-axis scale (px). Default preserves aspect ratio, rounding to a factor of 2. |
1.1.9-beta
4 years ago
1.0.9-beta
4 years ago
1.0.8-beta
4 years ago
1.0.7-beta
5 years ago
1.0.6-beta
5 years ago
1.0.5-beta
5 years ago
1.0.4-beta
5 years ago
1.0.3-beta
5 years ago
1.0.2-beta
5 years ago
1.0.1-beta
5 years ago