NAudio
NAudio copied to clipboard
Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'mfplat.dll' or one of its dependencies.
I am on macOS, but ideally my app should run anywhere that has .NET Core.
I suspect MediaFoundationReader
works on Windows only?
Is there a similar multi-purpose reader I can use that is platform-independent?
At the moment I am getting this error in my project:
Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'mfplat.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libmfplat.dll, 1): image not found
at NAudio.MediaFoundation.MediaFoundationInterop.MFStartup(Int32 version, Int32 dwFlags)
at NAudio.MediaFoundation.MediaFoundationApi.Startup()
at NAudio.Wave.MediaFoundationReader.Init(MediaFoundationReaderSettings initialSettings)
at MyNamespace.Program.Main(String[] args)
Yes, Media Foundation is a set of Windows APIs, so you can't use them on other operating systems I'm afraid.
As this issue, have any other recommand solution?
@nodingneu @markheath @mworldstudio Any resolution for this compatibility?
Unfortunately, you cannot access Windows APIs if you are not running on Windows. So it depends what you are trying to do. For example, if its format conversion (e.g. converting WAV to MP4), then solutions like FFMPEG can be a good idea.