video-extract

1.2.0 • Public • Published

video-extract

NPM version Build status Test coverage Dependency Status License Downloads Gittip

Extract useful information from videos such as:

  • getting thumbnails from videos
  • frames numbers and the correlated timestamps
  • scene change detection

Installation

Requires ffmpeg and phash - related libraries. Be sure to install the proper binaries.

API

var extract = require('video-extract');

var video = extract(filename)

var video = extract('video.mp4');

Create a video instances of the file.

video.probe().then( data{} => )

Run ffprobe on the video and return metadata.

video.frames().then( frames[] => )

Returns info on the frames. frames is an array of frames where each frame has:

  • n - the frame #, starting at 0
  • s - the timestamp in seconds

video.thumbnails().then( thumbnails[] => )

An array of thumbnail files. Lookup a frame by doing thumbnails[<frame#>] = <filename>.

video.phashes().then( phashes[] => )

Returns the phashes for all the thumbnails. Each phash is a Buffer instance with byte length 8.

video.clean().then( => )

Clean the working directory. The working directory is where thumbnails and such are saved.

Package Sidebar

Install

npm i video-extract

Weekly Downloads

0

Version

1.2.0

License

MIT

Last publish

Collaborators

  • jongleberry