mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Fixes FFMPEG failure edge case
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"github.com/stashapp/stash/pkg/logger"
|
"github.com/stashapp/stash/pkg/logger"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Encoder struct {
|
type Encoder struct {
|
||||||
@@ -53,6 +54,7 @@ func (e *Encoder) run(probeResult VideoFile, args []string) (string, error) {
|
|||||||
stdoutString := string(stdoutData)
|
stdoutString := string(stdoutData)
|
||||||
|
|
||||||
if err := cmd.Wait(); err != nil {
|
if err := cmd.Wait(); err != nil {
|
||||||
|
logger.Errorf("ffmpeg error when running command <%s>", strings.Join(cmd.Args, " "))
|
||||||
return stdoutString, err
|
return stdoutString, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ func (e *Encoder) SceneMarkerVideo(probeResult VideoFile, options SceneMarkerOpt
|
|||||||
"-ss", strconv.Itoa(options.Seconds),
|
"-ss", strconv.Itoa(options.Seconds),
|
||||||
"-t", "20",
|
"-t", "20",
|
||||||
"-i", probeResult.Path,
|
"-i", probeResult.Path,
|
||||||
|
"-max_muxing_queue_size", "1024", // https://trac.ffmpeg.org/ticket/6375
|
||||||
"-c:v", "libx264",
|
"-c:v", "libx264",
|
||||||
"-profile:v", "high",
|
"-profile:v", "high",
|
||||||
"-level", "4.2",
|
"-level", "4.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user