generated from me/template-mit
pv-test, refactor some and change default recommended codecs.
This commit is contained in:
+26
-27
@@ -782,38 +782,21 @@ function pv-test {
|
|||||||
read -p "Please provide the filename: " filename_in
|
read -p "Please provide the filename: " filename_in
|
||||||
done
|
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 #
|
# Existing Functions #
|
||||||
|
|
||||||
declare -l pv{,2}="n"
|
declare -l pv{,2}="n"
|
||||||
typeset -l test_pv{,2}
|
typeset -l test_pv{,2}
|
||||||
|
|
||||||
read -p "Create a test with current 'pv' function? (Y/n) " test_pv
|
read -p "Create a test with current 'pv' function? (y/N) " test_pv
|
||||||
if [[ -z "$test_pv" || "$test_pv" == "y"* ]]; then
|
if [[ "$test_pv" == "y"* ]]; then
|
||||||
pv="y"
|
pv="y"
|
||||||
echo " great, will run pv"
|
echo " great, will run pv"
|
||||||
else
|
else
|
||||||
echo " skipping"
|
echo " skipping"
|
||||||
fi
|
fi
|
||||||
echo " "
|
echo " "
|
||||||
read -p "Create a test with current 'pv2' function? (Y/n) " test_pv2
|
read -p "Create a test with current 'pv2' function? (y/N) " test_pv2
|
||||||
if [[ -z "$test_pv2" || "$test_pv2" == "y"* ]]; then
|
if [[ "$test_pv2" == "y"* ]]; then
|
||||||
pv2="y"
|
pv2="y"
|
||||||
echo " great, will run pv2"
|
echo " great, will run pv2"
|
||||||
else
|
else
|
||||||
@@ -827,13 +810,21 @@ function pv-test {
|
|||||||
|
|
||||||
echo -e " * * Loop Settings * * \n"
|
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
|
read -p "Please provide the video codecs to test: [$vcodecs] " test_vcodecs
|
||||||
if [[ -n "$test_vcodecs" ]]; then
|
if [[ -n "$test_vcodecs" ]]; then
|
||||||
vcodecs="$test_vcodecs"
|
vcodecs="$test_vcodecs"
|
||||||
fi
|
fi
|
||||||
echo -e " video codecs: '$vcodecs'\n"
|
echo -e " video codecs: '$vcodecs'\n"
|
||||||
|
|
||||||
|
echo ""
|
||||||
read -p "Test the video codec's slowest, medium, and fastest presets? (y/N) " test_vpresets
|
read -p "Test the video codec's slowest, medium, and fastest presets? (y/N) " test_vpresets
|
||||||
if [[ "$test_vpresets" == "y"* ]]; then
|
if [[ "$test_vpresets" == "y"* ]]; then
|
||||||
vpresets="slw med fst"
|
vpresets="slw med fst"
|
||||||
@@ -866,7 +857,7 @@ function pv-test {
|
|||||||
echo -e " under percentages: '$unders'\n"
|
echo -e " under percentages: '$unders'\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
acodecs="aac libopus"
|
acodecs="libopus"
|
||||||
read -p "Please provide the audio codecs to test: [$acodecs] " test_acodecs
|
read -p "Please provide the audio codecs to test: [$acodecs] " test_acodecs
|
||||||
if [[ -n "$test_acodecs" ]]; then
|
if [[ -n "$test_acodecs" ]]; then
|
||||||
acodecs="$test_acodecs"
|
acodecs="$test_acodecs"
|
||||||
@@ -891,6 +882,14 @@ function pv-test {
|
|||||||
fi
|
fi
|
||||||
echo -e " audio frequencies: '$afreqs'\n"
|
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"
|
exts="mkv"
|
||||||
read -p "Please provide the containers to test with: [$exts] " test_exts
|
read -p "Please provide the containers to test with: [$exts] " test_exts
|
||||||
if [[ -n "$test_exts" ]]; then
|
if [[ -n "$test_exts" ]]; then
|
||||||
@@ -994,12 +993,12 @@ function pv-test {
|
|||||||
|
|
||||||
declare {o,u}=""
|
declare {o,u}=""
|
||||||
if [[ "$over" != "default" ]]; then
|
if [[ "$over" != "default" ]]; then
|
||||||
o=":overshoot-pct=$over"
|
o=":overshoot-pct=${over}"
|
||||||
ofn="-o$over"
|
ofn="-o${over}"
|
||||||
fi
|
fi
|
||||||
if [[ "$under" != "default" ]]; then
|
if [[ "$under" != "default" ]]; then
|
||||||
u=":undershoot-pct=$under"
|
u=":undershoot-pct=${under}"
|
||||||
ufn="-u$under"
|
ufn="-u${under}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$crf" == "default" ]]; then
|
if [[ "$crf" == "default" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user