Browse Source

server ffmpeg version needed extra args

master
Stephen Searles 2 years 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) {
func VideoEncode(filename string, size image.Rectangle, thumbDir string) error {
dest := thumbFilename(thumbDir, size, path.Base(filename))
os.MkdirAll(filepath.Dir(dest), 0755)
cmd := exec.Command("ffmpeg", "-i", filename, "-vf", fmt.Sprintf("scale=%d:%d", size.Dx(), size.Dy()), dest)
cmd := exec.Command("ffmpeg", "-i", filename, "-vf", fmt.Sprintf("scale=%d:%d", size.Dx(), size.Dy()), "-strict", "-2", dest)
if out, err := cmd.CombinedOutput(); err != nil {
os.Remove(dest)
return fmt.Errorf("could not thumb video: %s", string(out))

Loading…
Cancel
Save