govd/util/av/thumbnail.go
stefanodvx 58bd5827b3 main: changes, fixes
- refactors http session usage across modules
- adjusts video info extraction
- improves temporary directory, concurrency limits, buffering, and error handling in download routines
2025-04-14 23:45:54 +02:00

24 lines
359 B
Go

package av
import (
ffmpeg "github.com/u2takey/ffmpeg-go"
)
func ExtractVideoThumbnail(
videoPath string,
thumbnailPath string,
) error {
err := ffmpeg.
Input(videoPath).
Output(thumbnailPath, ffmpeg.KwArgs{
"vframes": 1,
"ss": "00:00:01",
}).
Silent(true).
OverWriteOutput().
Run()
if err != nil {
return err
}
return nil
}