generated from me/template-mit
pv-test, fixes and small enhancements via web.
pv-test, fix pv and pv2 outfile location if path in filename, test defaults for each option by keeping the skip, fix some spacing issues.
This commit is contained in:
+12
-12
@@ -771,7 +771,7 @@ alias vta="v2a"
|
||||
alias pull-audio="v2a"
|
||||
alias pa="v2a"
|
||||
|
||||
# Run all the different codecs, wrappers, bitrates, etc on a file.
|
||||
# Run all the different codecs, wrappers, bitrates, etc on a file.
|
||||
function pv-test {
|
||||
## Input ##
|
||||
|
||||
@@ -809,25 +809,25 @@ function pv-test {
|
||||
|
||||
read -p "Test presets? (y/N) " test_vpresets
|
||||
if [[ "$test_vpresets" == "y"* ]]; then
|
||||
vpresets="slo fst def" # med
|
||||
vpresets="$vpresets slo fst med"
|
||||
fi
|
||||
echo " presets: '$vpresets'"
|
||||
|
||||
read -p "Test CRFs? (y/N) " test_crfs
|
||||
if [[ "$test_crfs" == "y"* ]]; then
|
||||
crfs="24 26 28 30 32"
|
||||
crfs="$crfs 24 26 28 30 32"
|
||||
fi
|
||||
echo " CRFs: '$crfs'"
|
||||
|
||||
read -p "Test video bitrates? (y/N) " test_vbrs
|
||||
if [[ "$test_vbrs" == "y"* ]]; then
|
||||
vbrs="1500k 2000k 2500k"
|
||||
vbrs="$vbrs 1500k 2000k 2500k"
|
||||
fi
|
||||
echo " video bitrates: '$vbrs'"
|
||||
|
||||
read -p "Test audio bitrates? (y/N) " test_abrs
|
||||
if [[ "$test_abrs" == "y"* ]]; then
|
||||
abrs="128k 192k"
|
||||
abrs="$abrs 128k 192k"
|
||||
fi
|
||||
echo " audio bitrates: '$abrs'"
|
||||
|
||||
@@ -839,14 +839,14 @@ function pv-test {
|
||||
read -p "Create a test with current 'pv' function? (Y/n) " test_pv
|
||||
if [[ -z "$test_pv" || "$test_pv" == "y"* ]]; then
|
||||
pv="y"
|
||||
echo " great, will do!"
|
||||
echo " great, will run pv"
|
||||
else
|
||||
echo " skipping"
|
||||
fi
|
||||
read -p "Create a test with current 'pv2' function? (Y/n) " test_pv2
|
||||
if [[ -z "$test_pv2" || "$test_pv2" == "y"* ]]; then
|
||||
pv2="y"
|
||||
echo " great, will do!"
|
||||
echo " great, will run pv2"
|
||||
else
|
||||
echo " skipping"
|
||||
fi
|
||||
@@ -854,7 +854,7 @@ function pv-test {
|
||||
# Final Check #
|
||||
|
||||
typeset -u okay
|
||||
echo " Testing all this with '$filename_in'"
|
||||
echo "Testing all this with '$filename_in'"
|
||||
read -p "Look okay? (Y/n) " okay
|
||||
if [[ "$okay" == "N" || "$okay" == "F"* ]]; then
|
||||
echo "* Not okay, aborting."
|
||||
@@ -863,11 +863,11 @@ function pv-test {
|
||||
|
||||
## Main ##
|
||||
|
||||
echo -e "\nHere we go!\n"
|
||||
echo -e "Here we go!\n"
|
||||
|
||||
if [[ "$pv" == "y" ]]; then
|
||||
echo "Starting pv..."
|
||||
filename_pv="${filename_in}-pv.mkv"
|
||||
filename_pv="$(basename "${filename_in}-pv.mkv")"
|
||||
if [[ -e "$filename_pv" ]]; then
|
||||
mv -v "$filename_pv" ~/TRASH
|
||||
fi
|
||||
@@ -876,7 +876,7 @@ function pv-test {
|
||||
fi
|
||||
if [[ "$pv2" == "y" ]]; then
|
||||
echo "Starting pv2..."
|
||||
filename_pv2="${filename_in}-pv2.mkv"
|
||||
filename_pv2="$(basename "${filename_in}-pv2.mkv")"
|
||||
if [[ -e "$filename_pv2" ]]; then
|
||||
mv -v "$filename_pv2" ~/TRASH
|
||||
fi
|
||||
@@ -896,7 +896,7 @@ function pv-test {
|
||||
for ext in $exts; do
|
||||
|
||||
preset=""
|
||||
if [[ "$vpreset" != "skip" && "$vpreset" != "def" ]]; then
|
||||
if [[ "$vpreset" != "skip" ]]; then
|
||||
if [[ "$vcodec" == "libsvtav1" ]]; then
|
||||
case $vpreset in
|
||||
slo) preset="0" ;;
|
||||
|
||||
Reference in New Issue
Block a user