if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
BLUE="$(tput setaf 4)"
BOLD="$(tput bold)"
NORMAL="$(tput sgr0)"
else
RED=""
GREEN=""
YELLOW=""
BLUE=""
BOLD=""
NORMAL=""
fi
if [[ $1 == "" ]]; then
printf "\n${BOLD}Usage: $0 <filename> <optional crf value> <optional output name>\n - If you want to encode a range of CRF values then use -1 as the crf value.${NORMAL}\n"
exit 1
fi
filename=$(basename -- "$1")
extension="${filename##*.}"
filename="${filename%.*}"
use_crf=$2
default_crf=25 # Programming vids have pretty crisp text @ crf 25.