Expand description
Thumbnail and preview image generation.
This module provides configuration structures and utilities for generating thumbnail images or sprite sheets from video content. Actual pixel decoding is handled by the caller; this module focuses on timestamp selection, sizing, and nearest-neighbour scaling.
Structs§
- Animated
Frame - A single frame in an animated thumbnail.
- Animated
Thumbnail - An animated thumbnail consisting of multiple frames with timing.
- Sprite
Sheet - A sprite sheet: a single wide RGBA image that tiles multiple thumbnails left-to-right, top-to-bottom.
- Sprite
Sheet Config - Configuration for generating a sprite sheet from a video.
- Thumbnail
- A single generated thumbnail.
- Thumbnail
Config - Configuration for thumbnail generation.
- Thumbnail
ExtConfig - Extended thumbnail configuration with quality profile support.
Enums§
- Thumbnail
Format - Output format for generated thumbnails.
- Thumbnail
Quality Profile - Quality profile for thumbnail generation.
- Thumbnail
Strategy - Strategy for selecting thumbnail timestamps.
Functions§
- compute_
thumbnail_ timestamps - Computes a list of timestamps (in milliseconds) at which to capture thumbnails.
- compute_
uniform_ timestamps - Computes
countuniformly spaced timestamps acrossduration_ms. - format_
vtt_ time - Formats a millisecond timestamp as a WebVTT time string (
HH:MM:SS.mmm). - generate_
vtt_ track - Generates a WebVTT thumbnail track file from a sprite sheet and its URL.
- scale_
thumbnail - Scales a source image buffer to the destination dimensions using nearest-neighbour sampling.
- select_
smart_ thumbnails - Selects the
countmost visually interesting thumbnails from a set, ranked by spatial luminance variance. - thumbnail_
variance - Computes the spatial variance of an RGBA thumbnail’s luminance.