xamarin android 调用 ffmpeg 命令

Nuget 安装 Xamarin.FFmpeg,作者:gregory.perozzo
核心C#代码如下,这段代码只执行了显示帮助的命令:

var ffmpegPath = Path.GetDirectoryName(FileAccessHelper.CopyAndGetLocalFilePath("ffmpeg"));
FFMpeg.Xamarin.FFmpegLibrary.SetSourceFolder(ffmpegPath);
FFMpeg.Xamarin.FFmpegLibrary.Instance.Init(context);
var args = "-h";
FFMpeg.Xamarin.FFmpegLibrary.Run(context, args, (line) =>
{
    System.Diagnostics.Debug.WriteLine("ffmpeg output:" + line);
});

 

posted on 2023-10-21 13:14  空明流光  阅读(80)  评论(0)    收藏  举报

导航