【问题标题】:Record video and sound from webcam从网络摄像头录制视频和声音
【发布时间】:2016-10-25 15:55:24
【问题描述】:

如何在 C# 中创建一个表单应用程序来访问本地网络摄像头并录制有声视频?

我在 Google 上搜索过,并且已经尝试过 Direct Show 和 A-frog 库。

【问题讨论】:

标签: c# webcam


【解决方案1】:

试试 OpenCV 库。它包含从本地网络摄像头获取输入的内置函数。

【讨论】:

    【解决方案2】:

    我尝试了一个示例项目 DirectX Audio & Video rec in one file 。它对我来说很好用。

    在上面引用的代码中使用 CaptureTest 表单。

    您需要更改以下代码来调用 CaptureTest。

    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main() 
    {
        AppDomain currentDomain = AppDomain.CurrentDomain;
        //Application.Run(new CaptureTest());
        Application.Run(new QuickTest());
    }
    

    通过代码项目DirectX.Capture Class Library引用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-03
      • 1970-01-01
      • 2014-09-10
      相关资源
      最近更新 更多