altered av1 encoding
This commit is contained in:
parent
868846288a
commit
f6dfcbb55e
2 changed files with 19 additions and 18 deletions
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# https://forum.level1techs.com/t/ffmpeg-av1-encoding-using-intel-arc-gpu-tips/205120/2
|
|
||||||
ffmpeg \
|
|
||||||
-extra_hw_frames 40 \
|
|
||||||
-i "$1" \
|
|
||||||
-init_hw_device vaapi=va:/dev/dri/renderD128 \
|
|
||||||
-c:v av1_qsv \
|
|
||||||
-preset veryslow \
|
|
||||||
-extbrc 1 \
|
|
||||||
-look_ahead_depth 40 \
|
|
||||||
-b:v 1M \
|
|
||||||
-bufsize 2M \
|
|
||||||
-rc_init_occupancy 512K \
|
|
||||||
-low_power 0 \
|
|
||||||
-adaptive_i 1 \
|
|
||||||
-adaptive_b 1 \
|
|
||||||
-b_strategy 1 -bf 7 \
|
|
||||||
"$2"
|
|
19
scripts/av1_encode.sh
Executable file
19
scripts/av1_encode.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#this script assumes its being run in the working directory
|
||||||
|
|
||||||
|
#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"
|
||||||
|
|
||||||
|
if [ "$format" != "av1" ]
|
||||||
|
then
|
||||||
|
docker run -it --device=/dev/dri:/dev/dri -v "$(pwd)":/config linuxserver/ffmpeg \
|
||||||
|
-i "/config/$1" \
|
||||||
|
-vaapi_device /dev/dri/renderD128 \
|
||||||
|
-c:v av1_qsv \
|
||||||
|
-crf 30 \
|
||||||
|
-preset 3 \
|
||||||
|
-g 150 \
|
||||||
|
-c:a aac \
|
||||||
|
"/config/${1}_converted.mkv"
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue