generated from me/template-mit
pv3, add vertical support and calculate run time.
This commit is contained in:
1 parent
c6a309ec82
commit
9e760da21f
1 file changed
+19
-1
+19
-1
@@ -1163,6 +1163,8 @@ function pv3 {
|
||||
out="$2"
|
||||
echo "Processing '$org' to '$out' using AV1 and OPUS."
|
||||
|
||||
vrt="$3"
|
||||
|
||||
## Versions ##
|
||||
|
||||
# v0
|
||||
@@ -1216,11 +1218,17 @@ function pv3 {
|
||||
|
||||
## Main ##
|
||||
|
||||
if [[ -n "$vrt" ]]; then
|
||||
scale=720:-1
|
||||
echo "Using a vertial orientation,. $scale"
|
||||
fi
|
||||
|
||||
echo -e "\n * Original File * \n"
|
||||
ffprobe -i "$org"
|
||||
|
||||
echo -e "\n * Starting Processing *\n"
|
||||
date
|
||||
start=$SECONDS
|
||||
set -x
|
||||
ffmpeg -nostdin -hide_banner -loglevel level+warning \
|
||||
-i "$org" \
|
||||
@@ -1235,6 +1243,7 @@ function pv3 {
|
||||
"$out"
|
||||
status="$?"
|
||||
set +x
|
||||
end=$SECONDS
|
||||
# -crf $crf \
|
||||
|
||||
if [[ "$status" != 0 || ! -s "$out" ]]; then
|
||||
@@ -1243,8 +1252,17 @@ function pv3 {
|
||||
return $status
|
||||
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?
|
||||
function vcompare {
|
||||
|
||||
Reference in new issue
Block a user