From 2f412fc82086d1cb75b104c0fc010e6aa6b15f41 Mon Sep 17 00:00:00 2001 From: Henry Dollman Date: Wed, 27 Mar 2024 18:12:52 -0400 Subject: [PATCH] adjust ffmpeg settings --- convert.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/convert.go b/convert.go index 3fef2d3..7c91003 100644 --- a/convert.go +++ b/convert.go @@ -72,27 +72,34 @@ func Convert(infile string, outfile string, codec string) { ffmpegArgs["vf"] = "scale=1080:-2" } - if StripAudio { - ffmpegArgs["an"] = "" - } if Preview { ffmpegArgs["ss"] = "00:00:00" ffmpegArgs["t"] = "00:00:03" } + if StripAudio { + ffmpegArgs["an"] = "" + } + // else { + // set audio options + // ffmpegArgs["c:a"] = "libopus" + // ffmpegArgs["b:a"] = "128k" + // ffmpegArgs["ac"] = "2" + // } + // x265 specific options if codec == "libx265" { ffmpegArgs["crf"] = Crf ffmpegArgs["movflags"] = "faststart" - ffmpegArgs["preset"] = "slow" ffmpegArgs["tag:v"] = "hvc1" + // ffmpegArgs["preset"] = "slow" // ffmpegArgs["profile:v"] = "main" // ffmpegArgs["pix_fmt"] = "yuv420p" } // av1 specific options if codec == "libsvtav1" { - ffmpegArgs["preset"] = "6" + ffmpegArgs["preset"] = "7" // add 7 to base crf (28 -> 35) crf, err := strconv.Atoi(Crf) if err != nil {