c# - 构建 FFmpeg.NET .dll

标签 c# .net dll build ffmpeg

我需要在 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/

相关文章:

c# - 如何让 Rebar 的 .NET 包装器决定鼠标光标?

c# - C 源代码到 DLL 以便在 C# 应用程序中使用

c# - ASP.NET Core Action 筛选器未被调用

java - .NET 相当于 Java Servlet 过滤器

windows - 32 位和 64 位 DLL 如何链接到同一个 C :\system32\kernel32. DLL?

delphi - 如何从句柄获取 TForm 实例?

c# - 如何以编程方式确定 GAC 中是否安装了 .NET 程序集?

c# - 将 If 语句转换为 Switch

c# - 以编程方式将 C# 变量传递给 Crystal Reports

c# - 在列表的前面和末尾添加字符串