fixed crf by replacing it with global quality

This commit is contained in:
sc-idevops 2025-02-15 21:02:47 -05:00
parent b714c7aa28
commit b76fc64528

View file

@ -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 \