video frame metadata extraction and scene detection
npm install video-extract[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![Gittip][gittip-image]][gittip-url]
Extract useful information from videos such as:
- getting thumbnails from videos
- frames numbers and the correlated timestamps
- scene change detection
Requires ffmpeg and phash - related libraries.
Be sure to install the proper binaries.
``js`
var extract = require('video-extract');
`js`
var video = extract('video.mp4');
Create a video instances of the file.
Run ffprobe on the video and return metadata.
Returns info on the frames. frames is an array of frames where
each frame has:
- n - the frame #, starting at 0s
- - the timestamp in seconds
An array of thumbnail files.
Lookup a frame by doing thumbnails[] = .
Returns the phashes for all the thumbnails.
Each phash is a Buffer instance with byte length 8`.
Clean the working directory.
The working directory is where thumbnails and such are saved.
[npm-image]: https://img.shields.io/npm/v/video-extract.svg?style=flat-square
[npm-url]: https://npmjs.org/package/video-extract
[github-tag]: http://img.shields.io/github/tag/mgmtio/video-extract.svg?style=flat-square
[github-url]: https://github.com/mgmtio/video-extract/tags
[travis-image]: https://img.shields.io/travis/mgmtio/video-extract.svg?style=flat-square
[travis-url]: https://travis-ci.org/mgmtio/video-extract
[coveralls-image]: https://img.shields.io/coveralls/mgmtio/video-extract.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/mgmtio/video-extract
[david-image]: http://img.shields.io/david/mgmtio/video-extract.svg?style=flat-square
[david-url]: https://david-dm.org/mgmtio/video-extract
[license-image]: http://img.shields.io/npm/l/video-extract.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/video-extract.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/video-extract
[gittip-image]: https://img.shields.io/gratipay/jonathanong.svg?style=flat-square
[gittip-url]: https://gratipay.com/jonathanong/