pv3, add vertical support and calculate run time.

This commit is contained in:
me committed 2026-11-11 19:04:42 -07:00
1 parent c6a309ec82
commit 9e760da21f
1 file changed
+19 -1
+19 -1
View File
@@ -1163,6 +1163,8 @@ function pv3 {
out="$2" out="$2"
echo "Processing '$org' to '$out' using AV1 and OPUS." echo "Processing '$org' to '$out' using AV1 and OPUS."
vrt="$3"
## Versions ## ## Versions ##
# v0 # v0
@@ -1216,11 +1218,17 @@ function pv3 {
## Main ## ## Main ##
if [[ -n "$vrt" ]]; then
scale=720:-1
echo "Using a vertial orientation,. $scale"
fi
echo -e "\n * Original File * \n" echo -e "\n * Original File * \n"
ffprobe -i "$org" ffprobe -i "$org"
echo -e "\n * Starting Processing *\n" echo -e "\n * Starting Processing *\n"
date date
start=$SECONDS
set -x set -x
ffmpeg -nostdin -hide_banner -loglevel level+warning \ ffmpeg -nostdin -hide_banner -loglevel level+warning \
-i "$org" \ -i "$org" \
@@ -1235,6 +1243,7 @@ function pv3 {
"$out" "$out"
status="$?" status="$?"
set +x set +x
end=$SECONDS
# -crf $crf \ # -crf $crf \
if [[ "$status" != 0 || ! -s "$out" ]]; then if [[ "$status" != 0 || ! -s "$out" ]]; then
@@ -1243,8 +1252,17 @@ function pv3 {
return $status return $status
fi fi
echo -e "\n * Success! *" seconds=(( end - start ))
h=$(( seconds / 60 / 60 ))
m=$(( seconds / 60 % 60 ))
s=$(( seconds % 60 ))
echo -e "\n * Success! Took ${h}h${m}m${s}s. *"
} }
function pv3s {
pv3 "$1" "$2" y
}
alias pvs3="pv3s"
# 20260915 - Stack 2 videos for comparing quality. TBD: Move to Ansible? # 20260915 - Stack 2 videos for comparing quality. TBD: Move to Ansible?
function vcompare { function vcompare {