tomaszzmuda / Xabe.FFmpeg

.NET Standard wrapper for FFmpeg. It allows to process media without know how FFmpeg works, and can be used to pass customized arguments to FFmpeg from dotnet core application.
https://xabe.net/product/xabe_ffmpeg/
Other
715 stars 128 forks source link

testing with LinqPad, it shows a parameter error #460

Closed Davider-code closed 1 year ago

Davider-code commented 1 year ago

I'm using LinqPad to test the following code, and it gives me a parameter error PS: I have already set the environment variables correctly, and the path mentioned in the error is correct.

error info: Parameter error: 'C:\Users\Administrator\Desktop\DLL\ffmpeg.exe'

Linqpad C# Code:

using Xabe.FFmpeg;

async Task Main()
{
    string inputPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "a.mpg");
    string outputPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "a.mp4");

    var conversion = Xabe.FFmpeg.FFmpeg.Conversions.New();

    var snippet = await FFmpeg.Conversions.FromSnippet.Convert(inputPath, outputPath);
    IConversionResult result = await snippet.Start();
}