video-preview-buffer

1.1.0 • Public • Published

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))

Package Sidebar

Install

npm i video-preview-buffer

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

2.08 kB

Total Files

3

Last publish

Collaborators

  • lluisemperlloret