Mirrors stremio-glutin-shell's play-external action (PR Stremio/stremio-glutin-shell#2) so the Windows shell can hand a stream off to mpv, VLC or PotPlayer when the user picks an external player in the WebUI. - Allowlist of Windows player URL schemes: mpv://, vlc://, potplayer://. iOS/macOS-only schemes (iina, infuse, outplayer, open-vidhub) have no Windows handlers and are intentionally not listed. - mpv has no Windows URL handler: spawn the binary directly with `--` separating options from the stream URL. Tries common install paths (Program Files, scoop's %LOCALAPPDATA%\Programs\mpv, %LOCALAPPDATA%\mpv) before falling back to PATH lookup. - Spawned with CREATE_BREAKAWAY_FROM_JOB so the JobObject's KILL_ON_JOB_CLOSE doesn't kill mpv when the shell exits. - vlc:// and potplayer:// are routed through `open::that` to use the OS protocol handler the user already has registered. Test: cargo fmt --all -- --check, cargo clippy --all -- -D warnings. |
||
|---|---|---|
| .github/workflows | ||
| bin | ||
| bin-arm64 | ||
| images | ||
| mpv-arm64 | ||
| mpv-x64 | ||
| setup | ||
| src | ||
| .gitignore | ||
| build-arm64.ps1 | ||
| build.ps1 | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| generate_descriptor.js | ||
| libmpv-2_arm64.zip | ||
| libmpv-2_x64.zip | ||
| README.md | ||
| rust-toolchain.toml | ||
| server.js | ||
| stremiover.js | ||
| upload.ps1 | ||
Stremio shell: new gen
A Windows-only shell using WebView2 and MPV
Goals:
- Performance
- Reliability
- Easy to ship
In all three, this architecture excels the Qt-based shell: it is about 2-5x more efficient depending on the use case, as it allows MPV to render directly in the window through it's optimal video output rather than using libmpv to integrate with Qt.
This is due to Qt having a complex rendering pipeline involving ANGLE and multiple levels of composing and drawing to textures, which inhibits full HW acceleration.
Meanwhile in this setup MPV uses whichever pipeline it considers to be optimal (like the mpv desktop app), which is normally d3d11, allowing full HW acceleration.
For web rendering, we use the native WebView2, which is Chromium based but shipped as a part of Windows 10: therefore we do not need to ship our own "distribution" of Chromium.
Finally, this should be a lot more reliable as it uses a much simpler and more native overall architecture.