Documentation
¶
Overview ¶
Package video provides video frame extraction and keyframe detection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupFrames ¶
func CleanupFrames(frames []Frame)
CleanupFrames removes the temporary frame directory
func GetDuration ¶
GetDuration returns the duration of a video file using ffprobe
func SaveKeyframes ¶
func SaveKeyframes(keyframes []Keyframe, outputDir string, quality int, scale float64, onProgress ProgressFunc) error
SaveKeyframes saves keyframes as JPEGs with optional scaling and quality settings
Types ¶
type Frame ¶
Frame represents an extracted video frame
func ExtractFrames ¶
func ExtractFrames(inputPath string, duration time.Duration, onProgress ProgressFunc) ([]Frame, error)
ExtractFrames extracts frames from a video file at 1 fps
type Keyframe ¶
Keyframe represents a frame that differs significantly from its predecessor
func DetectKeyframes ¶
func DetectKeyframes(frames []Frame, threshold float64, onProgress ProgressFunc) ([]Keyframe, error)
DetectKeyframes analyzes frames and returns those that differ significantly from their predecessors based on normalized cross-correlation
type ProgressFunc ¶
type ProgressFunc func(percent float64)
ProgressFunc is called with progress updates (0.0 to 1.0)
Click to show internal directories.
Click to hide internal directories.