video-preview-buffer

This package recieves a file type video and returns an image type Buffer

Usage no npm install needed!

<script type="module">
  import videoPreviewBuffer from 'https://cdn.skypack.dev/video-preview-buffer';
</script>

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