{"record":{"id":"789c7be2cf355711","repo":"stride3d/stride","slug":"no-video-backend-is-registered-or-supported-on-this-platform","errorCode":null,"errorMessage":"No video backend is registered or supported on this platform.","messagePattern":"No video backend is registered or supported on this platform\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Video/VideoInstance.cs","lineNumber":415,"sourceCode":"\n                UpdateAudioVolume();\n                UpdateLoopingSettings();\n                UpdatePlayRangeSettings();\n                UpdateSpeedSettings();\n            }\n\n            // New video always starts in Stopped state.\n        }\n\n        private bool IsMediaValid() => mediaInitialized && backend != null;\n\n        private void InitializeMedia(string url, long startPosition, long length)\n        {\n            if (url == null || startPosition < 0 || length < 0)\n                return;\n\n            var factory = videoSystem.ActiveBackendFactory\n                ?? throw new InvalidOperationException(\"No video backend is registered or supported on this platform.\");\n            backend = factory.CreateBackend(this);\n            mediaInitialized = backend.Initialize(url, startPosition, length);\n            if (!mediaInitialized)\n            {\n                backend.Dispose();\n                backend = null;\n            }\n        }\n\n        internal void AllocateVideoTexture(int width, int height)\n        {\n            if (videoTexture != null)\n                throw new InvalidOperationException(\"\\\"videoTexture\\\" was not deallocated properly before trying to create a new one!\");\n\n            videoTexture = new VideoTexture(GraphicsDevice, services, width, height, videoComponent.MaxMipMapCount);\n        }\n\n        private void DeallocateVideoTexture()","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Video/VideoInstance.cs#L397-L433","documentation":"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).","triggerScenarios":"Playing a video on a platform where no backend factory registered with VideoSystem; FFmpeg backend failed platform support checks (EnsurePlatformSupport), leaving ActiveBackendFactory null.","commonSituations":"Unsupported platforms (no FFmpeg natives deployed); video playback attempted before VideoSystem initialization selected a backend; trimmed builds excluding the backend natives.","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"],"exampleFix":"// before\nvideoComponent.Source = myVideo; // throws on unsupported platform\n// after\nif (videoSystem.ActiveBackendFactory == null)\n{\n    Log.Warning(\"Video playback unavailable on this platform (no backend).\" );\n    return;\n}\nvideoComponent.Source = myVideo;","handlingStrategy":"type-guard","validationCode":"if (videoSystem.ActiveBackendFactory == null)\n{\n    Log.Warning(\"No video backend on this platform; disabling video playback\");\n    return;\n}","typeGuard":"bool BackendAvailable(VideoSystem vs) => vs.ActiveBackendFactory != null;","tryCatchPattern":"try { videoInstance.Play(); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"backend\"))\n{\n    // hide video UI / use placeholder on unsupported platforms\n}","preventionTips":["Deploy backend natives (FFmpeg) for every target RID","Run EnsurePlatformSupport at startup to detect support early","Gate video features on platform capability checks"],"tags":["video-backend","platform-support","video","ffmpeg"],"backgroundTag":"unsupported-platform","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}