Documentation
¶
Overview ¶
Package ffthumb provides a utility for finding an "interesting" thumbnail frame from a video file. FFmpeg (https://www.ffmpeg.org) is required.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Thumbnailer ¶
type Thumbnailer struct { Num int // number of candidate thumbnails FFmpegPath string // path to ffmpeg FFprobePath string // path to ffprobe }
func (*Thumbnailer) LookupExec ¶
func (p *Thumbnailer) LookupExec()
LookupExec fills in FFmpegPath or FFprobePath if either is empty, by calling exec.LookPath to find the binaries in PATH
func (*Thumbnailer) WriteThumbnail ¶
WriteThumbnail writes a png image to output, with the same dimensions as the input video.
WriteThumbnail chooses a thumbnail from a video file by creating Num thumbnails, then choosing the largest (in terms of file size). This is based on the idea that the largest, least compressible thumbnail image is likely to contain something interesting to look at.
FFmpegPath and FFprobePath must be set before calling WriteThumbnail.