I moved over to VideoJs (html5) and need to figure out how to generate thumbnails for the seekbar. I have tried using videojs-thumbnails, however that requires having a prel
Surprised I didn't get a single comment/answer. Either way, after taking quite a few days I was able to find a working solution. At first I thought the solution would be using ffmpeg, however while it did work it was drastically slow. I eventually found the linux tool (available in Windows as well) called mtn (Movie Thumbnailer) found here. This tool was able to to create a sprite image from a two hour movie within about 6 seconds. I used the shell_exec function in php with the -v (verbose) option in order to parse out the time of each thumbnail as such:
mtn -v -P -s 60 .jpg file.ext 2>&1
Once there, it was simple logic, parsing, and math to create the necessary WebVTT file. All of this was done in php natively with the exception of having to use mtn with shell_exec.
This solution works great and is pretty accurate. The only real issue is that the user has to wait a couple of seconds before the video is ready to be watched. I am currently looking at options to load the video first, generate the thumbnails in the background, and incorporate it into the video source once ready.
I hope this solution helps anyone else out there that needs to dynamically generate thumbnails for their video player.
In fact, there IS a VideoJS-based plug-in for displaying thumbnails that was done by BrightCove. See here on GitHub:
https://github.com/brightcove/videojs-thumbnails/blob/master/example.html
The base-poster here seems to favor generating the images in real-time and notes the following:
"The only real issue is that the user has to wait a couple of seconds before the video is ready to be watched."
Unless I'm missing something, it should be preferable and straight-forward to generate the needed VTT-file (of the thumbnail-image info) offline.
EDIT: Choosing to do the extraction offline has the additional advantage that the robust tool 'ffmpeg' seems to be the clear choice. (After evaluating the suggested and immature 'mtn' tool, I rejected it because I could never manage to prevent it from skipping/omitting shots .)
EDIT: BrightCove has nice example code and explanation, including how to do things more efficiently using video 'sprites'. See here: https://support.brightcove.com/display-thumbnail-previews-plugin#Example
EDIT: [I am planning to develop such an example, and will update this answer when I complete that effort...stay tuned.]
EDIT: I finally completed my approach to implementing 'thumbnails' for a video... it is here: https://weasel.firmfriends.us/Private3-BB/