Related products: Video Capture SDK .Net

IP camera preview in C# (video tutorial with code) in Video Capture SDK .Net

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 available, we'll use LAV as most compatible. for low latency RTSP playback use RTSP Low Latency engine.
            videoCapture1.IP_Camera_Source = new VisioForge.Types.Sources.IPCameraSourceSettings() 
			{ 
				URL = "http://192.168.233.129:8000/camera/mjpeg", 
				Type = VisioForge.Types.VFIPSource.Auto_LAV 
			};
			
            videoCapture1.Audio_PlayAudio = videoCapture1.Audio_RecordAudio = false;
            videoCapture1.Mode = VisioForge.Types.VFVideoCaptureMode.IPPreview;
            
            videoCapture1.Start();
        }

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

VisioForge © 2006-2020

  • GitHub-Mark-64px
  • Twitter Социальные Иконка
  • VisioForge Facebook page
  • YouTube channel