Video Thumbnail Sprite Sheet Generator — User Guide
Create thumbnail sprite sheets for video progress bar hover previews. Extract frames from any video, generate optimized sprite images, and export ZWMAP-compatible JSON for seamless ZWPlayer integration.
Getting Started
The Thumbnail Sprite Generator is a free online tool that extracts frames from your video and assembles them into a single sprite sheet image. This sprite sheet powers the thumbnail preview that appears when you hover over a video player's progress bar — providing users with a visual scrubbing experience similar to YouTube, Bilibili, or Tencent Video.
Quick Start Steps
-
Load a video
Drag and drop a local video file (MP4, WebM) onto the window, or paste a remote video URL into the address bar and press Enter.
-
Configure sampling
Choose a sampling mode: Fixed Interval (e.g., every 5 seconds) or Total Frames (e.g., 100 frames evenly distributed). Adjust frame dimensions and output format. (e.g., every 5 seconds) or Total Frames (e.g., 100 frames evenly distributed). Adjust frame dimensions and output format.
-
Generate the sprite sheet
Click the Generate Sprite Sheet button (or press G). The tool extracts frames and assembles them into a single image grid. button (or press G). The tool extracts frames and assembles them into a single image grid.
-
Preview and export
Preview the result with ZWPlayer's built-in thumbnail preview (press P). Download the sprite image, export the ZWMAP JSON, or get both in a ZIP file.
Tip: This tool runs entirely in your browser using the Canvas API. No video data is uploaded to any server — your files stay private.
Keyboard Shortcuts
Speed up your workflow with these keyboard shortcuts:
| Key | Action | Description |
|---|---|---|
| Space | Play / Pause | Toggle video playback |
| , | Step Back | Seek backward one frame |
| . | Step Forward | Seek forward one frame |
| ← | Skip Back 5s | Seek backward 5 seconds |
| → | Skip Forward 5s | Seek forward 5 seconds |
| G | Generate | Start sprite sheet generation |
| P | Preview | Open ZWPlayer preview with thumbnails |
| Ctrl+S | Download Sprite | Save the generated sprite sheet image |
| Esc | Exit | Exit preview mode or close lightbox |
Configuration Options
Sampling Mode
| Option | Value | Description |
|---|---|---|
| Fixed Interval | ≥ 1 second (no upper limit) | Extract a frame every N seconds. Best for videos with consistent scene changes. |
| Total Frames | 1 – 3,000 frames | Distribute N frames evenly across the video duration. Best for consistent preview density. |
Frame Dimensions
| Parameter | Range | Default | Description |
|---|---|---|---|
| Width | 32 – 640 px | 160 px | Width of each extracted frame in pixels. |
| Height | 32 – 640 px | 90 px | Height of each extracted frame in pixels. Default 16:9 aspect ratio. |
| Aspect Lock | Height / Width | Height | Lock aspect ratio so changing one dimension automatically adjusts the other. |
Grid Layout
| Parameter | Description |
|---|---|
| Columns | Number of frames per row. Leave empty for auto-calculation based on frame count and dimensions. |
| Rows | Total rows in the sprite sheet. Leave empty for auto-calculation. |
Auto Grid Formula: col = ⌈√(totalFrames × (width / height))⌉, row = ⌈totalFrames / col⌉. This produces a roughly square sprite sheet for optimal loading. col = ⌈√(totalFrames × (width / height))⌉, row = ⌈totalFrames / col⌉. This produces a roughly square sprite sheet for optimal loading.
Output Settings
| Parameter | Description |
|---|---|
| Format | JPG (default) — smaller file size with adjustable quality. PNG — lossless, larger file size, supports transparency. (default) — smaller file size with adjustable quality. PNG — lossless, larger file size, supports transparency. |
| Quality | JPG compression quality from 1–100. Default: 85. Lower values reduce file size at the cost of image clarity. |
Output Formats
After generating a sprite sheet, you can download the results in three formats:
1. Sprite Sheet Image
A single image file (thumbnail.jpg or .png) containing all extracted frames arranged in a grid. This is the primary output used by video players to display thumbnail previews on the progress bar.
2. ZWMAP JSON
A JSON file ({title}_thumbnail.json) following the ZWMAP/1.0 protocol. Contains the thumbnail image URL, frame dimensions, grid layout, and total frame count. Used for server-side configuration and CMS integration.
3. ZIP Bundle
A ZIP archive ({title}.zip) containing both the thumbnail image and the ZWMAP JSON file. Convenient for downloading and deploying as a package.
ZWMAP Thumbnail Protocol Specification
The ZWMAP (Z&W Media Annotation Protocol) thumbnail type defines a standard JSON format for describing video thumbnail sprite sheets. This protocol enables interoperability between thumbnail generation tools and video players.
Protocol Header
Every ZWMAP thumbnail document begins with a protocol identifier:
{
"zwp_protocol": "ZWMAP/1.0",
"zwp_type": "thumbnail",
"zwp_version": "1.0"
}
Thumbnail Object Fields
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | URL of the sprite sheet image file (JPG or PNG). |
width |
number | Yes | Width of a single frame in pixels. Used for calculating background-position offset. |
height |
number | Yes | Height of a single frame in pixels. |
col |
number | Yes | Number of columns (frames per row). Used for calculating horizontal offset. |
row |
number | Yes | Number of rows in the sprite sheet. The last row may contain fewer frames than col. |
total |
number | Yes | Total number of valid frames in the sprite sheet. |
Complete Example
{
"zwp_protocol": "ZWMAP/1.0",
"zwp_type": "thumbnail",
"zwp_version": "1.0",
"thumbnail": {
"url": "https://cdn.example.com/thumbnails/thumbnail.jpg",
"width": 160,
"height": 90,
"col": 10,
"row": 10,
"total": 100
}
}
This example describes a 10×10 sprite sheet containing 100 frames, each 160×90 pixels. When a user hovers over the video progress bar, the player calculates which frame to display based on the hover position relative to the total duration.
Note: The ZWMAP thumbnail protocol does not support backward compatibility. All fields are required. There are no probe rules — the protocol header must be present. The ZWMAP thumbnail protocol does not support backward compatibility. All fields are required. There are no probe rules — the protocol header must be present.
ZWPlayer Integration
ZWPlayer is a full-featured JavaScript video player that supports thumbnail preview out of the box. Here's how to integrate the generated sprite sheet with ZWPlayer.
Player Configuration
Add the thumbnails property to your ZWPlayer initialization config:
var player = new ZWPlayer({
playerElm: 'mse',
url: 'https://cdn.example.com/video.mp4',
thumbnails: {
url: 'https://cdn.example.com/thumbnails/thumbnail.jpg',
width: 160,
height: 90,
row: 10, // rowsize = ZWMAP's "col" value
total: 100
}
});
Important: ZWPlayer uses row as "rowsize" (frames per row), which corresponds to the ZWMAP protocol's col field. When copying from the exported JSON, map: ZWMAP col → ZWPlayer row. ZWPlayer uses row as "rowsize" (frames per row), which corresponds to the ZWMAP protocol's col field. When copying from the exported JSON, map: ZWMAP col → ZWPlayer row.
Copy Config from Tool
The tool provides a ready-to-use ZWPlayer configuration snippet in the JSON panel after generation. Click the copy button to copy it directly.
Live Preview
Press P or click the Preview button to open a full ZWPlayer instance with your generated sprite sheet. Hover over the progress bar to see the thumbnail preview in action. Press Esc to exit.
Using ZWMAP JSON
If you store thumbnails on a server, serve the ZWMAP JSON file at a known URL. Your application can fetch it and pass the parsed thumbnail object directly to ZWPlayer's config (with the col → row mapping).
Using a JSON URL
Instead of passing an object, you can pass the ZWMAP JSON file URL directly as a string. ZWPlayer will fetch and parse it automatically:
var player = new ZWPlayer({
playerElm: 'mse',
url: 'https://cdn.example.com/video.mp4',
thumbnails: 'https://cdn.example.com/thumbnails/movie_thumbnail.json'
});
Deployment: Download the ZWMAP JSON file and upload it to your web server. The sprite image referenced inside the JSON must also be uploaded to the same server. For convenience, download the ZIP bundle — extract it and upload the files together; the relative paths between the JSON and the sprite image will work automatically. Download the ZWMAP JSON file and upload it to your web server. The sprite image referenced inside the JSON must also be uploaded to the same server. For convenience, download the ZIP bundle — extract it and upload the files together; the relative paths between the JSON and the sprite image will work automatically.
Drag & Drop Loading
You can also load thumbnails by dragging files directly onto the ZWPlayer instance:
- Thumbnail JSON only: Drop a *_thumbnail.json file onto the player to load thumbnails for the currently playing video.
- Video + Thumbnail together: Drag a video file along with its thumbnail JSON and sprite image — the player will auto-match them by filename (e.g., movie.mp4 matches movie_thumbnail.json).
- Playlist drag: Drop multiple videos with their thumbnails to create a playlist with thumbnail previews for each item.
Note: When the JSON url field is a relative path (e.g., thumbnail.jpg), you must also drop the corresponding image file. The player will resolve it automatically.