JSPM

ffmpeg-extract-frame

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 432
  • Score
    100M100P100Q99403F
  • License MIT

Extracts a single frame from a video.

Package Exports

  • ffmpeg-extract-frame

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ffmpeg-extract-frame) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ffmpeg-extract-frame

Extracts a single frame from a video using fluent-ffmpeg.

NPM Build Status JavaScript Style Guide

Install

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

Usage

const extractFrame = require('ffmpeg-extract-frame')

await extractFrame({
  input: 'media/1.mp4',
  output: 'test.jpg',
  offset: 1000 // seek offset in milliseconds
})

API

extractFrame(options)

Extracts a single frame from a video file. Returns a Promise for when the file has been written.

options

input

Type: String

Path or URL to a video file.

output

Type: String

Path to a jpg or png file to output.

offset

Type: Number Default: 0

Seek offset to take the screenshot from in milliseconds.

quality

Type: Number Default: 2

If exporting a jpeg image, the quality from 1-31 with 31 being the worst quality (source).

log

Type: Function Default: noop

Optional function to log the underlying ffmpeg command. You may, for example, use console.log

License

MIT © Travis Fischer