stride3d/stride · error · AssetException
Failed to compile a video asset. Did not find the…
Error message
Failed to compile a video asset. Did not find the VideoStream from the media.
What it means
After opening the source media with the native media library, the compiler looks for the first VideoStream. If the opened media contains no video stream (audio-only file, unsupported container that decodes no streams), it throws this AssetException.
Solutions
- Verify the asset source is a real video file with a decodable video track (ffprobe the file)
- Re-export/convert the video to a standard container/codec (e.g. mp4/h264) and re-import
- Check the file is not truncated or corrupt; re-obtain the source
- Ensure the video asset's Source path points at the intended file, not an audio track
Defensive patterns
Strategy: validation
Validate before calling
// verify the file has a video stream before assigning it to a video asset
if (!File.Exists(assetSource) || IsAudioOnly(assetSource))
throw new InvalidOperationException($"{assetSource} has no video stream and cannot be a video asset."); Type guard
static bool IsAudioOnly(string path) =>
!new[] { ".mp4", ".avi", ".mov", ".mkv", ".wmv", ".webm" }.Contains(Path.GetExtension(path)?.ToLowerInvariant()); Try / catch
try
{
await CompileVideoAsync(asset);
}
catch (AssetException ex) when (ex.Message.Contains("Did not find the VideoStream"))
{
logger.Error($"'{assetSource}' contains no decodable video track; use a real video file (mp4/h264).");
} Prevention
- Only assign files with video tracks to video assets
- Convert exotic codecs/containers to mp4/h264 before import
- Verify files are not truncated or corrupt
- Use ffprobe to confirm a video stream exists
When it happens
Trigger: DoCommandOverride calls media.Open(assetSource) and media.Streams.OfType<VideoStream>().FirstOrDefault() returns null.
Common situations: Assigning an audio file (mp3/wav) to a video asset, a container ffmpeg-less decoders can't open so zero streams are reported, corrupt/truncated video file, codec not recognized by the bundled media decoders.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No track found in
- Unable to find the base
- Unable to find the graph corresponding to the base part
- The base is unset for the current node.
- No Collection item identifier associated to the given…
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/d8852405b15b7a60.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Assets/Media/VideoAssetCompiler.cs:115
var sidedataStripCommand = "";
// check that the video file format is supported
if (Parameters.Platform == PlatformType.Windows && videoAsset.Source.GetFileExtension() != ".mp4")
mustReEncodeVideo = true;
//Use FFmpegMedia object (need to check more details first before I can use it)
VideoStream videoStream = null;
AudioStream audioStream = null;
FFmpegUtils.PreloadLibraries();
FFmpegUtils.Initialize();
using (var media = new FFmpegMedia())
{
media.Open(assetSource.ToOSPath());
// Get the first video stream
videoStream = media.Streams.OfType<VideoStream>().FirstOrDefault();
if (videoStream == null)
throw new AssetException("Failed to compile a video asset. Did not find the VideoStream from the media.");
// On windows MediaEngineEx player only decode the first video if the video is detected as a stereoscopic video,
// so we remove the tags inside the video in order to ensure the same behavior as on other platforms (side by side decoded texture)
// Unfortunately it does seem possible to disable this behavior from the MediaEngineEx API.
if (Parameters.Platform == PlatformType.Windows && media.IsStereoscopicVideo(videoStream))
{
mustReEncodeVideo = true;
sidedataStripCommand = "-vf sidedata=delete";
}
// Get the first audio stream
audioStream = media.Streams.OfType<AudioStream>().FirstOrDefault();
}
Size2 videoSize = new Size2(videoStream.Width, videoStream.Height);
//check the format
if (ListSupportedCodecNames != null)
{View on GitHub (pinned to 96fad776d2)