SubtitleEdit/subtitleedit · critical · PlatformNotSupportedException

LibVLC download is not supported on this platform

Error message

LibVLC download is not supported on this platform

What it means

Terminal fallback thrown by LibVlcDownloadService.GetUrl() when on macOS the architecture is not X64 (the MacArm64 case is commented out) or when the OS is neither Windows nor macOS (e.g. Linux, which has no branch at all). The message is explicit: 'LibVLC download is not supported on this platform'.

Source

Thrown at src/ui/Logic/Download/LibVlcDownloadService.cs:59

                case Architecture.X86:
                    return WindowsX86Url;
                default:
                    throw new PlatformNotSupportedException("Unsupported Windows architecture.");
            }
        }

        if (OperatingSystem.IsMacOS())
        {
            switch (RuntimeInformation.ProcessArchitecture)
            {
                // case Architecture.Arm64:
                //     return MacArmUrl; // e.g., for M1, M2, M3, M4, M5 chips
                case Architecture.X64:
                    return MacX64Url;
            }
        }

        throw new PlatformNotSupportedException("LibVLC download is not supported on this platform");
    }
}

View on GitHub (pinned to 17a9f07487)

Solutions

  1. On Apple Silicon Macs, run the app under Rosetta as an x64 process so the MacX64Url branch applies.
  2. On Linux, install libvlc via the distro package manager instead of auto-download.
  3. To support Apple Silicon natively, uncomment the MacArm64 case and supply a valid LibVLC ARM64 build URL.

Example fix

// before
if (OperatingSystem.IsMacOS())
{
    switch (RuntimeInformation.ProcessArchitecture)
    {
        // case Architecture.Arm64: return MacArmUrl;
        case Architecture.X64: return MacX64Url;
    }
}
throw new PlatformNotSupportedException("LibVLC download is not supported on this platform");

// after: enable Apple Silicon
if (OperatingSystem.IsMacOS())
{
    switch (RuntimeInformation.ProcessArchitecture)
    {
        case Architecture.Arm64: return MacArmUrl;
        case Architecture.X64:   return MacX64Url;
        default: throw new PlatformNotSupportedException("Unsupported macOS architecture.");
    }
}
Defensive patterns

Strategy: validation

Validate before calling

static bool IsLibVlcSupportedHere()
    => OperatingSystem.IsWindows()
       || (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.X64);

if (!IsLibVlcSupportedHere()) { DisableLibVlcPlayback(); return; }

Type guard

static bool LibVlcPlatformSupported()
    => OperatingSystem.IsWindows()
       || (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.X64);

Try / catch

try { var url = vlcService.GetUrl(); }
catch (PlatformNotSupportedException ex) when (ex.Message.Contains("not supported on this platform"))
{ _logger.Warning("LibVLC download unsupported here: {OS}/{Arch}", RuntimeInformation.OSDescription, RuntimeInformation.ProcessArchitecture); DisableLibVlcPlayback(); }

Prevention

When it happens

Trigger: macOS running an Apple Silicon (Arm64) process — the MacArm64 branch is commented out so it falls through; any Linux or other OS where neither Windows nor macOS x64 branches apply.

Common situations: Apple Silicon Mac users (the most common hit, since the Arm64 case is disabled); Linux users expecting LibVLC auto-download; the commented code signals Mac Arm support is pending. Distinct from 335 (which is the Windows default).

Related errors


AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13). Data as JSON: /api/errors/a228c90e90b4e692. Report an issue: GitHub.