From b76fc64528d5954673cded0855c6086b6cc173a2 Mon Sep 17 00:00:00 2001 From: sc-idevops Date: Sat, 15 Feb 2025 21:02:47 -0500 Subject: [PATCH] fixed crf by replacing it with global quality --- scripts/av1_encode.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/av1_encode.sh b/scripts/av1_encode.sh index 1566db6..cee2440 100755 --- a/scripts/av1_encode.sh +++ b/scripts/av1_encode.sh @@ -3,16 +3,19 @@ #test to see if its already been encoded to av1 or else it converts it format=$(ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=nokey=1:noprint_wrappers=1 "$1") -echo "Format of file $1 is $format" +rate=28 +echo "Format of file $1 is ---> $format" if [ "$format" != "av1" ] then docker run -it --rm --device=/dev/dri:/dev/dri -v "$(pwd)":/config linuxserver/ffmpeg \ - -i "/config/$1" \ + -hide_banner -loglevel warning -v quiet -stats \ + -hwaccel qsv -hwaccel_output_format qsv -qsv_device /dev/dri/renderD128 \ -n \ - -vaapi_device /dev/dri/renderD128 \ + -i "/config/$1" \ -c:v av1_qsv \ - -crf 30 \ + -global_quality $rate \ + -look_ahead 1 -look_ahead_depth 100 \ -preset 3 \ -g 150 \ -c:a aac \