Skip to content

Add support to native Windows ARM64#55

Merged
mfkl merged 2 commits into
mfkl:masterfrom
micha102:master
Apr 16, 2026
Merged

Add support to native Windows ARM64#55
mfkl merged 2 commits into
mfkl:masterfrom
micha102:master

Conversation

@micha102
Copy link
Copy Markdown
Contributor

Today installing VideoLAN.LibVLC.Windows and LibVLCSharp together generates binaries for x86 and x64, but not ARM64.
The resulting binaries actually work on a Windows on ARM device, eg Microsoft Surface X Pro 11th.

However, this is not optimal as it leverages emulation of VLC x64 DLLs to run them on ARM64.
This PR adds support to ARM64 architecture, so the resulting nupkg provides arm64 in addition to x86 and x64

Attention: this NuGet, alone will not provide support to win-arm64, LibVLCSharp should also support win-arm64.
This will break the resulting published application.
Previously, everything works with win-x64 plugins, when publishing an app for ARM64. This NuGet provides x64 plugins and LibVLCSharp only seeks win-x64 plugins, so all works (with emulation)

LibVLCSharp must add few things and patch Core.cs to detect the win-arm64 too.

In src/LibVLCSharp/Shared/Core/Constants.cs, Line 35 add
public const string WinArm64 = "win-arm64";

LibVLCSharp must patch the Core.cs file
src/LibVLCSharp/Shared/Core/Core.cs

Because now inside this file => "everything 64bit is x64" <= which is not good.

Specifically Lines 80 to 83
From
else { arch = PlatformHelper.IsX64BitProcess ? ArchitectureNames.Win64 : ArchitectureNames.Win86; }

To something like
else if (PlatformHelper.IsWindows) { arch = RuntimeInformation.ProcessArchitecture switch { Architecture.X64 => ArchitectureNames.Win64, Architecture.X86 => ArchitectureNames.Win86, Architecture.Arm64 => ArchitectureNames.WinArm64, _ => throw new PlatformNotSupportedException( $"Unsupported architecture {RuntimeInformation.ProcessArchitecture}") }; }

I still don't have access to VideoLAN code to raise a PR there too.
I think that's it for now (maybe LoongArch64 soon).

@micha102 micha102 marked this pull request as draft March 13, 2026 05:03
@micha102 micha102 marked this pull request as ready for review March 13, 2026 05:13
@mfkl
Copy link
Copy Markdown
Owner

mfkl commented Mar 16, 2026

this looks good. Did you test both the GPL and LGPL package?

Do you see the performance difference compared with the x64 emulation for high res media?

@micha102
Copy link
Copy Markdown
Contributor Author

Yes, I compiled GPL so far and tested it successfully on Microsoft Surface X Pro 11th Generation.
And the video quality is definitely better (less blur) than x64 (I put the two videos side-by-side one with the app compiled with x64 and the other GPL compiled with arm64).
But, I realize I need to tweak thoroughly LibVLC initiation parameters in my app because I think the quality can/should be even better.
I will have the possibility to compile LGPL NuGet too this evening.
Keep you in touch

@KeinNiemand
Copy link
Copy Markdown

Hello! I'm also waiting on Windows arm64 support for an integration I'm building. Would love to see this land soon! Could you share what the current blockers are for getting this merged?

@micha102
Copy link
Copy Markdown
Contributor Author

Hi, I need to fix the Windows build to CI integration #56 so that the consistency of builds is properly monitoring.

@mfkl mfkl merged commit 042f49a into mfkl:master Apr 16, 2026
7 checks passed
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.

3 participants