C# 中使用的 AForge.Video.FFMPEG

2024-02-13

我使用 Visual C# 2008,想要从 bmp 序列写入 AVI 文件。

我找到了 AForge.Video.VWF 但它仅适用于“vmw3”或“DIB”编解码器,我想使用 AForge.Video.FFMPEG 但出现错误。

例如我只是编码:

using System;
using System.Collections.Generic;

using System.Linq;
using System.Text;
using AForge.Video.FFMPEG;

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            VideoFileWriter vfw = new VideoFileWriter();
        }
    }
}

但我得到了这个filenotfoundexception

{"The specified module could not be found. (Exception from HRESULT: 0x8007007E)":null}

为了正确使用 AForge.Video.FFMPEG,您必须确保将 FFmpeg dll 包含到输出文件夹中。最简单的方法是将它们添加到您的 VS 项目中,进入其属性并将“复制到输出目录”选项设置为“始终”。

AForge 使用的 FFmpeg 二进制文件可以在 AForge.NET 的外部文件夹中找到,通常位于C:\Program Files (x86)\AForge.NET\Framework\Externals\ffmpeg\bin

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

C# 中使用的 AForge.Video.FFMPEG 的相关文章

随机推荐