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.

Home Page:https://xabe.net/product/xabe_ffmpeg/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FFmpeg.Conversions.FromSnippet.Convert crashes if outputFilePath is just file name.

HubKing opened this issue · comments

    static async Task Main(string[] args)
    {
        Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
        
        var snippet = await FFmpeg.Conversions.FromSnippet.Convert("test.mp3", "test.aac");
        IConversionResult result = await snippet.Start();
    }

System.ArgumentException: 'Path cannot be the empty string or all whitespace. Arg_ParamName_Name'

I looked at the decompiled code and it happened in the code where it tries to creates parent directory, if it does not exist. When the third parameter is just file name, it should just create it in the working directory, instead of crashing.

A workaround is passing "./test.aac" instead of "test.aac".

Fix was deployed with version 5.2.1