Generate video sprites using just Ffmpeg
Learn how to create video sprites with just FFmpeg — perfect for lightweight video previews.
The following is an example of a video preview of the
Big Buck Bunny
video using a sprite sheet generated from Ffmpeg. Hover over the image to see
the preview change.
Save the following shell script as sprite.sh, and update the permissions so
you can execute it (ie. chmod +x ./sprite.sh).
#! /usr/bin/bash
INPUT=$1
OUTPUT=$2
FRAMES=20
# Extract video duration in seconds
DURATION_S=$(ffprobe -v error -show...
Read more at steelcm.com