小编Pav*_*mar的帖子

如何使用C#Desktop Application在MPEG或AVI文件中记录WebCam视频

我正在开发一个桌面应用程序,它要求我连接到网络摄像头并以MPEG,AVI,MP4和WMV格式录制(保存)视频并刻录到CD/DVD中.该应用程序是在Win Forms中.我只是在寻找免费或开源的解决方案或控件.

我已经使用Aforge.Net将AVI保存为AVI,但它需要更多的尺寸来保存(例如15sce 320x240视频的60-100MB).我预计10秒会有1MB.这是代码:

using System;
using System.Drawing;
using System.Windows.Forms;
using AForge.Video;
using AForge.Video.DirectShow;
using AForge.Video.VFW;

namespace Aforge_Web_Cam
{
public partial class VideoForm : Form
{
    private FilterInfoCollection VideoCaptureDevices;
    private VideoCaptureDevice FinalVideo = null;
    private VideoCaptureDeviceForm captureDevice;
    private Bitmap video;
    private AVIWriter AVIwriter = new AVIWriter();
    private SaveFileDialog saveAvi;

    public VideoForm()
    {
        InitializeComponent();
    }

    private void VideoForm_Load(object sender, EventArgs e)
    {
        VideoCaptureDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
        captureDevice = new VideoCaptureDeviceForm();
    }

    private void butStart_Click(object sender, EventArgs e)
    {
        if (captureDevice.ShowDialog(this) == …
Run Code Online (Sandbox Code Playgroud)

c# video video-capture video-recording

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

video ×1

video-capture ×1

video-recording ×1