video-extract
v1.2.0
Published
video frame metadata extraction and scene detection
Downloads
5
Maintainers
Readme
video-extract
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 at0
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.