DapperDanh
DapperDanh

Reputation: 617

FFMpegCore C# custom args

I am evaluating using FFMpegCore C# to do some video manipulations. I am not seeing a way of passing in a custom argument string. I fear the answer is staring right at me but I definitely read all documentation and cannot find a way to do it.

Below my signature is the string I would like to pass in, though it should not matter. Anyone know how to pass a custom string arguments to FFMpegCore C#?

Thanks, Dan

public static string GetFlipBookArgs(string convertedVideoFilePath, int frameCountCalc, string flipbookFilePath)
{
    return $"-y -i \"{convertedVideoFilePath}\" -vf \"select = not(mod(n\\, {frameCountCalc})),scale = 128:128,tile = 4x4\" -frames:v 1 -q:v 10 \"{flipbookFilePath}\"";
}

Upvotes: 3

Views: 1508

Answers (1)

tqk2811
tqk2811

Reputation: 567

Try FFmpegArgs.Executes

string your_arguments = "-y -i ......";
var render = FFmpegRender.FromArguments(
  your_arguments,
  new FFmpegRenderConfig()
    .WithFFmpegBinaryPath("path to ffmpeg")//default from PATH or current dir
    //.WithWorkingDirectory("your working dir or not")//default current dir
  );
//render.OnEncodingProgress += your update action
//var result = render.Execute(); 
var result = await render.ExecuteAsync();

Upvotes: 3

Related Questions