A local, NVIDIA-first video upscaling and frame-interpolation application. The Go server provides a browser UI; a uv-managed Python runtime runs the AI and FFmpeg pipeline.
It is designed for one video job at a time: select a local source, choose a target scale/FPS, and write a new encoded file. Nothing is uploaded.
Contents
- What it does
- Requirements
- Getting started
- Using the app
- Configuration
- Support matrix
- Model selection
- Safe 4x operation
- Encoding and media tracks
- Changelog
- Credits
- Development checks
- License
- AI video upscaling with bundled/downloadable Safetensors and ONNX models.
- True 2x→4x processing: a native 2x model runs twice; the second pass is not a normal resize.
- RIFE v4.26 frame interpolation for an arbitrary higher target FPS, including fractional conversions such as 24→60.
- Bounded FFmpeg rawvideo decode → AI → encode streaming. It does not write a full PNG frame sequence.
- TensorRT acceleration for CUDA upscalers, with tiled fallback when a full-frame engine cannot compile.
- Local file browsing/search, runtime install/health checks, model downloads, live JPEG progress previews, output preview generation, and job cancellation.
- Container-aware FFmpeg encoding with optional audio/subtitle copying or transcoding.
For architecture, model routing, limits, and encoder behavior, see docs/TECHNICAL_GUIDE.md.
The supported inference runtime is NVIDIA CUDA on Linux:
- NVIDIA GPU and working driver (
nvidia-smi) - FFmpeg and FFprobe available on
PATH - Network access on first runtime/model installation
- Disk space for the uv Python environment, models, TensorRT cache, and output video
The app installs Python 3.12 (falls back to 3.11) and the project-pinned CUDA 13.2 PyTorch/TensorRT dependencies through uv. A CUDA-capable NVIDIA system is required for the shipped runtime; the Go web server itself is portable, but AMD, Intel, Apple Silicon, and CPU-only inference are not supported configurations.
Clone and build the Go binary, then start it:
git clone https://github.com/darksidewalker/TrueVideoEnhancer.git
cd TrueVideoEnhancer
go build -o dasiwa-true-video-enhancer ./cmd/dasiwa-true-video-enhancer
./dasiwa-true-video-enhancerOpen http://127.0.0.1:8612 in your browser. The first run installs the
Python runtime and models on demand — see Using the app
for the in-app steps, and Configuration for the
environment variables that control port, browser launch, and the TensorRT
upscaler cache.
The container is the supported route for Docker, Podman, and Windows through Docker Desktop's Linux/WSL2 GPU backend. Native Windows is not supported by the pinned CUDA 13.2 PyTorch/TensorRT packages.
Prerequisites: an NVIDIA driver with GPU container support, then either Docker
with NVIDIA Container Toolkit or Podman with NVIDIA CDI configured. Verify the
host first with nvidia-smi.
./scripts/run.shrun.sh detects the available engine, builds dasiwa/tve:latest when needed,
and opens the service at http://127.0.0.1:8612. It uses --gpus all for
Docker and --device nvidia.com/gpu=all for Podman. Set CONTAINER_ENGINE
to force one engine, TVE_BUILD=1 to rebuild, TVE_PORT=8620 to change the
host port, or TVE_GPU=0 for a CPU-only diagnostic start.
The launcher creates persistent host directories next to the repository:
models/ for downloaded model weights and the upscaler TensorRT cache,
cache/ for RIFE TensorRT engines and preview scratch files, and data/ for
media paths used inside the container. In the UI, browse or enter paths below
/app/data (for example /app/data/input.mp4).
For a CPU-only compose start, use docker compose up or podman compose up.
The compose file intentionally contains no GPU syntax; GPU flags differ by
engine and are applied by run.sh.
The app works one video at a time. On first use:
- Open Runtime and install or check the runtime. This downloads Python
3.12 and the pinned CUDA 13.2 PyTorch/TensorRT packages into the
portable
runtime/venv/. - Open Models and download any model your job needs. Built-in models are pre-listed; see Model selection.
- In the main form, pick a local input file, content type, scale, target FPS, and output path.
- Click Run. Progress, the current processed frame, and a live log appear in the job panel. Cancel any time.
The app reads local files directly — it never uploads video. After a job finishes, a 20-second 480px-wide MP4 proxy preview is generated for the browser.
All settings are environment variables read at startup; no config file.
| Variable | Default | Effect |
|---|---|---|
DASIWA_PORT | 8612 | Port the web UI listens on. |
DASIWA_NO_BROWSER | (unset) | Set to 1 to stop the automatic browser launch. |
RVE_UPSCALER_TRT_ENGINE_CACHE | 1 (on) | Gate for the persistent TensorRT upscaler engine cache. |
FORCE_COLOR | (unset) | Set to 1 to force colored job logs even when piped. |
When enabled (the default), compiled TensorRT upscaler engines are written
to models/.tensorrt-engine-cache/ next to the model file and reused on
the next job, turning a ~39-second compile into a ~16-second cache hit.
Cache entries are safe on torch_tensorrt 2.13.0+, which refits cached
engines by rebuilding the weight mapping from the graph.
Set it to a falsy value to fall back to a fresh engine compile per job:
RVE_UPSCALER_TRT_ENGINE_CACHE=0 ./dasiwa-true-video-enhancerAccepted falsy values: 0, false, no, off (case-insensitive).
Anything else — including unset — keeps the cache on.
The RIFE frame-interpolation and ONNX upscaler TensorRT caches are separate, always-on paths and are not affected by this variable.
| Capability | Status | Notes |
|---|---|---|
| NVIDIA CUDA inference | ✅ | PyTorch CUDA; TensorRT is preferred when available. |
| TensorRT Safetensors upscaling | ✅ | Static full-frame or tiled engine; smaller tiles are retried after compile failure. |
| ONNX Runtime / TensorRT upscaling | ✅ | Requires TensorRT Execution Provider to activate; silent CPU fallback is rejected. |
| Safetensors upscalers | ✅ | Loaded through Spandrel; model scale is detected from the descriptor. |
| ONNX upscalers | ✅ | Fixed-shape ONNX models run using their declared input shape. |
| 2x and 4x output | ✅ | A native 2x model selected for 4x runs two real AI passes. |
| Output up to 8K UHD | ✅ | Hard maximum is 33,177,600 output pixels (7680×4320). |
| Output above 8K UHD | ❌ | Rejected before worker start to protect host memory. |
| RIFE v4.26 general interpolation | ✅ | Runs only when target FPS is higher than source FPS. |
| RIFE Heavy / alternate interpolation models | ❌ | Not exposed by the current built-in model list. |
| Arbitrary higher target FPS | ✅ | Timestamp-driven scheduler supports non-integer ratios. |
| AI denoise / restoration-only pipeline | ❌ | No dedicated denoise stage is implemented. |
| HDR processing / tone mapping | ❌ | The UI flag is accepted but the backend has no HDR transform path. |
| Scene detection | ❌ | UI options exist, but no scene-detection branch is executed by the current backend. |
| Batch folder queue | ❌ | Jobs are submitted per input video; there is no folder/batch scheduler. |
| Local file browse and filename search | ✅ | The app reads local paths; it does not upload videos. |
| Job cancel and SSE progress events | ✅ | Cancels the worker context and streams job state/logs. |
| Live processed-frame preview | ✅ | Periodic JPEG preview while a job runs. |
| Post-job browser preview | ✅ | Generates a 20-second, 480px-wide MP4 proxy. |
| MP4, MKV, WebM, MOV, AVI, FLV, TS, M4V output | ✅ | FFmpeg/container compatibility still determines the actual codec. |
| WebM codec safety conversion | ✅ | Incompatible video/audio/subtitle choices are normalized to WebM-safe formats. |
| NVENC H.264 / HEVC / AV1 | ✅ | Used only when the installed FFmpeg and GPU support the encoder. |
| CPU x264/x265, SVT-AV1, VP9, ProRes, FFV1 | ✅ | Availability depends on the local FFmpeg build. |
| AMD / ROCm inference | ❌ | Not implemented. |
| Intel / oneAPI inference | ❌ | Not implemented. |
| Apple Silicon / MPS inference | ❌ | Not a supported shipped runtime. |
| CPU-only inference | ❌ | Not a supported configuration. |
Choose Auto for the normal path. The UI selects a built-in model by content type and requested model scale; a manual model selection overrides Auto.
| Content type | Built-in 2x choices | Built-in 4x choices |
|---|---|---|
| Anime | AnimeJaNai Compact; AnimeSharp variants | NomosUni SPAN; HFA2k LUDVAE; optional HAT-L Sharp |
| Mixed | AnimeJaNai Compact; NomosUni SPAN | NomosUni SPAN; UltraSharpV2-Lite |
| Realism | RealPLKSR Restoration; optional RealPLKSR GAN | ClearRealityV1; Nomos WebPhoto; optional HAT-L |
Models are scale-specific. Selecting a native 2x model at a 4x target invokes two AI passes. Selecting a native 4x model invokes one pass. Manual model selection can therefore change both output appearance and memory/throughput behavior.
4x is much more expensive than 2x: with a 2x model, pass two consumes the first pass's 2x-sized output. The pipeline protects the desktop by rejecting output above 8K UHD, estimating bounded host-memory needs before it starts, and automatically using 256-core tiles (then 128 if compilation fails) for automatic iterative 2x→4x jobs.
A 1080p source at 4x produces 7680×4320 and is within the limit. A 4K source at 4x produces 15360×8640 and is intentionally rejected. Use 2x or a smaller source in that case.
The default Auto video encoder checks the local FFmpeg build and chooses a container-compatible encoder. Audio and subtitles are copied unless you choose a transcode option. For WebM, incompatible H.264/H.265, AAC/MP3, and subtitle choices are converted before the expensive render begins.
Output codec support is a property of the installed FFmpeg and hardware, not a promise that every encoder is present on every machine.
See docs/CHANGELOG.md for the full release history. Recent notable changes:
- 2026-08-30 — Fixed the TensorRT upscaler engine-cache refit
corruption (issue #2) by upgrading the runtime to
torch_tensorrt2.13.0; the engine cache is now safe and ON by default, withRVE_UPSCALER_TRT_ENGINE_CACHE=0as the off-switch. - 2026-08-10 — Sequential job queue with a visible queue UI.
- 2026-07-17 — 4x host-memory guard, persistent TensorRT engine cache, bundled AnimeJaNai Compact base upscaler.
- 2026-07-12 — Bounded FFmpeg rawvideo streaming replaces serial PNG frame sequences.
- AnimeJaNai HD V3 Compact 2x — the bundled
2x-AnimeJaNai_HD_V3_Compact.safetensorsmodel is credited to the AnimeJaNai project. It remains subject to its upstream license and terms. - Real-Video-Enhancer by TNTwise — a valuable reference project for video-enhancement workflows and model integration. DaSiWa True Video Enhancer is an independent implementation and is not affiliated with or endorsed by Real-Video-Enhancer.
runtime/venv/bin/python -m pytest backend/tests -q
go test ./...
go build ./cmd/dasiwa-true-video-enhancerThe backend source changed between jobs is picked up by the next spawned Python worker. Rebuild the Go binary when Go code or embedded web assets change.
DaSiWa True Video Enhancer is free software licensed under the
GNU General Public License v3.0. The bundled
2x-AnimeJaNai_HD_V3_Compact.safetensors model and any model you download
remain under their own upstream licenses — see Credits.
