video-preview-buffer
v1.1.0
Published
This package recieves a file type video and returns an image type Buffer
Downloads
5
Maintainers
Readme
Video Preview Buffer
The aim with this project is create a preview for a video. Be awere that this package uses node child process, therefore you will need to have installed ffmpeg in your OS.
Features
- This package recieves a file type video and returns an image type Buffer
Installation
npm i video-preview-buffer
Usage
const { screenshot } = require("video-preview-buffer")
Usage promise chaining
screenshot("video-url" , "number of seconds in which the preview will be taken").then(previewImage => console.log("My preview as Buffer: ",previewImage))
Usage async/await
Inside of an async funciton
const previewImage = await screenshot("video-url" , "number of seconds in which the preview will be taken")
console.log("My preview as Buffer: ", previewImage))