视频采集: 保存一个 AVI 文件

下面这个示例程序将介绍如何使用IC Imaging Control将一个图象数据流保存为一个AVI文件。
语言:Visual Basic 6
版本:3.0.3
发布于:2005年4月7日
作者:IC Imaging Control 技术支持部
系统要求:IC Imaging Control >2.1
由WDM数据流类驱动程序驱动的相机、视频转换器或图像采集卡

示例程序窗口如下图所示:

The Testdialog of IC Imaging Control,

程序开始后首先调用内置对话框(.ShowDeviceSettingsDialog)用于选择视频设备。 而后通过LiveStart显示设备传来的现场画面数据流:

Private Sub Form_Load()

    ICImagingControl1.ShowDeviceSettingsDialog

    If Not ICImagingControl1.DeviceValid Then
        Unload Me
        Exit Sub
    End If

    ICImagingControl1.LiveStart

    cmdStopCapture.Enabled = False

End Sub

点击"Start Capture AVI",用户将创建一个AVI文件;单击"Stop Capture AVI"将关闭这个文件:

Private Sub cmdStartCapture_Click()

    ICImagingControl1.LiveStop
    ICImagingControl1.AviStartCapture "video.avi", "DV Video Encoder"

    cmdStartCapture.Enabled = False
    cmdStopCapture.Enabled = True

End Sub

Private Sub cmdStopCapture_Click()

    ICImagingControl1.AviStopCapture
    ICImagingControl1.LiveStart

    cmdStartCapture.Enabled = True
    cmdStopCapture.Enabled = False

End Sub

相关源代码示例

责任声明
IC Imaging Control 源代码库中的所有代码均只用于教学目的,The Imaging Source Europe GmbH 作为IC Imaging Control的开发制造商,不对任何由于使用本文或其中源代码所产生的后果承担责任。

该网站为The Imaging Source网络的一部分。其它的站点包括 公司, Imaging, 天文相机, Astronomy Cameras Blog, Blog caméras d'astronomie, 天文相机有奖竞答, TX Text Control, LiveDocx, phpLiveDocxForum.