Skip to content

Native Wayland/X11 playback and NCNN/Vulkan upscaling - #8

Open
sirok1 wants to merge 8 commits into
Menely:mainfrom
sirok1:main
Open

sirok1 wants to merge 8 commits into
Menely:mainfrom
sirok1:main

Conversation

@sirok1

@sirok1 sirok1 commented Sep 18, 2026

Copy link
Copy Markdown

I added full Linux x86_64 support with native Wayland/X11 video rendering, cross-vendor NCNN/Vulkan AI upscaling, and release packaging while preserving the existing Windows behavior.

Linux Playback

  • Added native Wayland and X11 support without requiring XWayland.
  • Video is rendered through mpv_render_context into a GTK GLArea.
  • WebKitGTK and the native video surface are arranged using GtkOverlay.
  • Added HiDPI-aware framebuffer sizing and OpenGL render context cleanup.
  • Fixed absolute Linux paths passed through the command line.
  • Initial media loading is deferred until the OpenGL render context has been created.
  • Added PipeWire, PulseAudio, and ALSA audio output fallbacks.
  • Linux user data follows the XDG Base Directory specification:
    • $XDG_CONFIG_HOME/l-mpv;
    • ~/.config/l-mpv by default.
  • MediaInfo uses the CLI implementation on Linux.
  • Track extraction uses the bundled or system FFmpeg binary.
  • Windows-only features are hidden or disabled on Linux:
    • WASAPI audio visualizer;
    • DirectML and TensorRT;
    • portable executable auto-updates;
    • Windows registry and Explorer integration.

NCNN/Vulkan AI Upscaling

  • Added an NCNN Vulkan backend for NVIDIA, AMD, and Intel GPUs.
  • Added support for preconverted NCNN model pairs:
    • *.param;
    • *.bin.
  • Linux models are stored in ~/.config/l-mpv/models/ncnn/.
  • Added an in-app download for the curated AnimeJaNai V2 model with SHA-256 verification.
  • Added a custom VapourSynth API 4 plugin with tiled NCNN/Vulkan inference.
  • Hardware decoding is temporarily disabled while the AI filter is active because VapourSynth currently transfers frames through system memory.
  • Added a dropped-frame watchdog. When NCNN cannot maintain smooth playback, it:
    • removes the NCNN filter;
    • enables the packaged FSRCNNX/Anime4K shaders;
    • displays an OSD notification.

Private Linux Runtime

Added a reproducible private runtime build with pinned revisions of:

  • mpv 0.41;
  • VapourSynth R79;
  • NCNN with Vulkan support;
  • a minimal bundled Python runtime;
  • FSRCNNX and Anime4K GLSL shaders.

The runtime is isolated from the system mpv installation and loaded dynamically by the application.

Packaging and Releases

Added:

  • a self-contained AppImage build;
  • an Arch Linux PKGBUILD;
  • .SRCINFO;
  • a desktop entry with MIME types;
  • GitHub Actions release jobs for:
    • building an AppImage on Ubuntu 22.04;
    • building an Arch Linux pkg.tar.zst package.

Generated AppImage and Arch package artifacts are excluded from Git.

UI Changes

  • Added runtime platform detection.
  • Exposed the NCNN upscaling settings on Linux.
  • Hidden settings that are only available on Windows.
  • Updated the backend selector, model types, and runtime status reporting.
  • Kept controls accessible on X11 to account for native child-window compositing and pointer-event limitations.

Documentation

The README now documents:

  • Windows and Linux feature differences;
  • the native Wayland/X11 rendering architecture;
  • AppImage and Arch Linux installation;
  • NCNN models and automatic shader fallback;
  • XDG user-data paths;
  • private runtime and package build instructions;
  • the updated project structure.

Compatibility

Platform Video Rendering AI Backend
Windows 10/11 x64 HWND + D3D11 DirectML / TensorRT
Linux Wayland GTK GLArea + OpenGL/EGL NCNN/Vulkan
Linux X11 GTK GLArea + OpenGL NCNN/Vulkan

The existing Windows implementation and portable behavior remain unchanged.

Verification

  • Frontend production build
  • Rust release build
  • All 7 Rust unit tests
  • Shell syntax validation
  • GitHub Actions workflow YAML validation
  • git diff --check
  • AppImage launch
  • Extracted Arch package launch
  • Native Wayland video playback
  • Native X11 video playback
  • NCNN plugin and AnimeJaNai V2 loading
  • Vulkan device detection on Intel Iris Xe and NVIDIA RTX 3050

Additional Testing Needed

  • Benchmark 1080p → 4K upscaling at 24 FPS across representative GPUs.
  • Force dropped frames during real playback and verify the visible watchdog fallback.
  • Perform deeper resize, fullscreen, drag-and-drop, transparency, and HiDPI testing.
  • Inspect the final AppImage produced by the Ubuntu 22.04 release workflow.

Notes

The AppImage bundles the application libraries and private AI runtime, but it does not include GPU drivers. NCNN/Vulkan upscaling requires a working Vulkan ICD installed on the host system. Also, after the merge, I’d be happy to help with publishing it to the AUR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant