我需要在 C# 中使用一些 FFmpeg 函数(准确地说,在 GTK# 中)。所以我下载了包装器 FFmpeg.NET .之后我尝试构建FFmpeg.NET.2008.sln(引用:我将在Visual Studio 2008中构建dll,但将在GTK#中使用),然后得到以下错误:
Error 1 error PRJ0019: A tool returned an error code from "Performing Makefile project actions" FFMpeg.NET
Error 2 The referenced assembly "C:\Users\Zhenya\Documents\ffmpegdotnet-94877\bin (debug shared)\ffmpeg.net.dll" was not found. If this assembly is produced by another one of your projects, please make sure to build that project before building this one.
如何解决这些问题?
或者如何正确构建此包装器以获取 .dll?
最佳答案
.NET 的 FFmpeg 包括非常旧的版本 ffmpeg。我直接使用ffmpeg.exe。例如
void RunFfmpeg()
{
ffmpegProcess = new Process
{
EnableRaisingEvents = true,
StartInfo =
{
FileName = GetFfmpegPath(),
Arguments = ffmpegParams.ToString(),
UseShellExecute = false,
},
};
ffmpegProcess.Start();
ffmpegProcess.BeginOutputReadLine();
ffmpegProcess.WaitForExit();
}
关于c# - 构建 FFmpeg.NET .dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22519252/