functioning builder

This commit is contained in:
2024-01-10 17:21:01 -06:00
parent 6a1c875e70
commit e49c6367be
3 changed files with 54 additions and 0 deletions

40
scripts/build.sh Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
BASE_DIR=$(pwd)
SVT_DIR="$BASE_DIR/svt"
RAV1E_DIR="$BASE_DIR/rav1e"
FFMPEG_DIR="$BASE_DIR/ffmpeg"
# clone
git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git "$SVT_DIR"
git clone https://github.com/xiph/rav1e "$RAV1E_DIR"
git clone https://git.ffmpeg.org/ffmpeg.git "$FFMPEG_DIR"
# build svt-av1
cd "$SVT_DIR/" || exit
git pull
# rm -rf build && mkdir build && cd build || exit
# cmake .. -DCMAKE_BUILD_TYPE=Release -DSVT_AV1_LTO=ON -DNATIVE=ON
# make -j "$(nproc)"
# sudo make install
# build rav1e
cd "$RAV1E_DIR/" || exit
git pull
rm -rf ffmpeg_build && mkdir ffmpeg_build || exit
RUSTFLAGS="-C target-cpu=native" cargo cinstall --release \
--prefix="$(pwd)"/ffmpeg_build \
--libdir="$(pwd)"/ffmpeg_build/lib \
--includedir="$(pwd)"/ffmpeg_build/include
cd ffmpeg_build || exit
sudo cp ./lib/* /usr/local/lib/ -r
sudo cp ./include/* /usr/local/include/ -r
# build ffmpeg
cd "$FFMPEG_DIR/" || exit
export LD_LIBRARY_PATH+=":/usr/local/lib"
export PKG_CONFIG_PATH+=":/usr/local/lib/pkgconfig"
./configure --enable-libsvtav1 --enable-librav1e
make -j "$(nproc)"
sudo make install

11
scripts/install_deps.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
sudo apt-get update
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 -y
curl https://sh.rustup.rs -sSf | sh -s -- -y
cargo install cargo-c