pv-test, refactor some and change default recommended codecs.

This commit is contained in:
me
2026-09-15 15:57:58 -07:00
parent 13c542b888
commit 5f13c6624b
+26 -27
View File
@@ -782,38 +782,21 @@ function pv-test {
read -p "Please provide the filename: " filename_in
done
# Persistent Data #
normalize=""
typeset -u normalize_in
read -p "Would you like to normalize the audio? (Y/n) " normalize_in
if [[ $normalize_in != "N"* && $normalize_in != "F"* ]]; then
normalize="-filter:a dynaudnorm=f=33:g=65:p=0.66:m=33.3"
fi
echo -e " normalize: '$normalize'\n"
typeset -i size_in
read -p "What display ratio would you like to use? (720) " size_in
if (( $size_in == 0 )); then
size_in=720
fi
echo -e " size: '$size_in'\n"
# Existing Functions #
declare -l pv{,2}="n"
typeset -l test_pv{,2}
read -p "Create a test with current 'pv' function? (Y/n) " test_pv
if [[ -z "$test_pv" || "$test_pv" == "y"* ]]; then
read -p "Create a test with current 'pv' function? (y/N) " test_pv
if [[ "$test_pv" == "y"* ]]; then
pv="y"
echo " great, will run pv"
else
echo " skipping"
fi
echo " "
read -p "Create a test with current 'pv2' function? (Y/n) " test_pv2
if [[ -z "$test_pv2" || "$test_pv2" == "y"* ]]; then
read -p "Create a test with current 'pv2' function? (y/N) " test_pv2
if [[ "$test_pv2" == "y"* ]]; then
pv2="y"
echo " great, will run pv2"
else
@@ -827,13 +810,21 @@ function pv-test {
echo -e " * * Loop Settings * * \n"
vcodecs="libx264 libsvtav1 libx265"
typeset -i size_in
read -p "What display ratio would you like to use? (720) " size_in
if (( $size_in == 0 )); then
size_in=720
fi
echo -e " size: '$size_in'\n"
vcodecs="libx264 libsvtav1"
read -p "Please provide the video codecs to test: [$vcodecs] " test_vcodecs
if [[ -n "$test_vcodecs" ]]; then
vcodecs="$test_vcodecs"
fi
echo -e " video codecs: '$vcodecs'\n"
echo ""
read -p "Test the video codec's slowest, medium, and fastest presets? (y/N) " test_vpresets
if [[ "$test_vpresets" == "y"* ]]; then
vpresets="slw med fst"
@@ -866,7 +857,7 @@ function pv-test {
echo -e " under percentages: '$unders'\n"
fi
acodecs="aac libopus"
acodecs="libopus"
read -p "Please provide the audio codecs to test: [$acodecs] " test_acodecs
if [[ -n "$test_acodecs" ]]; then
acodecs="$test_acodecs"
@@ -891,6 +882,14 @@ function pv-test {
fi
echo -e " audio frequencies: '$afreqs'\n"
normalize=""
typeset -u normalize_in
read -p "Would you like to normalize the audio? (Y/n) " normalize_in
if [[ $normalize_in != "N"* && $normalize_in != "F"* ]]; then
normalize="-filter:a dynaudnorm=f=33:g=65:p=0.66:m=33.3"
fi
echo -e " normalize: '$normalize'\n"
exts="mkv"
read -p "Please provide the containers to test with: [$exts] " test_exts
if [[ -n "$test_exts" ]]; then
@@ -994,12 +993,12 @@ function pv-test {
declare {o,u}=""
if [[ "$over" != "default" ]]; then
o=":overshoot-pct=$over"
ofn="-o$over"
o=":overshoot-pct=${over}"
ofn="-o${over}"
fi
if [[ "$under" != "default" ]]; then
u=":undershoot-pct=$under"
ufn="-u$under"
u=":undershoot-pct=${under}"
ufn="-u${under}"
fi
if [[ "$crf" == "default" ]]; then