Gathering detailed insights and metrics for ffmpeg-extract-frames
Gathering detailed insights and metrics for ffmpeg-extract-frames
Gathering detailed insights and metrics for ffmpeg-extract-frames
Gathering detailed insights and metrics for ffmpeg-extract-frames
npm install ffmpeg-extract-frames
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
64 Stars
22 Commits
16 Forks
3 Watching
1 Branches
2 Contributors
Updated on 22 Apr 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-16.2%
654
Compared to previous day
Last week
4.2%
5,501
Compared to previous week
Last month
7.6%
24,597
Compared to previous month
Last year
88.9%
249,220
Compared to previous year
2
Extracts frames from a video using fluent-ffmpeg.
1npm install --save ffmpeg-extract-frames 2# or 3yarn add ffmpeg-extract-frames
1const extractFrames = require('ffmpeg-extract-frames')
2
3// extract 3 frames at 1s, 2s, and 3.5s respectively
4await extractFrames({
5 input: 'media/1.mp4',
6 output: './screenshot-%i.jpg',
7 offsets: [
8 1000,
9 2000,
10 3500
11 ]
12})
13
14// generated screenshots:
15// ./screenshot-1.jpg
16// ./screenshot-2.jpg
17// ./screenshot-3.jpg
1// default behavior is to extract all frames 2await extractFrames({ 3 input: 'media/1.mp4', 4 output: './frame-%d.png' 5}) 6 7// generated screenshots: 8// ./frame-1.png 9// ./frame-2.png 10// ... 11// ./frame-100.png
Extracts one or more frames from a video file. Returns a Promise
for when all frames have been written.
There are several options for specifying which frames to extract, namely timestamps
, offsets
, fps
, and numFrames
. The default behavior if you don't specify any of these options is to extract all frames from the input.
Type: String
Required
Path or URL to a video file.
Type: String
Required
Output file pattern.
Note that for timestamps
or offsets
, the pattern should include a %i
or %s
(details).
For any other call, you should use the %d
format specifier. I know this is confusing, but it's how fluent-ffmpeg works under the hood.
Type: Array<Number>
Array of seek offsets to take the screenshot from in milliseconds.
Type: Array<Number|String>
Same as fluent-ffmpeg's screenshots.timestamps.
Type: Number
Frames per second to output.
Type: Number
Output a specific number of frames. The input video's frames will be skipped such that only this number of frames are output.
Type: Function
Default: noop
Optional function to log the underlying ffmpeg command (like console.log
).
Type: String
Specify a path for the ffmpeg binary.
MIT © Travis Fischer
Support my OSS work by following me on twitter
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 1/19 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
64 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More