23 lines
327 B
Go
23 lines
327 B
Go
package thumbnail
|
|
|
|
import (
|
|
"os/exec"
|
|
)
|
|
|
|
func (this *Thumbnailer) RenderScaledFfmpeg(absPath string) ([]byte, error) {
|
|
|
|
cmd := exec.Command(
|
|
"ffmpeg",
|
|
"-loglevel", "0",
|
|
"-an",
|
|
"-i", absPath,
|
|
"-vf", "thumbnail,scale=100:100",
|
|
"-frames:v", "1",
|
|
"-f", "image2pipe",
|
|
"-c:v", "png",
|
|
"-",
|
|
)
|
|
|
|
cmd.StdoutPipe()
|
|
}
|