Initial commit
This commit is contained in:
commit
260758de55
182
Dockerfile
Normal file
182
Dockerfile
Normal file
|
@ -0,0 +1,182 @@
|
|||
FROM debian:bullseye
|
||||
|
||||
ARG ZIMG_TAG=release-3.0.3
|
||||
|
||||
ARG VS_TAG=R54
|
||||
|
||||
ARG X264_TAG=stable
|
||||
ARG X264_REPO=https://code.videolan.org/videolan/x264.git
|
||||
|
||||
ARG X265_TAG=3.5
|
||||
ARG X265_REPO=https://bitbucket.org/multicoreware/x265_git.git
|
||||
|
||||
ARG AOM_TAG=v3.2.0
|
||||
ARG AOM_REPO=https://aomedia.googlesource.com/aom.git
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
python3-pip python3-numpy python3-opencv python3-dev git nscd \
|
||||
autoconf automake libtool pkg-config meson cmake yasm nasm gcc g++ clang ccache curl \
|
||||
libnuma-dev libavcodec-dev libavformat-dev libswscale-dev libavresample-dev libavutil-dev libass-dev libfftw3-3 libfftw3-dev && \
|
||||
pip3 install Cython && \
|
||||
pip3 install git+https://github.com/FichteFoll/Sushi.git@master
|
||||
|
||||
|
||||
COPY docker/x265-multilib.sh /x265-multilib.sh
|
||||
RUN git clone --branch "${X265_TAG}" --depth 1 "${X265_REPO}" /src/x265 && cd /src/x265 && \
|
||||
cd build/linux && \
|
||||
MAKEFLAGS=-j$(nproc) /x265-multilib.sh && \
|
||||
cp 8bit/x265 /usr/bin/x265 && \
|
||||
cd / && rm -r /src/x265 /x265-multilib.sh
|
||||
|
||||
|
||||
RUN git clone --branch "master" --depth 1 https://github.com/l-smash/l-smash /src/l-smash && cd /src/l-smash && \
|
||||
CFLAGS="-fPIC" ./configure --enable-shared --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -r /src/l-smash
|
||||
|
||||
RUN git clone --branch "${X264_TAG}" --depth 1 "${X264_REPO}" /src/x264 && cd /src/x264 && \
|
||||
./configure --enable-shared --enable-static --bit-depth=all --chroma-format=all --enable-lto --enable-pic --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -r /src/x264
|
||||
|
||||
RUN git clone --branch "${AOM_TAG}" --depth 1 "${AOM_REPO}" /src/aom && cd /src/aom && \
|
||||
sed -i 's/MAX_NUM_THREADS 64/MAX_NUM_THREADS 128/' aom_util/aom_thread.h && \
|
||||
mkdir b && cd b && \
|
||||
cmake .. -DENABLE_CCACHE=ON -DCMAKE_BUILD_TYPE=Release -DCONFIG_AV1_ENCODER=1 -DENABLE_DOCS=OFF -DENABLE_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -D CMAKE_INSTALL_PREFIX:PATH=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -r /src/aom
|
||||
|
||||
RUN git clone --branch "${ZIMG_TAG}" --depth 1 https://github.com/sekrit-twc/zimg.git /src/zimg && cd /src/zimg && \
|
||||
./autogen.sh && \
|
||||
./configure --enable-example --enable-simd --enable-shared --enable-static --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -r /src/zimg
|
||||
|
||||
RUN curl "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-$(dpkg --print-architecture)-static.tar.xz" > /src/ffmpeg.tar.xz && \
|
||||
cd /src && tar -xJf /src/ffmpeg.tar.xz && cd ffmpeg-* && \
|
||||
cp -r model /usr/local/share/ && \
|
||||
cp ./ffprobe /usr/bin/ && \
|
||||
cp ./ffmpeg /usr/bin/ && \
|
||||
cp ./qt-faststart /usr/bin/ && \
|
||||
cd / && rm -r /src/ffmpeg*
|
||||
|
||||
RUN git clone --branch "7.1.0-16" --depth 1 https://github.com/ImageMagick/ImageMagick /src/imagemagick && cd /src/imagemagick && \
|
||||
./configure --with-magick-plus-plus --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -r /src/imagemagick
|
||||
|
||||
RUN git clone --branch "${VS_TAG}" --depth 1 https://github.com/vapoursynth/vapoursynth /src/vapoursynth && cd /src/vapoursynth && \
|
||||
./autogen.sh && \
|
||||
mkdir /usr/lib/vapoursynth && \
|
||||
./configure --enable-plugins --disable-ocr --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -r /src/vapoursynth
|
||||
|
||||
ENV PYTHONPATH="/usr/lib/python3.9/site-packages:/usr/lib/vapoursynth:$PYTHONPATH"
|
||||
|
||||
RUN curl https://raw.githubusercontent.com/dubhater/vapoursynth-fieldhint/v3/src/fieldhint.c | gcc -x c -I /usr/include/vapoursynth \
|
||||
-shared -o /usr/lib/vapoursynth/fieldhint.so \
|
||||
-O3 -fPIC \
|
||||
-
|
||||
|
||||
|
||||
|
||||
RUN git clone --branch "master" --depth 1 https://github.com/VFR-maniac/L-SMASH-Works.git /src/L-SMASH-Works && cd /src/L-SMASH-Works && \
|
||||
cd VapourSynth && \
|
||||
./configure --vs-plugindir=/usr/lib/vapoursynth --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -r /src/L-SMASH-Works
|
||||
|
||||
RUN git clone --branch "v1.2" --depth 1 https://github.com/dwbuiten/d2vsource.git /src/d2vsource && cd /src/d2vsource && \
|
||||
./autogen.sh && \
|
||||
./configure --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
cp .libs/libd2vsource.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/d2vsource
|
||||
|
||||
RUN git clone --branch "r10.1" --depth 1 https://github.com/HomeOfVapourSynthEvolution/VapourSynth-TDeintMod.git /src/VapourSynth-TDeintMod && cd /src/VapourSynth-TDeintMod && \
|
||||
./autogen.sh && \
|
||||
./configure && \
|
||||
make -j$(nproc) && \
|
||||
cp .libs/libtdeintmod.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/VapourSynth-TDeintMod
|
||||
|
||||
RUN git clone --branch "r28" --depth 1 https://github.com/EleonoreMizo/fmtconv.git /src/fmtconv && cd /src/fmtconv && \
|
||||
cd build/unix && \
|
||||
./autogen.sh && \
|
||||
./configure --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
cp .libs/libfmtconv.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/fmtconv
|
||||
|
||||
RUN git clone --branch "v23" --depth 1 https://github.com/dubhater/vapoursynth-mvtools /src/vapoursynth-mvtools && cd /src/vapoursynth-mvtools && \
|
||||
./autogen.sh && \
|
||||
./configure --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
cp .libs/libmvtools.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/vapoursynth-mvtools
|
||||
|
||||
RUN git clone --branch "master" https://github.com/myrsloik/VapourSynth-FFT3DFilter /src/VapourSynth-FFT3DFilter && cd /src/VapourSynth-FFT3DFilter && git reset --hard 64323f0fdee4dd4fe429ee6287906dbae8e7571c && \
|
||||
mkdir b && cd b && \
|
||||
meson .. && \
|
||||
ninja && \
|
||||
cp libfft3dfilter.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/VapourSynth-FFT3DFilter
|
||||
|
||||
RUN git clone --branch "r2.1" --depth 1 --recursive https://github.com/sekrit-twc/znedi3 /src/znedi3 && cd /src/znedi3 && \
|
||||
make X86=1 -j$(nproc) && \
|
||||
cp vsznedi3.so /usr/lib/vapoursynth/ && \
|
||||
cp nnedi3_weights.bin /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/znedi3
|
||||
|
||||
RUN git clone --branch "r7" --depth 1 https://github.com/Irrational-Encoding-Wizardry/descale /src/descale && cd /src/descale && \
|
||||
mkdir b && cd b && \
|
||||
meson .. && \
|
||||
ninja && \
|
||||
cp libdescale.so /usr/lib/vapoursynth/ && \
|
||||
cp ../descale.py /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/descale
|
||||
|
||||
RUN git clone --branch "master" --depth 1 --recursive https://github.com/SAPikachu/flash3kyuu_deband.git /src/flash3kyuu_deband && cd /src/flash3kyuu_deband && \
|
||||
sed -i 's/env python/env python3/' ./waf && \
|
||||
./waf configure && \
|
||||
./waf build && \
|
||||
cp build/libf3kdb.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/flash3kyuu_deband
|
||||
|
||||
RUN git clone --branch "r9" --depth 1 https://github.com/HomeOfVapourSynthEvolution/VapourSynth-BM3D.git /src/VapourSynth-BM3D && cd /src/VapourSynth-BM3D && \
|
||||
mkdir b && cd b && \
|
||||
LDFLAGS=-lfftw3f_threads meson .. && \
|
||||
ninja && \
|
||||
cp libbm3d.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/VapourSynth-BM3D
|
||||
|
||||
RUN git clone --branch "r7" --depth 1 https://github.com/HomeOfVapourSynthEvolution/VapourSynth-DFTTest.git /src/VapourSynth-DFTTest && cd /src/VapourSynth-DFTTest && \
|
||||
mkdir b && cd b && \
|
||||
LDFLAGS=-lfftw3f_threads meson .. && \
|
||||
ninja && \
|
||||
cp libdfttest.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/VapourSynth-DFTTest
|
||||
|
||||
RUN git clone --branch "r10.1" --depth 1 https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Yadifmod /src/VapourSynth-Yadifmod && cd /src/VapourSynth-Yadifmod && \
|
||||
./autogen.sh && \
|
||||
./configure --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
cp .libs/libyadifmod.so /usr/lib/vapoursynth/ && \
|
||||
cd / && rm -r /src/VapourSynth-Yadifmod
|
||||
|
||||
RUN curl https://raw.githubusercontent.com/HomeOfVapourSynthEvolution/havsfunc/3b6a80ce502e6775c70df6bb2d19124de149073f/havsfunc.py > /usr/lib/vapoursynth/havsfunc.py && \
|
||||
curl https://raw.githubusercontent.com/HomeOfVapourSynthEvolution/mvsfunc/90e185220901402b974d7364345e0f25e71ab8fe/mvsfunc.py > /usr/lib/vapoursynth/mvsfunc.py && \
|
||||
curl https://raw.githubusercontent.com/Irrational-Encoding-Wizardry/fvsfunc/29ced90a3f620844dea0efa8666542298f68f421/fvsfunc.py > /usr/lib/vapoursynth/fvsfunc.py && \
|
||||
curl https://raw.githubusercontent.com/WolframRhodium/muvsfunc/6158bf2af1cb85fd9ba44024c52ef3666a2834c1/muvsfunc.py > /usr/lib/vapoursynth/muvsfunc.py
|
||||
|
||||
|
||||
RUN sed -i 's/core.nnedi3/core.znedi3/' /usr/lib/vapoursynth/fvsfunc.py
|
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 WeebDataHoarder
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
43
docker/x265-multilib.sh
Executable file
43
docker/x265-multilib.sh
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir -p 8bit 10bit 12bit
|
||||
|
||||
cd 12bit
|
||||
cmake ../../../source -DSTATIC_LINK_CRT=ON -DNATIVE_BUILD=ON -DENABLE_HDR10_PLUS=ON -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
|
||||
make ${MAKEFLAGS}
|
||||
|
||||
cd ../10bit
|
||||
cmake ../../../source -DSTATIC_LINK_CRT=ON -DNATIVE_BUILD=ON -DENABLE_HDR10_PLUS=ON -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
|
||||
make ${MAKEFLAGS}
|
||||
|
||||
cd ../8bit
|
||||
ln -sf ../10bit/libx265.a libx265_main10.a
|
||||
ln -sf ../12bit/libx265.a libx265_main12.a
|
||||
cmake ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DSTATIC_LINK_CRT=ON -DNATIVE_BUILD=ON -DENABLE_HDR10_PLUS=ON -DENABLE_SHARED=OFF -DLINKED_10BIT=ON -DLINKED_12BIT=ON
|
||||
make ${MAKEFLAGS}
|
||||
|
||||
# rename the 8bit library, then combine all three into libx265.a
|
||||
mv libx265.a libx265_main.a
|
||||
|
||||
uname=`uname`
|
||||
if [ "$uname" = "Linux" ]
|
||||
then
|
||||
|
||||
# On Linux, we use GNU ar to combine the static libraries together
|
||||
ar -M <<EOF
|
||||
CREATE libx265.a
|
||||
ADDLIB libx265_main.a
|
||||
ADDLIB libx265_main10.a
|
||||
ADDLIB libx265_main12.a
|
||||
SAVE
|
||||
END
|
||||
EOF
|
||||
|
||||
else
|
||||
|
||||
# Mac/BSD libtool
|
||||
libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2>/dev/null
|
||||
|
||||
fi
|
||||
|
||||
make ${MAKEFLAGS}
|
Loading…
Reference in a new issue