leave no containers behind

This commit is contained in:
sc-idevops 2025-02-12 21:46:56 -05:00
parent f6dfcbb55e
commit 53a1c2d8a4

View file

@ -3,17 +3,18 @@
#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 is $format"
echo "Format of file $1 is $format"
if [ "$format" != "av1" ]
then
docker run -it --device=/dev/dri:/dev/dri -v "$(pwd)":/config linuxserver/ffmpeg \
docker run -it -rm --device=/dev/dri:/dev/dri -v "$(pwd)":/config linuxserver/ffmpeg \
-i "/config/$1" \
-n \
-vaapi_device /dev/dri/renderD128 \
-c:v av1_qsv \
-crf 30 \
-preset 3 \
-g 150 \
-c:a aac \
"/config/${1}_converted.mkv"
"/config/${1%.mp4}.mkv"
fi