Update video compression scripts

This commit is contained in:
2021-08-22 13:49:35 -04:00
parent f87d16d9c6
commit a3d6451725
4 changed files with 72 additions and 22 deletions

View File

@@ -23,21 +23,20 @@ else
NORMAL=""
fi
if [[ $1 == "" || $2 == "" ]]; then
printf "${BOLD}${RED}Usage: $0 <use-gpu (1|0)> <filename> <optional output name>${NORMAL}\n"
use_gpu=$1
filename=$(basename -- "$2")
output_name="$3"
if [[ $use_gpu == "" || $2 == "" || $output_name == "" ]]; then
printf "${BOLD}${RED}Usage: $0 <use-gpu (1|0)> <filename> <output name>${NORMAL}\n"
exit 1
fi
use_gpu=$1
# Found the following to work best with vids containing text (e.g. programming vid): 25 for CPU encoding and 27 for GPU.
use_crf=25
if [[ $use_gpu -eq 1 ]]; then
use_crf=27
fi
filename=$(basename -- "$2")
output_name="$3"
compress-video-with-crf $use_gpu $use_crf "$filename" "$output_name"