This commit is contained in:
2024-01-27 20:38:02 -06:00
parent d73361d79f
commit 08039ea756
3 changed files with 37 additions and 23 deletions

13
.gitignore vendored
View File

@@ -1,6 +1,7 @@
ffmpeg/ ffmpeg
rav1e/ rav1e
svt/ svt
aom/ aom
vmaf/ vmaf
benchmark/ dav1d
benchmark

View File

@@ -63,8 +63,9 @@ SVTAV1_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libSvtAv1Enc.so")"
RAV1E_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "librav1e.so")") RAV1E_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "librav1e.so")")
AOM_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libaom.so")") AOM_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libaom.so")")
VMAF_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libvmaf.so")") VMAF_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libvmaf.so")")
DAV1D_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libdav1d.so")")
cd "$BASE_DIR" || exit cd "$BASE_DIR" || exit
echo -e "$SVTAV1_VER $RAV1E_VER $AOM_VER $VMAF_VER" >> "$LOG" echo -e "$SVTAV1_VER $RAV1E_VER $AOM_VER $VMAF_VER $DAV1D_VER" >> "$LOG"
for input in "${INPUT[@]}" for input in "${INPUT[@]}"
do do

View File

@@ -6,6 +6,7 @@ RAV1E_DIR="$BASE_DIR/rav1e"
FFMPEG_DIR="$BASE_DIR/ffmpeg" FFMPEG_DIR="$BASE_DIR/ffmpeg"
AOM_DIR="$BASE_DIR/aom" AOM_DIR="$BASE_DIR/aom"
VMAF_DIR="$BASE_DIR/vmaf" VMAF_DIR="$BASE_DIR/vmaf"
DAV1D_DIR="$BASE_DIR/dav1d"
# clone # clone
git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git "$SVT_DIR" --depth 1 git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git "$SVT_DIR" --depth 1
@@ -13,16 +14,18 @@ git clone https://github.com/xiph/rav1e "$RAV1E_DIR" --depth 1
git clone https://git.ffmpeg.org/ffmpeg.git "$FFMPEG_DIR" --depth 1 git clone https://git.ffmpeg.org/ffmpeg.git "$FFMPEG_DIR" --depth 1
git clone https://aomedia.googlesource.com/aom "$AOM_DIR" --depth 1 git clone https://aomedia.googlesource.com/aom "$AOM_DIR" --depth 1
git clone https://github.com/Netflix/vmaf "$VMAF_DIR" --depth 1 git clone https://github.com/Netflix/vmaf "$VMAF_DIR" --depth 1
git clone https://code.videolan.org/videolan/dav1d.git "$DAV1D_DIR" --depth 1
# build svt-av1 # build svt-av1
cd "$SVT_DIR/" || exit cd "$SVT_DIR/" || exit
git pull git pull
rm -rf build
mkdir build mkdir build
cd build || exit cd build || exit
make clean make clean
cmake .. -DCMAKE_BUILD_TYPE=Release -DSVT_AV1_LTO=ON -DNATIVE=ON cmake .. -DCMAKE_BUILD_TYPE=Release -DSVT_AV1_LTO=ON -DNATIVE=ON || exit
make -j "$(nproc)" make -j "$(nproc)" || exit
sudo make install sudo make install || exit
# build rav1e # build rav1e
cd "$RAV1E_DIR/" || exit cd "$RAV1E_DIR/" || exit
@@ -33,20 +36,19 @@ cargo clean
RUSTFLAGS="-C target-cpu=native" cargo cinstall --release \ RUSTFLAGS="-C target-cpu=native" cargo cinstall --release \
--prefix="$(pwd)"/ffmpeg_build \ --prefix="$(pwd)"/ffmpeg_build \
--libdir="$(pwd)"/ffmpeg_build/lib \ --libdir="$(pwd)"/ffmpeg_build/lib \
--includedir="$(pwd)"/ffmpeg_build/include --includedir="$(pwd)"/ffmpeg_build/include || exit
cd ffmpeg_build || exit cd ffmpeg_build || exit
sudo cp ./lib/* /usr/local/lib/ -r sudo cp ./lib/* /usr/local/lib/ -r || exit
sudo cp ./include/* /usr/local/include/ -r sudo cp ./include/* /usr/local/include/ -r || exit
# build aom # build aom
cd "$AOM_DIR/" || exit cd "$AOM_DIR/" || exit
git pull git pull
mkdir build mkdir build
cd build || exit cd build || exit
make clean cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON || exit
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON make -j "$(nproc)" || exit
make -j "$(nproc)" sudo make install || exit
sudo make install
# build libvmaf # build libvmaf
cd "$VMAF_DIR/libvmaf" || exit cd "$VMAF_DIR/libvmaf" || exit
@@ -54,9 +56,19 @@ git pull
python3 -m virtualenv .venv python3 -m virtualenv .venv
source .venv/bin/activate source .venv/bin/activate
pip install meson pip install meson
meson setup build --buildtype release -Denable_float=true meson setup build --buildtype release -Denable_float=true || exit
ninja -vC build ninja -vC build || exit
sudo ninja -vC build install sudo ninja -vC build install || exit
# build dav1d
cd "$DAV1D_DIR" || exit
git pull
rm -rf build
mkdir build
cd build || exit
meson setup ../ build --buildtype release || exit
ninja -vC build || exit
sudo ninja -vC build install || exit
# ldconfig for shared libs # ldconfig for shared libs
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/ffmpeg.conf echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/ffmpeg.conf
@@ -68,9 +80,9 @@ git pull
export PKG_CONFIG_PATH+=":/usr/local/lib/pkgconfig" export PKG_CONFIG_PATH+=":/usr/local/lib/pkgconfig"
make clean make clean
./configure --enable-libsvtav1 --enable-librav1e \ ./configure --enable-libsvtav1 --enable-librav1e \
--enable-libaom --enable-libvmaf || exit --enable-libaom --enable-libvmaf --enable-libdav1d || exit
make -j "$(nproc)" make -j "$(nproc)" || exit
sudo make install sudo make install || exit
# validate encoders # validate encoders
hash -r hash -r