stride3d/stride · critical · EntryPointNotFoundException
Could not find function
Error message
Could not find function '{functionName}' in FFmpeg library '{libraryName}'. What it means
After locating a loaded FFmpeg library, GetFunctionDelegate resolves a named export via NativeLibrary.TryGetExport. This EntryPointNotFoundException is thrown (throwOnError=true) when the library loaded but does not export the requested function — typically a version mismatch between the native FFmpeg binaries and the bindings.
Solutions
- Ship the exact FFmpeg native binaries matching the Stride.Video binding versions instead of relying on system FFmpeg
- Align system FFmpeg package versions with the expected binding versions
- Rebuild/update bindings for the native FFmpeg version in use
- Check for a corrupted/partially copied library; redeploy the native files
Example fix
// before // relying on system libavcodec sudo apt install libavcodec58 // after // bundle matching natives with the app csproj: <Content Include="runtimes/linux-x64/native/libavcodec.so.58" CopyToOutputDirectory="PreserveNewest" />
Defensive patterns
Strategy: validation
Validate before calling
try { FFmpegUtils.EnsurePlatformSupport(); }
catch (EntryPointNotFoundException ex) { Log.Error($"FFmpeg version mismatch: {ex.Message}"); } Try / catch
try { media.Open(url); }
catch (EntryPointNotFoundException ex)
{
Log.Error($"FFmpeg export missing — bundle matching natives: {ex.Message}");
} Prevention
- Pin and bundle FFmpeg versions matching the bindings
- Avoid relying on system FFmpeg for shipped apps
- Test on clean machines without system FFmpeg
When it happens
Trigger: Using native FFmpeg libraries whose version lacks a symbol the compiled bindings expect (older/newer avcodec/avutil/avformat), or a stripped/custom FFmpeg build missing optional functions.
Common situations: System-installed FFmpeg versions differing from the versions Stride was built against; partial upgrades of native binaries; minimal FFmpeg builds (e.g. distro builds with disabled features).
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- FFmpeg library ' ' was not loaded.
- Could not locate or load native library
- Failed to compile a sound asset, ffmpeg was not found.
- Failed to compile a sound asset, ffmpeg failed to convert
- Failed to compile a video asset, ffmpeg was not found.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/8d04e07ff40bf2c8.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Video/FFmpeg/FFmpegUtils.cs:131
// Resolves FFmpeg.AutoGen function pointers from libraries loaded by NativeLibraryHelper, so
// FFmpeg uses the same native resolution as the rest of the engine instead of ffmpeg.RootPath.
private sealed class StrideFunctionResolver : IFunctionResolver
{
public static readonly StrideFunctionResolver Instance = new();
public T GetFunctionDelegate<T>(string libraryName, string functionName, bool throwOnError)
{
if (!libraryHandles.TryGetValue(libraryName, out var handle) || handle == 0)
{
if (throwOnError)
throw new DllNotFoundException($"FFmpeg library '{libraryName}' was not loaded.");
return default;
}
if (!NativeLibrary.TryGetExport(handle, functionName, out var function))
{
if (throwOnError)
throw new EntryPointNotFoundException($"Could not find function '{functionName}' in FFmpeg library '{libraryName}'.");
return default;
}
return (T)(object)Marshal.GetDelegateForFunctionPointer(function, typeof(T));
}
}
/// <summary>
/// Converts a <see cref="AVDictionary"/>* to a Dictionary<string,string>.
/// </summary>
/// <param name="avDictionary">A pointer to a <see cref="AVDictionary"/> struct</param>
/// <returns>A new dictionary containing a copy of all entries.</returns>
[NotNull]
internal static unsafe Dictionary<string, string> ToDictionary(AVDictionary* avDictionary)
{
var dictionary = new Dictionary<string, string>();
if (avDictionary == null)
return dictionary;
View on GitHub (pinned to 96fad776d2)