stride3d/stride · error · InvalidOperationException
No video backend is registered or supported on this…
Error message
No video backend is registered or supported on this platform.
What it means
InitializeMedia obtains the active video backend factory from VideoSystem to create a playback backend. This InvalidOperationException is thrown when VideoSystem.ActiveBackendFactory is null — no video backend was registered or the current platform has no supported backend (e.g. FFmpeg natives unavailable).
Solutions
- Deploy/register a video backend (e.g. FFmpeg backend) and ensure its native libraries load on the target platform
- Call FFmpegUtils.EnsurePlatformSupport() early to fail fast with a clearer message
- Verify platform support before enabling video playback in the app (check VideoSystem.ActiveBackendFactory != null)
- Check that the FFmpeg backend assembly and natives are included in the deployment for the target RID
Example fix
// before
videoComponent.Source = myVideo; // throws on unsupported platform
// after
if (videoSystem.ActiveBackendFactory == null)
{
Log.Warning("Video playback unavailable on this platform (no backend)." );
return;
}
videoComponent.Source = myVideo; Defensive patterns
Strategy: type-guard
Validate before calling
if (videoSystem.ActiveBackendFactory == null)
{
Log.Warning("No video backend on this platform; disabling video playback");
return;
} Type guard
bool BackendAvailable(VideoSystem vs) => vs.ActiveBackendFactory != null;
Try / catch
try { videoInstance.Play(); }
catch (InvalidOperationException ex) when (ex.Message.Contains("backend"))
{
// hide video UI / use placeholder on unsupported platforms
} Prevention
- Deploy backend natives (FFmpeg) for every target RID
- Run EnsurePlatformSupport at startup to detect support early
- Gate video features on platform capability checks
When it happens
Trigger: Playing a video on a platform where no backend factory registered with VideoSystem; FFmpeg backend failed platform support checks (EnsurePlatformSupport), leaving ActiveBackendFactory null.
Common situations: Unsupported platforms (no FFmpeg natives deployed); video playback attempted before VideoSystem initialization selected a backend; trimmed builds excluding the backend natives.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Could not fill codec parameters. Error code=
- Could not initialize the conversion context.
- Couldn't allocate a frame for decoding.
- Couldn't allocate a frame for hardware decoding.
- Couldn't transfer frame data from GPU to CPU
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/789c7be2cf355711.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Video/VideoInstance.cs:415
UpdateAudioVolume();
UpdateLoopingSettings();
UpdatePlayRangeSettings();
UpdateSpeedSettings();
}
// New video always starts in Stopped state.
}
private bool IsMediaValid() => mediaInitialized && backend != null;
private void InitializeMedia(string url, long startPosition, long length)
{
if (url == null || startPosition < 0 || length < 0)
return;
var factory = videoSystem.ActiveBackendFactory
?? throw new InvalidOperationException("No video backend is registered or supported on this platform.");
backend = factory.CreateBackend(this);
mediaInitialized = backend.Initialize(url, startPosition, length);
if (!mediaInitialized)
{
backend.Dispose();
backend = null;
}
}
internal void AllocateVideoTexture(int width, int height)
{
if (videoTexture != null)
throw new InvalidOperationException("\"videoTexture\" was not deallocated properly before trying to create a new one!");
videoTexture = new VideoTexture(GraphicsDevice, services, width, height, videoComponent.MaxMipMapCount);
}
private void DeallocateVideoTexture()View on GitHub (pinned to 96fad776d2)