2022-12-07 23:37:06 +11:00
|
|
|
#!/bin/bash
|
2022-12-07 23:47:45 +11:00
|
|
|
echo Building FFmpeg VVCEasy Linux version...
|
2022-12-07 23:37:06 +11:00
|
|
|
sudo apt update && sudo apt upgrade -y && \
|
|
|
|
sudo apt install build-essential cmake nasm autoconf pkg-config \
|
|
|
|
python3-setuptools ninja-build python3-pip libtool git wget -y && \
|
|
|
|
sudo pip3 install meson && \
|
|
|
|
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc && \
|
|
|
|
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec && \
|
|
|
|
git clone --depth=1 https://github.com/mstorsjo/fdk-aac && \
|
|
|
|
git clone --depth=1 https://github.com/libsdl-org/SDL && \
|
|
|
|
git clone --depth=1 https://github.com/gnome/libxml2 && \
|
|
|
|
git clone --depth=1 https://github.com/xiph/opus && \
|
|
|
|
git clone --depth=1 https://code.videolan.org/videolan/dav1d && \
|
|
|
|
git clone --depth=1 https://github.com/MartinEesmaa/FFmpeg-FixVVC && \
|
2022-12-23 22:07:49 +11:00
|
|
|
git clone --depth=1 https://github.com/xiph/speex && \
|
|
|
|
git clone --depth=1 https://github.com/drowe67/codec2 && \
|
2022-12-07 23:37:06 +11:00
|
|
|
cd vvenc && sudo make install-release install-prefix=/usr/local disable-lto=1 && \
|
|
|
|
cd .. && \
|
|
|
|
cd vvdec && sudo make install-release install-prefix=/usr/local disable-lto=1 && \
|
|
|
|
cd .. && \
|
|
|
|
cd fdk-aac && autoreconf -if && ./configure --prefix=/usr/local --enable-static --disable-shared && sudo make install -j $nproc && \
|
|
|
|
cd .. && \
|
|
|
|
cd libxml2 && autoreconf -if && ./configure --prefix=/usr/local --enable-static --disable-shared && sudo make install -j $nproc && \
|
|
|
|
cd .. && \
|
2022-12-23 22:07:49 +11:00
|
|
|
cd opus && autoreconf -if && CFLAGS="-O2 -D_FORTIFY_SOURCE=0" LDFLAGS="-flto -s" ./configure --prefix=/usr/local --enable-static --disable-shared && sudo make install -j $nproc && \
|
2022-12-07 23:37:06 +11:00
|
|
|
cd .. && \
|
2022-12-23 22:07:49 +11:00
|
|
|
cd speex && autoreconf -if && ./configure --prefix=/usr/local --enable-static --disable-shared && sudo make install -j $nproc && \
|
|
|
|
cd .. && \
|
|
|
|
cd codec2
|
|
|
|
grep -ERl "\b(lsp|lpc)_to_(lpc|lsp)" --include="*.[ch]" | \
|
|
|
|
xargs -r sed -ri "s;((lsp|lpc)_to_(lpc|lsp));c2_\1;g"
|
|
|
|
mkdir build && cd build && cmake -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -D{UNITTEST,INSTALL_EXAMPLES}=off .. && sudo make install -j $nproc && \
|
|
|
|
cd ../../ && \
|
2022-12-07 23:37:06 +11:00
|
|
|
cd SDL && mkdir build && cd build && cmake -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. && sudo make install -j $nproc && \
|
|
|
|
cd ../../ && \
|
|
|
|
mkdir dav1d/build && cd dav1d/build && meson -Denable_docs=false -Ddefault_library=static -Dprefix=/usr/local .. && sudo ninja install && \
|
|
|
|
cd ../../ && \
|
|
|
|
cd FFmpeg-FixVVC && \
|
|
|
|
./configure --enable-static --pkg-config-flags="--static" --extra-ldexeflags="-static" \
|
|
|
|
--enable-libfdk-aac --enable-libvvenc --enable-libvvdec --enable-pic \
|
|
|
|
--enable-libxml2 --enable-libopus --enable-libdav1d --enable-sdl2 && \
|
|
|
|
make -j
|
|
|
|
echo You're ready to preview VVC, view VVC information or convert from VVC using ffmpeg, ffplay and ffprobe.
|
|
|
|
echo - Martin Eesmaa
|