{"record":{"id":"fb6741371786873f","repo":"stride3d/stride","slug":"no-video-track-found-in-url","errorCode":null,"errorMessage":"No video track found in {url}","messagePattern":"No video track found in (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Video/Backends/MediaCodecVideoBackend.cs","lineNumber":316,"sourceCode":"    {\n        using var file = new Java.IO.FileInputStream(url);\n        var probe = new MediaExtractor();\n        try\n        {\n            probe.SetDataSource(file.FD, startPosition, length);\n            for (int i = 0; i < probe.TrackCount; i++)\n            {\n                var format = probe.GetTrackFormat(i);\n                var mime = format.GetString(MediaFormat.KeyMime);\n                if (mime != null && mime.StartsWith(\"video/\"))\n                    return (format.GetInteger(MediaFormat.KeyWidth), format.GetInteger(MediaFormat.KeyHeight));\n            }\n        }\n        finally\n        {\n            probe.Release();\n        }\n        throw new InvalidOperationException($\"No video track found in {url}\");\n    }\n}\n#endif\n","sourceCodeStart":298,"sourceCodeEnd":320,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Video/Backends/MediaCodecVideoBackend.cs#L298-L320","documentation":"Thrown by MediaCodecVideoBackend.ProbeVideoDimensions after it probed the stream with FFmpeg and found no video stream track in the container. Initialization therefore cannot determine the video dimensions, so it aborts with this error naming the URL.","triggerScenarios":"Calling Initialize on a media URL whose container has only audio streams (e.g. an .mp3 or audio-only .mp4), a corrupted/empty file that yields no decodable video stream, or a URL whose demuxer opens but exposes zero video streams.","commonSituations":"Passing an audio file path where a video was expected; a live/fragmented stream whose video track appears later; files truncated so the video track header is missing; typos pointing at the wrong asset.","solutions":["Verify the URL/file actually contains a video stream (e.g. ffprobe -show_streams)","Check the application's media selection logic — an audio asset may have been passed by mistake","Inspect the file for corruption or truncation; re-encode or re-download the asset","Catch InvalidOperationException and fall back to an audio-only playback path"],"exampleFix":"// before\nvideoBackend.Initialize(audioOnlyFilePath); // throws: no video track\n// after\nif (MediaProbe.HasVideoTrack(audioOnlyFilePath))\n    videoBackend.Initialize(audioOnlyFilePath);\nelse\n    InitializeAsAudioOnly(audioOnlyFilePath);","handlingStrategy":"validation","validationCode":"bool hasVideo = MediaProbe.EnumerateStreams(url).Any(s => s.MediaType == AVMediaType.AVMEDIA_TYPE_VIDEO);\nif (!hasVideo)\n{\n    Logger.Warning($\"{url} has no video track\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    videoBackend.Initialize(url);\n}\ncatch (InvalidOperationException ex) when (ex.Message.StartsWith(\"No video track found\"))\n{\n    HandleAudioOnlyAsset(url, ex);\n}","preventionTips":["Pre-probe assets with ffprobe (or an FFmpeg probe) before assigning them to a video component","Validate user-selected files for a video stream before loading","Handle audio-only assets through a separate pipeline instead of the video backend"],"tags":["video","ffmpeg","media-probe","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}