Documentation
¶
Overview ¶
Package videoio samples frames from a local video file (via ffmpeg) into data:image/...;base64 URIs for the multimodal vision path. It NEVER fetches a remote URL — only local files. Frames, not weights, are the 8GB VRAM pressure, so callers cap maxFrames.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Duration ¶ added in v0.206.0
Duration returns the container duration of videoPath in seconds via ffprobe.
func ProbePath ¶ added in v0.206.0
ProbePath derives the ffprobe executable that ships next to ffmpegPath ("ffmpeg" -> "ffmpeg's sibling ffprobe"); an unqualified "ffmpeg" resolves through PATH the same way.
func SampleFrames ¶
func SampleFrames(videoPath, ffmpegPath string, fps float64, maxFrames, width, maxBytesPerFrame int) ([]string, error)
SampleFrames extracts up to maxFrames frames from videoPath at fps, each scaled to width px wide, and returns them as data:image/jpeg;base64 URIs (in order). ffmpegPath is the ffmpeg executable ("" => "ffmpeg"). A frame exceeding maxBytesPerFrame is rejected (guards the activation budget). The temp frame dir is always cleaned up.
func SampleFramesWindow ¶ added in v0.206.0
func SampleFramesWindow(videoPath, ffmpegPath string, start, dur, fps float64, maxFrames, width, maxBytesPerFrame int) ([]string, error)
SampleFramesWindow is SampleFrames over the [start, start+dur) window of the video only. video_watch sweeps a whole file window by window with it, so a long clip is seen END TO END instead of only its first maxFrames/fps seconds.
Types ¶
This section is empty.