Videojs - Thumbs over progressbar

STANDARD
PREMIUM
GOLD

Display thumbnails over progressbar

One of the plugins by Nuevodevel.com is custom thumbnails plugin which allows you to display preview thumbnails over the progress bar when you hover over it with your mouse or keep your finger over the progress bar on touch devices.
The player itself cannot extract thumbnails from video through Jacascript. Nuevo thumbnails plugin makes use of the ready sprite image file consisting of multiple, same-size thumbnails tiled one after another, either vertically or horizontally.
Thumbnails must be extracted from the entire video length at exactly the same time intervals. To show thumbnails over the progress bar, you need to define the URL of the sprite image. Below, you can see the options available to set for the thumbs display over the progress bar.
  • slideImage (required) - URL of the sprite image file.
  • slideType - method used to tile single thumbs into a sprite image. The default is vertical, but it can also be horizontal.
You do not have to worry about thumb timestamps. This is automatically calculated by the plugin.

In the example above, we use a sprite image of 192x720 pixel size with 46 thumbnails, each of 160x90 pixel size, tiled vertically. The video length is relatively short, about 92 seconds, so it's easy to calculate that video thumbnails were extracted per ~2 seconds from the entire video length.
Code snippet
// Load javascript files
<script src="/videojs/videojs.min.js">
<script src="/videojs/nuevo.min.js">
<script src="/videojs/plugins/nuevo.thumbnails.js">

// Initialize a player and plugins
<script>
const player = videojs('example_video_1',{license: "your_license_key"});
player.nuevo({
slideImage: '//domain.com/path/to/sprite.jpg',
slideType: 'vertical', //optional
slideWidth: 160, //optional
slideHeight: 90 //optional
})
player.nuevothumbnails();
</script></script>
We created a simple spritevideo bash script to generate a ready jpg sprite image from a video file. The script requires ffmpeg installed on the server. The usage is simple.
Code snippet
spritevideo -i [inputfile] -o [outputdirectory] -p [outputfile]

Available arguments:
-i video input file (required)
-w width of the single thumb [optional], default=160
-h height of the simgle thumb [optional], default=90
-o directory relative path to process video thumbs (required)
-p relative path for generated jpg sprite image file (required)