Last active
September 23, 2025 14:06
-
-
Save symbioquine/7a58b6e72e5d73499403f07dc662a811 to your computer and use it in GitHub Desktop.
Running getnative patched
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM archlinux:base-devel | |
| # Install dependencies from main repos | |
| RUN pacman --noconfirm -Syu | |
| RUN pacman --noconfirm -S git zimg libiconv libass ffmpeg imagemagick cython ffms2 python-pip | |
| RUN cd / && git clone https://github.com/vapoursynth/vapoursynth.git | |
| WORKDIR /vapoursynth | |
| RUN git checkout R64 && ./autogen.sh && ./configure && make && make install | |
| # Create and switch to a non-root user for the installation of our AUR helper | |
| ENV USERNAME=getnative | |
| ENV USERHOME=/home/${USERNAME} | |
| RUN useradd --no-log-init -mG wheel ${USERNAME} \ | |
| # Allow this user to sudo | |
| && echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | |
| USER ${USERNAME} | |
| WORKDIR ${USERHOME} | |
| # Install AUR helper | |
| RUN git clone https://aur.archlinux.org/aura-bin.git \ | |
| && cd aura-bin \ | |
| && makepkg --noconfirm -s \ | |
| && ls -lah \ | |
| && sudo pacman --noconfirm -U aura-bin-4*-x86_64.pkg.tar.zst | |
| # Switch back to root since everything after can happen as root | |
| USER root | |
| # Install the AUR vapoursynth plugins | |
| RUN aura --noconfirm -Ax vapoursynth-plugin-imwri-git vapoursynth-plugin-descale-git | |
| # Clone the getnative repository and use the result as our working directory from here on out | |
| RUN cd / && git clone https://github.com/Infiziert90/getnative.git | |
| WORKDIR /getnative | |
| # Create a venv and install the python deps | |
| RUN python -m venv /getnative/venv | |
| RUN /getnative/venv/bin/pip install VapourSynth==64 | |
| RUN /getnative/venv/bin/pip install build wheel installer setuptools matplotlib | |
| # Install getnative into our venv | |
| RUN /getnative/venv/bin/python -m build --wheel --no-isolation && /getnative/venv/bin/python -m installer --destdir="${pkgdir}" dist/*.whl | |
| # Patch getnative to work with vapoursynth R64 | |
| RUN sed -i 's/vapoursynth.RGB/vapoursynth.ColorFamily.RGB/' /getnative/getnative/app.py \ | |
| && sed -i 's/vapoursynth.GRAY/vapoursynth.ColorFamily.GRAY/' /getnative/getnative/app.py \ | |
| && sed -i 's/vapoursynth.YUV444PS/vapoursynth.PresetVideoFormat.YUV444PS/' /getnative/getnative/app.py | |
| # Create an output directory in case one is not mounted there as a volume | |
| RUN mkdir /output | |
| ENTRYPOINT ["/getnative/venv/bin/python", "-m", "getnative"] | |
| # docker build -t getnative-latest . | |
| # docker run -v "/path/to/example/input.mp4":/input.mp4 -v $(pwd)/getnativeoutput0:/output -it getnative-latest -k bicubic -b 0.33 -c 0.33 -dir /output /input.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment