Browse Source

Update to av1

master
Ryan Beck 1 year ago
parent
commit
11adb1de87
2 changed files with 11 additions and 6 deletions
  1. +4
    -2
      findVideos.sh
  2. +7
    -4
      transcode.sh

+ 4
- 2
findVideos.sh View File

@ -4,12 +4,14 @@
ffBin="/usr/bin/" ffBin="/usr/bin/"
parentDir=$1 parentDir=$1
destDir="/tmp/transcode/"
mkdir -p "$destDir"
while read -r line; while read -r line;
do do
codec="$( $ffBin/ffprobe -loglevel error -select_streams v:0 -show_entries \ codec="$( $ffBin/ffprobe -loglevel error -select_streams v:0 -show_entries \
stream=codec_name -of default=noprint_wrappers=1:nokey=1 "$line" )" stream=codec_name -of default=noprint_wrappers=1:nokey=1 "$line" )"
if [[ $codec == *"264"* ]]
if ! [[ $codec == *"av1"* ]]
then then
echo "$line" >>/tmp/transcode/list.txt
echo "$line" >>"$destDir/list.txt"
fi fi
done<<<"$( find "$parentDir" -name "*.mkv" -print )" done<<<"$( find "$parentDir" -name "*.mkv" -print )"

+ 7
- 4
transcode.sh View File

@ -21,9 +21,11 @@ function encode {
local outFL=$2 local outFL=$2
$FFBIN/ffmpeg -hide_banner -loglevel error -stats -re -i "$tmpFL" -map 0 \ $FFBIN/ffmpeg -hide_banner -loglevel error -stats -re -i "$tmpFL" -map 0 \
-map_metadata 0 -c copy \ -map_metadata 0 -c copy \
-c:v libx265 -preset slow -x265-params crf=23 \
-c:v libsvtav1 -crf 28 -g 240 -preset 6 -svtav1-params \
"enable-overlays=1:\
tune=0" \
-use_wallclock_as_timestamps 1 \ -use_wallclock_as_timestamps 1 \
-map_chapters 0 -max_muxing_queue_size 9999 "$outFL"
-map_chapters 0 -max_muxing_queue_size 9999 -y "$outFL"
} }
function burnSubs { function burnSubs {
@ -38,9 +40,10 @@ function burnSubs {
$FFBIN/ffmpeg -hide_banner -loglevel error -stats -i "$inFL" \ $FFBIN/ffmpeg -hide_banner -loglevel error -stats -i "$inFL" \
-filter_complex "[0:v][0:s:$track]overlay[v]" -map "[v]" \ -filter_complex "[0:v][0:s:$track]overlay[v]" -map "[v]" \
-filter_complex_threads 1 \
-map 0:a -c:a copy -map 0:s -map -0:s:$track -c:s copy \ -map 0:a -c:a copy -map 0:s -map -0:s:$track -c:s copy \
-map_metadata 0 -map_chapters 0 -max_muxing_queue_size 9999 \
-t $DURATION "$tmpFL"
-map_metadata 0 -map_chapters 0 -max_muxing_queue_size 4096 \
-t $DURATION -threads 1 -y "$tmpFL"
rm "$inFL" #SAVE SPACE rm "$inFL" #SAVE SPACE

Loading…
Cancel
Save