thumbnail/video.go

23 lines
327 B
Go
Raw Normal View History

2016-11-18 06:44:27 +00:00
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()
}