Skip to content

Generate progress bar preview thumbnails using nodejs and ffmpeg. Can also create hover thumbnails similar to what YouTube offers

Notifications You must be signed in to change notification settings

mayeaux/generate-video-sprites-node

Repository files navigation

generate-video-sprites-node

Node package for generating preview sprites for videos

Install: $ npm i generate-video-sprites-node

Docs

Install python 3.9 and the install requirements.txt, runs as $ python

From project root, run $ node examples/example.js and then check the output folder

####Then: Test on a new video: drop a new video in the videos folder

Then you can run ~ cd videos $ ffmpeg -ss 00:00:00 -i newVideo.mp4 -to 00:00:30 -c copy newVideoTrimmed.mp4

You will need to serve the .vtt file from a path that your video player can access. Also, you will need to serve the sprite from a place that will be referenced in the vtt file.

Uses this Python library for generating the sprite from the video: https://github.com/flavioribeiro/video-thumbnail-generator

// ffmpeg -i extrawelt.mp4 -vf fps=1/2 -f image2 -s 140x79 out%d.jpg

start server cd examples && ../node_modules/http-server/bin/http-server -c-1

About

Generate progress bar preview thumbnails using nodejs and ffmpeg. Can also create hover thumbnails similar to what YouTube offers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published