Video Url Thumbnail Generator
This module will generate thumbnail for videos urls.
Uses video-thumbnail-generator module.
Needs to be installed in your OS ffmpeg
Here is an example:
var VideoThumbnailGenerator = require('video_url_thumbnail_generator')
let videoUrl = 'https://.....' //Replace with your video orl
let Thumbnail = new VideoThumbnailGenerator({
dir: 'tmp', //Directory where to save files
videoUrl: videoUrl,
videoArgs: {
count: 2 //How many thumbnail you wants. Default 10.
}
});
(async function(){
var files = await Thumbnail.generate() //Generate thumbnails. Return promise.
console.log(files) //Console a list of created thumbnail files
await Thumbnail.deleteFiles() //Delete all created files
}())