Skip to content

Fix black video on non-Vulkan GPUs: bundle vulkan-1.dll with libmpv - #13888

Merged
niksedk merged 2 commits into
mainfrom
claude/bad-libmpv-inclusion-f5fcd1
Aug 19, 2026
Merged

Fix black video on non-Vulkan GPUs: bundle vulkan-1.dll with libmpv#13888
niksedk merged 2 commits into
mainfrom
claude/bad-libmpv-inclusion-f5fcd1

Conversation

@niksedk

@niksedk niksedk commented Aug 19, 2026

Copy link
Copy Markdown
Member

The regression

Since beta 17, users on GPUs without a Vulkan runtime get a black video with no sound (waveform still works) — reported in #13856 by a GeForce 9500 GT user, where beta 16 works fine.

The libmpv bump in #13761 (shinchiro 20260814) picked up upstream's 2026-08-04 "vulkan: disable static loader" change: libmpv-2.dll now has a load-time PE import of vulkan-1.dll (both x64 and ARM64; the April DLL had none — Vulkan was statically linked). vulkan-1.dll is installed by GPU drivers, not by Windows, so on any machine whose driver predates Vulkan (or with the Microsoft Basic Display driver) LoadLibrary("libmpv-2.dll") fails outright — mpv never even initializes. Upstream ships no loader with their packages either; their open issue shinchiro/mpv-winbuild-cmake#831 says "install the LunarG runtime yourself".

The repackaging in #13761 itself was clean — both DLLs verified byte-identical to upstream's non-v3 x86_64 / aarch64 archives.

The fix

New support-files release libmpv-2026-08-14b: the same libmpv DLLs (SHA256-verified unchanged) with the Authenticode-signed Khronos Vulkan loader from the LunarG 1.4.357.0 runtime (Apache-2.0, license text included) next to them — x64 loader in the x64 zip, ARM64 loader in the ARM64 zip.

This works because SE loads libmpv with LOAD_WITH_ALTERED_SEARCH_PATH + SetDllDirectory, so the adjacent vulkan-1.dll resolves the import. On machines with no Vulkan drivers the loader simply enumerates zero ICDs and mpv's d3d11/OpenGL context probing works exactly as before; on Vulkan-capable machines nothing changes.

Repo changes:

  • LibMpvDownloadService .cs — point both download URLs at the b tag (the in-app unpack already extracts every root-level .dll, so vulkan-1.dll flows through).
  • build-ui.yml — point the CI download at the b tag and copy the whole extracted zip into both Windows publish folders instead of only libmpv-2.dll.
  • MainViewModel.cs — the libmpv-update fallback (used when the old DLL is locked during an in-app update) now moves every file in the folder, not just libmpv-2.dll.

Docs

docs/third-party-components.md — manual libmpv installs need the loader too, so the MPV section now says where to get vulkan-1.dll and that SE's own download button already includes it. docs/faq.md — added the "black video, no sound, but the waveform works" symptom under Troubleshooting, since that combination is the tell-tale for libmpv failing to load.

Unrelated test fix

BatchConvertStatusColor_StillFollowsTheErrorTextAfterItChanges was failing on main before this branch: #13883 and #13884 raced. The test used "is the result a brush at all" as a proxy for "is it the error brush", which only held while non-error statuses returned UnsetValue; #13884 correctly changed those to the explicit theme text brush to fix black-on-dark status text. The test now compares brush identity, which is what it was actually asserting. All four test projects pass (3235 + 1399 + 251 + 376).

Fixes #13856

🤖 Generated with Claude Code

niksedk and others added 2 commits August 19, 2026 21:20
The shinchiro 20260814 libmpv (beta 17/18) carries a load-time import of
vulkan-1.dll after upstream's 2026-08-04 "vulkan: disable static loader"
change. That DLL is installed by GPU drivers, not Windows, so on machines
with pre-Vulkan GPUs (or the Microsoft Basic Display driver) LoadLibrary
fails outright: black video, no sound, waveform still fine (issue #13856,
upstream shinchiro/mpv-winbuild-cmake#831).

Repackaged the zips as support-files tag libmpv-2026-08-14b with the
Authenticode-signed Khronos loader from the LunarG 1.4.357.0 runtime
(x64 and ARM64) plus its license next to libmpv-2.dll; the libmpv DLLs
are byte-identical to before. SE loads libmpv with
LOAD_WITH_ALTERED_SEARCH_PATH + SetDllDirectory, so the adjacent loader
is found; with zero Vulkan ICDs it no-ops and mpv's d3d11/OpenGL
contexts work as before.

Also copy the whole extracted zip in the Windows CI publish legs, and
make the libmpv-update fallback mover carry every file in the folder
instead of only libmpv-2.dll.

Fixes #13856

Co-Authored-By: Claude Fable 5 <[email protected]>
Manual libmpv installs need vulkan-1.dll too: builds from August 2026
link the Vulkan loader dynamically, so libmpv-2.dll does not load at all
without it. Note that in the third-party components list, and add the
"black video, no sound, waveform works" symptom to the FAQ.

BatchConvertStatusColor_StillFollowsTheErrorTextAfterItChanges used "is
the result a brush at all" as a proxy for "is it the error brush". That
proxy only held while non-error statuses returned UnsetValue - since the
in-progress statuses were given the explicit theme text brush the test
failed. Compare brush identity instead, which is what it was really
asserting.

Co-Authored-By: Claude Fable 5 <[email protected]>
@niksedk
niksedk merged commit c6a6b6e into main Aug 19, 2026
1 check passed
@niksedk
niksedk deleted the claude/bad-libmpv-inclusion-f5fcd1 branch August 19, 2026 19:39
@niksedk niksedk mentioned this pull request Aug 19, 2026
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.

Video not loading

1 participant