A library generate thumbnail from video
Generate video thumbnails from a video file
npm install --save generate-video-thumbnail
generateVideoThumbnails(videoFile, numberOfThumbnails)
.then((thumbnailArray) => {
// output will be arry of base64 Images
// example - ["img1", "imgN"]
// @todo - implement your logic here
})
.catch((err) => {
console.error(err);
});
const callback = (thumbnail, index) => {
// thumbnail = base64 image
// index = position on the final thumbnailArray
// @todo - implement your logic here
};
generateVideoThumbnails(videoFile, numberOfThumbnails, type, callback)
.then((thumbnailArray) => {
// output will be arry of base64 Images
// example - ["img1", "imgN"]
// @todo - implement your logic here
})
.catch((err) => {
console.error(err);
});