Skip to content

Cannot load any of the FFmpeg dlls #686

@dev11ocean

Description

@dev11ocean

Hello, I'm testing out ffmediaelement for the first time but am unable to get past multiple exceptions when calling Library.LoadFFmpeg().

  • On Windows 10
  • WPF .NET 8 project
  • Building in 64 bit
  • FFME.Windows v4.4.350 and FFmpeg.AutoGen v4.4.0

Here's what I'm doing:

public partial class App : Application
{
    public App()
    {
        Library.FFmpegDirectory = @"D:\ffmpeg\x64";
        Library.FFmpegLoadModeFlags = FFmpegLoadMode.VideoOnly;
    }

    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);
        var loaded = Library.LoadFFmpeg(); // exception here
    }
}

I get the exception: System.IO.FileNotFoundException: 'Unable to load FFmpeg binaries from folder '"D:\ffmpeg\x64"'.'
Digging a bit deeper I see every library is failing to load at this line in FFLibrary.cs:

IntPtr num = LibraryLoader.LoadNativeLibrary(ffmpeg.RootPath, this.Name, this.Version);
if (num == IntPtr.Zero)
  return false;

I downloaded the 64bit binaries listed in the readme which are the following:

Image

What am I doing wrong here? I noticed in the LoadNativeLibrary() function, the this.Version param that is being passed for each library does NOT match up with the binaries I have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions