1
0
mirror of https://github.com/nxshock/gallery.git synced 2024-11-27 00:11:00 +05:00

Fix ffmpeg cmd line

This commit is contained in:
nxshock 2023-04-09 19:54:01 +05:00
parent 328331768a
commit 378a467f65

View File

@ -60,11 +60,11 @@ func (pc *PreviewCache) Add(filePath string) ([]byte, error) {
"-f", "avif", "-f", "avif",
tempFileName) tempFileName)
} else { } else {
cmd = exec.Command("ffmpeg.exe", cmd = exec.Command("ffmpeg",
"-i", filepath.FromSlash(filePath), "-i", filepath.FromSlash(filePath),
"-vf", "scale=240:240:force_original_aspect_ratio=increase,crop=240:240:exact=1", "-vf", "scale=240:240:force_original_aspect_ratio=increase,crop=240:240:exact=1",
"-frames:v", "1", "-frames:v", "1",
"-crf", "40", "-crf", strconv.FormatUint(config.Crf, 10),
"-f", "avif", "-f", "avif",
tempFileName) tempFileName)
} }