mirror of
https://github.com/levogevo/ffmpeg-av1-builder.git
synced 2026-01-15 16:56:18 +00:00
log is done
This commit is contained in:
@@ -18,17 +18,16 @@ test -f "$INPUT_DIR/${INPUT[2]}" || wget -O "$INPUT_DIR/${INPUT[2]}" 'https://ww
|
||||
rm -rf "$OUTPUT_DIR" && mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
# Different variables to test
|
||||
CRF=(40)
|
||||
CRF=(20 25 30)
|
||||
ENCODER=('libsvtav1' 'librav1e' 'libaom-av1')
|
||||
ENCODER=('libsvtav1')
|
||||
PRESET=(13)
|
||||
PRESET=(4 8 12)
|
||||
|
||||
# Log for results
|
||||
LOG="$OUTPUT_DIR/results.txt"
|
||||
VMAF_RESULTS="$OUTPUT_DIR/vmaf.json"
|
||||
|
||||
for input in "${INPUT[@]}"
|
||||
do
|
||||
# echo "$input"
|
||||
for encoder in "${ENCODER[@]}"
|
||||
do
|
||||
for preset in "${PRESET[@]}"
|
||||
@@ -38,11 +37,14 @@ do
|
||||
OUTPUT="$OUTPUT_DIR/${encoder}_preset${preset}_crf${crf}_$input"
|
||||
echo "output: $OUTPUT" >> "$LOG"
|
||||
TIME_BEFORE=$(date +%s)
|
||||
ffmpeg -i "$INPUT_DIR/$input" -c:a copy -c:v "$encoder" -preset "$preset" -crf "$crf" "$OUTPUT" 2> /dev/null || exit 1
|
||||
ffmpeg -i "$INPUT_DIR/$input" -c:a copy -c:v "$encoder" \
|
||||
-preset "$preset" -crf "$crf" "$OUTPUT" 2> /dev/null || exit 1
|
||||
TIME_AFTER=$(date +%s)
|
||||
TIME_DIFF=$((TIME_AFTER - TIME_BEFORE))
|
||||
echo -e "\t time taken: $TIME_DIFF" >> "$LOG"
|
||||
ffmpeg -i "$OUTPUT" -i "$INPUT_DIR/$input" -lavfi libvmaf=n_threads="$(nproc)" -f 'null' - | grep "VMAF score:" >> "$LOG" || exit 1
|
||||
echo -e "\t time taken: $TIME_DIFF seconds" >> "$LOG"
|
||||
ffmpeg -an -sn -i "$OUTPUT" -i "$INPUT_DIR/$input" -lavfi \
|
||||
libvmaf=n_threads="$(nproc)":log_path="$VMAF_RESULTS":log_fmt='json' -f 'null' -
|
||||
echo -e "\t mean vmaf: $(cat "$VMAF_RESULTS" | jq '.pooled_metrics.vmaf.mean')" >> "$LOG" || exit 1
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
@@ -6,7 +6,7 @@ sudo apt-get install autoconf automake build-essential cmake git-core \
|
||||
libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev \
|
||||
libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config \
|
||||
texinfo wget zlib1g-dev nasm yasm libssl-dev time python3 meson ninja-build\
|
||||
doxygen xxd -y || exit 1
|
||||
doxygen xxd jq -y || exit 1
|
||||
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
source "$HOME/.cargo/env"
|
||||
|
||||
Reference in New Issue
Block a user