dotfiles/local/bin/convert-libaom.sh: import latest
This commit is contained in:
parent
f386c25a22
commit
276bb1c239
@ -11,6 +11,7 @@
|
|||||||
# - https://trac.ffmpeg.org/wiki/Encode/AV1
|
# - https://trac.ffmpeg.org/wiki/Encode/AV1
|
||||||
#
|
#
|
||||||
# Changes:
|
# Changes:
|
||||||
|
# 2024-01-21: minor improvement to handling of output file name
|
||||||
# 2022-06-13: use _max_crf in mkvpropedit if we don't find an acceptable vmaf
|
# 2022-06-13: use _max_crf in mkvpropedit if we don't find an acceptable vmaf
|
||||||
# 2022-04-05: update VMAF log parsing
|
# 2022-04-05: update VMAF log parsing
|
||||||
# 2021-10-21: I tested 2-pass and found it doesn't do anything for constant
|
# 2021-10-21: I tested 2-pass and found it doesn't do anything for constant
|
||||||
@ -53,15 +54,16 @@ elif [[ ! -r "$1" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INPUT_FILE_BASENAME=$(basename "$1")
|
INPUT_FILE_BASENAME=$(basename -- "$1")
|
||||||
INPUT_FILE_EXTENSION=${INPUT_FILE_BASENAME##*.}
|
INPUT_FILE_EXTENSION=${INPUT_FILE_BASENAME##*.}
|
||||||
INPUT_FILE_DIRNAME=$(dirname "$1")
|
INPUT_FILE_DIRNAME=$(dirname -- "$1")
|
||||||
|
|
||||||
# Check if an output file name was specified (like if we are calling from the
|
# Check if an output file name was specified (like if we are calling from the
|
||||||
# benchmarking script, in which case we want to exit as soon as possible). If
|
# benchmarking script, in which case we want to exit as soon as possible). If
|
||||||
# not then we can continue with a simple filename based on the input file's.
|
# not then we can continue with a simple filename based on the input file's.
|
||||||
if [[ -z $_output_file ]]; then
|
if [[ -z $_output_file ]]; then
|
||||||
_output_file="${INPUT_FILE_BASENAME/.*/}.webm";
|
# Strip file extension from end of string and replace with webm
|
||||||
|
_output_file="${INPUT_FILE_BASENAME%$INPUT_FILE_EXTENSION}webm";
|
||||||
_benchmark_mode="false"
|
_benchmark_mode="false"
|
||||||
else
|
else
|
||||||
_benchmark_mode="true"
|
_benchmark_mode="true"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user