Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ffmpeg-extract-frames

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ffmpeg-extract-frames

Extracts screenshots from a video.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.5K
increased by27.43%
Maintainers
1
Weekly downloads
 
Created
Source

ffmpeg-extract-frames

Extracts screenshots from a video using fluent-ffmpeg.

NPM Build Status JavaScript Style Guide

Install

npm install --save ffmpeg-extract-frames
# or
yarn add ffmpeg-extract-frames

Usage

const extractFrames = require('ffmpeg-extract-frames')

// extract 3 frames at 1s, 2s, and 3.5s respectively
const filePattern = await extractFrames({
  input: 'media/1.mp4',
  folder: '.',
  filename: 'screenshot-%i.jpg',
  offsets: [
    1000,
    2000,
    3500
  ]
})

// filePattern = './screenshot-%i.jpg'

API

extractFrames(options)

Extracts one or more frames from a video file. Returns a Promise for the full path pattern of the output screenshots.

options
input

Type: String

Path or URL to a video file.

folder

Type: String

Output directory.

filename

Type: String

Output file pattern including a %i

offsets

Type: Array<Number>

Array of seek offset to take the screenshot from in milliseconds.

Note: you must pass either offsets or timestamps, with timestamps taking precedence.

timestamps

Type: Array<Number|String>

Same as fluent-ffmpeg's screenshots.timestamps.

Note: you must pass either offsets or timestamps, with timestamps taking precedence.

log

Type: Function Default: noop

Optional function to log the underlying ffmpeg command (like console.log).

License

MIT © Travis Fischer

Keywords

FAQs

Package last updated on 28 Mar 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc