fix: add -preset as separate FFmpeg argument

This commit is contained in:
Esa Kataja
2026-04-04 19:27:00 +03:00
parent 832e5568f5
commit 9d8cc17e69
+2 -1
View File
@@ -229,7 +229,7 @@ func (e *Encoder) encodeVideo(input string, opusFiles []string, job *types.Job,
dir := filepath.Dir(input) dir := filepath.Dir(input)
outFile := filepath.Join(dir, "output.mkv") outFile := filepath.Join(dir, "output.mkv")
svtParams := fmt.Sprintf("film-grain=10:film-grain-denoise=1:scd=1:qm-min=4:qm-max=15:preset=%d", job.Preset) svtParams := fmt.Sprintf("film-grain=10:film-grain-denoise=1:scd=1:qm-min=4:qm-max=15")
zscaleStr, newWidth, err := e.calculateZscaleWidth(input, 0) zscaleStr, newWidth, err := e.calculateZscaleWidth(input, 0)
if err != nil { if err != nil {
@@ -257,6 +257,7 @@ func (e *Encoder) encodeVideo(input string, opusFiles []string, job *types.Job,
args = append(args, "-vf", vf) args = append(args, "-vf", vf)
args = append(args, "-c:v", "libsvtav1") args = append(args, "-c:v", "libsvtav1")
args = append(args, "-crf", strconv.Itoa(job.CRF)) args = append(args, "-crf", strconv.Itoa(job.CRF))
args = append(args, "-preset", strconv.Itoa(job.Preset))
args = append(args, "-svtav1-params", svtParams) args = append(args, "-svtav1-params", svtParams)
args = append(args, "-pix_fmt", "yuv420p10le") args = append(args, "-pix_fmt", "yuv420p10le")