gpt4 book ai didi

c++ - 如何使用 directshow 从相机创建 avi?

转载 作者:行者123 更新时间:2023-11-28 05:32:11 28 4
gpt4 key购买 nike

我想从相机中捕捉视频文件。我使用样本采集器从相机捕获图像文件,但我不知道如何捕获视频文件并将其保存为 avi 格式。当我调用 renderstream 函数时,发生错误。

最佳答案

Windows SDK 7.x 附带 AMCap Sample这是演示预览和捕获功能的经典示例。

Video capture application.

This sample application demonstrates the following tasks related to audio and video capture:

  • Capture to a file
  • Live preview
  • Allocation of the capture file
  • Display of device property pages
  • Device enumeration
  • Stream control

如果您有更窄的问题,请发布您的代码以获得针对您的问题的建议。

获取示例代码

  • 安装 Windows SDK 7.1
  • 确保安装样本
  • 此示例安装在以下路径下:[SDK Root]\Samples\Multimedia\DirectShow\Capture\AmCap

关于c++ - 如何使用 directshow 从相机创建 avi?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39202617/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com