Fix bug and convert to unix format

This commit is contained in:
MartinEesmaa
2023-04-04 20:17:38 +10:00
parent 489d558bce
commit 85e4894ded

View File

@ -1,96 +1,97 @@
#!/bin/bash #!/bin/bash
echo Building FFmpeg VVCEasy Linux version... PREFIX=/usr/local
sudo apt update && sudo apt upgrade -y && \ echo Building FFmpeg VVCEasy Linux version...
sudo apt install build-essential cmake nasm autoconf pkg-config \ sudo apt update && sudo apt upgrade -y && \
python3-setuptools ninja-build python3-pip libtool git wget xxd -y && \ sudo apt install build-essential cmake nasm autoconf pkg-config \
sudo pip3 install meson python3-setuptools ninja-build python3-pip libtool git wget xxd -y && \
sudo pip3 install meson
if [ ! -d FFmpeg-FixVVC ]; then
git clone --depth=1 https://github.com/MartinEesmaa/FFmpeg-VVC if [ ! -d FFmpeg-FixVVC ]; then
else git clone --depth=1 https://github.com/MartinEesmaa/FFmpeg-VVC
git -C FFmpeg-VVC pull else
fi git -C FFmpeg-VVC pull
fi
if [ ! -d vvenc ]; then
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc if [ ! -d vvenc ]; then
else git clone --depth=1 https://github.com/fraunhoferhhi/vvenc
git -C vvenc pull else
fi git -C vvenc pull
fi
if [ ! -d vvdec ]; then
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec if [ ! -d vvdec ]; then
else git clone --depth=1 https://github.com/fraunhoferhhi/vvdec
git -C vvdec pull else
fi git -C vvdec pull
fi
if [ ! -d fdk-aac ]; then
git clone --depth=1 https://github.com/mstorsjo/fdk-aac if [ ! -d fdk-aac ]; then
else git clone --depth=1 https://github.com/mstorsjo/fdk-aac
git -C fdk-aac pull else
fi git -C fdk-aac pull
fi
if [ ! -d SDL ]; then
git clone --depth=1 https://github.com/libsdl-org/SDL if [ ! -d SDL ]; then
else git clone --depth=1 https://github.com/libsdl-org/SDL
git -C SDL pull else
fi git -C SDL pull
fi
if [ ! -d libxml2 ]; then
git clone --depth=1 https://github.com/gnome/libxml2 if [ ! -d libxml2 ]; then
else git clone --depth=1 https://github.com/gnome/libxml2
git -C libxml2 pull else
fi git -C libxml2 pull
fi
if [ ! -d opus ]; then
git clone --depth=1 https://github.com/xiph/opus if [ ! -d opus ]; then
else git clone --depth=1 https://github.com/xiph/opus
git -C opus pull else
fi git -C opus pull
fi
if [ ! -d libjxl ]; then
git clone --depth=1 https://github.com/libjxl/libjxl if [ ! -d libjxl ]; then
sed -i 's/-lm/-lm -lstdc++/g' libjxl/lib/jxl/libjxl.pc.in libjxl/lib/threads/libjxl_threads.pc.in git clone --depth=1 https://github.com/libjxl/libjxl
git -C libjxl submodule update --init --recursive --depth 1 --recommend-shallow sed -i 's/-lm/-lm -lstdc++/g' libjxl/lib/jxl/libjxl.pc.in libjxl/lib/threads/libjxl_threads.pc.in
else git -C libjxl submodule update --init --recursive --depth 1 --recommend-shallow
git -C libjxl pull else
git -C libjxl submodule update --init --recursive --depth 1 --recommend-shallow git -C libjxl pull
fi git -C libjxl submodule update --init --recursive --depth 1 --recommend-shallow
fi
if [ ! -d dav1d ]; then
git clone --depth=1 https://code.videolan.org/videolan/dav1d if [ ! -d dav1d ]; then
else git clone --depth=1 https://code.videolan.org/videolan/dav1d
git -C dav1d pull else
fi git -C dav1d pull
fi
if [ ! -d vmaf ]; then
git clone --depth=1 https://github.com/netflix/vmaf if [ ! -d vmaf ]; then
else git clone --depth=1 https://github.com/netflix/vmaf
git -C vmaf pull else
fi git -C vmaf pull
fi
cd vvenc && sudo make install-release install-prefix=$PREFIX disable-lto=1 && \
cd .. && \ cd vvenc && sudo make install-release install-prefix=$PREFIX disable-lto=1 && \
cd vvdec && sudo make install-release install-prefix=$PREFIX disable-lto=1 && \ cd .. && \
cd .. && \ cd vvdec && sudo make install-release install-prefix=$PREFIX disable-lto=1 && \
cd fdk-aac && autoreconf -if && ./configure --prefix=$PREFIX --enable-static --disable-shared && sudo make install -j $nproc && \ cd .. && \
cd .. && \ cd fdk-aac && autoreconf -if && ./configure --prefix=$PREFIX --enable-static --disable-shared && sudo make install -j $nproc && \
cd libxml2 && autoreconf -if && ./configure --prefix=$PREFIX --enable-static --disable-shared && sudo make install -j $nproc && \ cd .. && \
cd .. && \ cd libxml2 && autoreconf -if && ./configure --prefix=$PREFIX --enable-static --disable-shared && sudo make install -j $nproc && \
cd opus && autoreconf -if && CFLAGS="-O2 -D_FORTIFY_SOURCE=0" LDFLAGS="-flto -s" ./configure --prefix=$PREFIX --enable-static --disable-shared && sudo make install -j $nproc && \ cd .. && \
cd .. && \ cd opus && autoreconf -if && CFLAGS="-O2 -D_FORTIFY_SOURCE=0" LDFLAGS="-flto -s" ./configure --prefix=$PREFIX --enable-static --disable-shared && sudo make install -j $nproc && \
mkdir libjxl/build && cd libjxl/build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_GTEST=ON -DCMAKE_INSTALL_PREFIX=$PREFIX .. -G Ninja && sudo ninja install -j $nproc && \ cd .. && \
cd ../../ && \ mkdir libjxl/build && cd libjxl/build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_GTEST=ON -DCMAKE_INSTALL_PREFIX=$PREFIX .. -G Ninja && sudo ninja install && \
mkdir vmaf/libvmaf/build && cd vmaf/libvmaf/build && CFLAGS="-msse2 -mfpmath=sse -mstackrealign" meson -Denable_docs=false -Ddefault_library=static -Denable_float=true -Dbuilt_in_models=true -Dprefix=$PREFIX .. && sudo ninja install -j $nproc && \ cd ../../ && \
cd ../../../ && \ mkdir vmaf/libvmaf/build && cd vmaf/libvmaf/build && CFLAGS="-msse2 -mfpmath=sse -mstackrealign" meson -Denable_docs=false -Ddefault_library=static -Denable_float=true -Dbuilt_in_models=true -Dprefix=$PREFIX .. && sudo ninja install && \
sudo sed -i 's/-lm/-lm -lstdc++/g' $PREFIX/lib/pkgconfig/libvmaf.pc && \ cd ../../../ && \
cd SDL && mkdir build && cd build && cmake -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. && sudo make install -j $nproc && \ sudo sed -i 's/-lm/-lm -lstdc++/g' $PREFIX/lib/x86_64-linux-gnu/pkgconfig/libvmaf.pc && \
cd ../../ && \ cd SDL && mkdir build && cd build && cmake -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. && sudo make install -j $nproc && \
mkdir dav1d/build && cd dav1d/build && meson -Denable_docs=false -Ddefault_library=static -Dprefix=$PREFIX .. && sudo ninja install -j $nproc && \ cd ../../ && \
cd ../../ && \ mkdir dav1d/build && cd dav1d/build && meson -Denable_docs=false -Ddefault_library=static -Dprefix=$PREFIX .. && sudo ninja install && \
cd FFmpeg-VVC && \ cd ../../ && \
./configure --enable-static --pkg-config-flags="--static" --extra-ldexeflags="-static" \ cd FFmpeg-VVC && \
--enable-libfdk-aac --enable-libvvenc --enable-libvvdec --enable-pic \ ./configure --enable-static --pkg-config-flags="--static" --extra-ldexeflags="-static" \
--enable-libxml2 --enable-libopus --enable-libdav1d --enable-libjxl --enable-libvmaf --enable-sdl2 && \ --enable-libfdk-aac --enable-libvvenc --enable-libvvdec --enable-pic \
make -j --enable-libxml2 --enable-libopus --enable-libdav1d --enable-libjxl --enable-libvmaf --enable-sdl2 && \
echo You're ready to preview VVC, view VVC information or convert from VVC using ffmpeg, ffplay and ffprobe. make -j
echo - Martin Eesmaa echo You are ready to preview VVC, view VVC information or convert from VVC using ffmpeg, ffplay and ffprobe.
echo - Martin Eesmaa