Browse Source

server ffmpeg version needed extra args

Stephen Searles 1 year ago
parent
commit
fb93746ba6
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      media/video.go

+ 1
- 1
media/video.go View File

@@ -33,7 +33,7 @@ func VideoSize(filename string) (image.Rectangle, error) {
33 33
 func VideoEncode(filename string, size image.Rectangle, thumbDir string) error {
34 34
 	dest := thumbFilename(thumbDir, size, path.Base(filename))
35 35
 	os.MkdirAll(filepath.Dir(dest), 0755)
36
-	cmd := exec.Command("ffmpeg", "-i", filename, "-vf", fmt.Sprintf("scale=%d:%d", size.Dx(), size.Dy()), dest)
36
+	cmd := exec.Command("ffmpeg", "-i", filename, "-vf", fmt.Sprintf("scale=%d:%d", size.Dx(), size.Dy()), "-strict", "-2", dest)
37 37
 	if out, err := cmd.CombinedOutput(); err != nil {
38 38
 		os.Remove(dest)
39 39
 		return fmt.Errorf("could not thumb video: %s", string(out))

Loading…
Cancel
Save