DEV Community

hammi
hammi

Posted on

our windows build ships no browser: how a ~31 mb launcher gets free nvdec/quicksync 4k decode

Disclosure: I'm the developer of RKMovies, an ultra-lightweight 4K media player client for Android and Windows (the landing page).

Every Electron app bundles its own Chromium, which is why "desktop video player" installers weigh 150-300 MB. We went the other way.

Our Windows installer (~31 MB) is a PyInstaller bundle of the FastAPI backend plus a launcher. On startup it finds the real Chrome or Edge through the registry (App Paths\chrome.exe / msedge.exe), then spawns it with:

--app=http://127.0.0.1:<port>
--user-data-dir=%APPDATA%\RKMovies\profile
Enter fullscreen mode Exit fullscreen mode

Result: a chromeless window that looks native, our own taskbar icon (SetCurrentProcessExplicitAppUserModelID), an isolated profile, and zero bundled browser engine.

The payoff is decode. Chrome and Edge on Windows already drive NVDEC (NVIDIA), QuickSync (Intel) and DXVA (AMD) for H.264 / HEVC / AV1. Since the video element lives in that borrowed browser, 4K hardware decode is simply there. We ship no decoder of our own. A 10-year-old laptop plays 4K HEVC smoothly because the GPU work happens inside Chrome, not inside our 31 MB exe.

Fallback chain when neither browser exists: pywebview, then the system default browser. The Android side is the mirror image: MediaCodec through ArtPlayer, no engine bundled either, which is how the 0.9 MB APK stays under a megabyte.

Trade-offs we accepted: desktop mode depends on a system browser being installed, and the "app" is really a local server plus a window. In exchange the installer stays ~31 MB and every update is a small download instead of a full Chromium re-bundle. Grab the Windows exe here if you want to see.

If you're building a small desktop tool: don't bundle a browser unless you have to. The system one is already there, already GPU-accelerated, and already updated.

Top comments (0)