cmxl / FFmpeg.NET

.NET wrapper for common ffmpeg tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running on Mac OS in Development

jh197033 opened this issue · comments

I see your instructions to add your NuGet package, done that and made reference to it, but then the rest of your instructions are using Windows directory links

ie... var ffmpeg = new Engine("C:\ffmpeg\ffmpeg.exe");

I am using VSCode to develop an ASPNET Core app on Mac OS, so where to I reference the .exe?

I see the FFmpeg.NET.dll in the /bin folder but how do I reference it?

Regards

James

EDIT: Also when I add

using FFmpeg.NET;

or

using xFFmpeg.NET;

or

using xFFmpeg;

I get build errors on "MediaFile"

var inputFile = new MediaFile ("test.mp4");

Cannot create an instance of the abstract type or interface 'MediaFile'

What am I doing wrong?

example:

private static string GetPathToMpeg()
{
    if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
    {
        return Environment.GetEnvironmentVariable("IntraConfigPath", EnvironmentVariableTarget.Machine).ThrowIfNull();
    }

    if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
    {
        return "/usr/bin";
    }

    return "/usr/local/bin";
}