IP camera capture to MP4 file in C# (video tutorial with code) in Video Capture SDK .Net

Related products
Video Capture SDK .Net

YouTube tutorial - IP camera capture to MP4

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

using VisioForge.Types.OutputFormat;
using VisioForge.Types.VideoEffects;


namespace SampleCapture
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btStart_Click(object sender, EventArgs e)
        {
            // Several engines are available. We'll use LAV as the most compatible. For low latency RTSP playback, use the RTSP Low Latency engine.
            videoCapture1.IP_Camera_Source = new VisioForge.Types.Sources.IPCameraSourceSettings() 
            { 
                URL = "http://192.168.233.129:8000/camera/mjpeg" 
            };
            videoCapture1.Audio_PlayAudio = videoCapture1.Audio_RecordAudio = false;
            videoCapture1.Output_Filename = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos) + "\\output.mp4";
            videoCapture1.Output_Format = new VFMP4Output(); //using MP4 output with default settings
            videoCapture1.Mode = VisioForge.Types.VFVideoCaptureMode.IPCapture;

            videoCapture1.Start();
        }

        private void btStop_Click(object sender, EventArgs e)
        {
            videoCapture1.Stop();
        }
    }
}

Required redists

  • Video capture redist
  • LAV redist
  • MP4 redist
How to install required redists or deploy them to the user's PC?
Please contact support to get help with this tutorial. Visit our GitHub page to get more code samples.
abstract 2abstract 1abstract 3
logo
VisioForge © 2006 - 2021