Skip to content

Instantly share code, notes, and snippets.

@Krisseck
Last active June 3, 2025 12:12
Show Gist options
  • Save Krisseck/43b01a8235c7b4ab694e959002bc5e69 to your computer and use it in GitHub Desktop.
Save Krisseck/43b01a8235c7b4ab694e959002bc5e69 to your computer and use it in GitHub Desktop.
QTGMC Vapoursynth Docker config

Dockerfile configuration to run QTGMC with Vapoursynth. Based on odrling's vapoursynth container. Includes optimized and slightly opinionated settings.

To use:

  • Copy Dockerfile to local directory
  • Build with docker build -t qtgmc:latest ./
  • Run like you would normally run vspipe, for example:
docker run -it -v /local/dir:/app qtgmc:latest /bin/bash -c 'VS_NUM_THREADS=8 VS_SOURCE=/app/input.mkv QTGMC_SHARPNESS=1 vspipe --y4m /root/qtgmc.vpy - | ffmpeg -i - -c:v libx264 /app/output.mkv'

Make sure you set TFF correctly via QTGMC_TFF !

FROM odrling/vapoursynth:sh
RUN git clone --recursive --depth=1 https://github.com/sekrit-twc/znedi3 /root/znedi3 && cd /root/znedi3 && make X86=1 && cp nnedi3_weights.bin vsznedi3.so /usr/lib64/vapoursynth/ && cd /root/ && rm -rf /root/znedi3
RUN wget https://gist.githubusercontent.com/Krisseck/43b01a8235c7b4ab694e959002bc5e69/raw/42b88619c197c255240d72c447f33750383fe14b/qtgmc.vpy -O /root/qtgmc.vpy && chmod a+rx /root/qtgmc.vpy
CMD ["/bin/bash"]
#!/usr/bin/env python3
# Based on https://aur.archlinux.org/cgit/aur.git/tree/qtgmc.vpy?h=qtgmc
import os
import sys
from vapoursynth import core
import havsfunc
# VapourSynth Settings
core.num_threads = int(os.getenv("VS_NUM_THREADS", "4"))
video = core.ffms2.Source(os.getenv("VS_SOURCE"))
video = havsfunc.QTGMC(Input=video,
InputType=float(os.getenv("QTGMC_INPUTTYPE", "0")),
TFF=os.getenv("QTGMC_TFF", "True")=="True",
Preset=os.getenv("QTGMC_PRESET", "very slow"),
Sharpness=float(os.getenv("QTGMC_SHARPNESS", "0")),
SourceMatch=3,
TR2=2,
Lossless=2,
MatchEnhance=0.75,
NoiseProcess=1,
NoiseRestore=0.7,
Sigma=1.5)
video.set_output()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment