Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I wanna build a simple streaming project
to show two IP cameras

the camera am using is hikvision DS-2CD854FWD-E

what i wanna build is supposed to be easy but the sdk that came with the camera is for c++ and i have no idea how to use it and they dont answer my emails


i am a beginner on vb net
i dont know how to do it

i tried the OZEKI Camera SDK
and it worked but it is not licensed
and i built it on C# witch i dont understand
and i couldnt make it work without pressing on the button
and it takes a round 3 seconds before streaming

C#
using System;
using System.Windows.Forms;
using Ozeki.Media;
using Ozeki.Camera;

namespace VideoCameraViewer03
{
    public partial class Form1 : Form
    {
        private IIPCamera _camera;
        private DrawingImageProvider _imageProvider = new DrawingImageProvider();
        private MediaConnector _connector = new MediaConnector();
        private IIPCamera _camera2;
        private DrawingImageProvider _imageProvider2 = new DrawingImageProvider();
        private MediaConnector _connector2 = new MediaConnector();
        private VideoViewerWF _videoViewerWF1;
        private VideoViewerWF _videoViewerWF2;
        public Form1()
        {
            InitializeComponent();

            // Create video viewer UI control
            _videoViewerWF1 = new VideoViewerWF();
            _videoViewerWF1.Name = "videoViewerWF1";
            _videoViewerWF1.Size = panel1.Size;
            panel1.Controls.Add(_videoViewerWF1);
            _videoViewerWF2 = new VideoViewerWF();
            _videoViewerWF2.Name = "videoViewerWF2";
            _videoViewerWF2.Size = panel2.Size;
            panel2.Controls.Add(_videoViewerWF2);


            // Bind the camera image to the UI control
            _videoViewerWF1.SetImageProvider(_imageProvider);
            _videoViewerWF2.SetImageProvider(_imageProvider2);

           
        }
        
        // Connect camera video channel to image provider and start
        private void connectBtn_Click(object sender, EventArgs e)
        {
            _camera = IPCameraFactory.GetCamera("192.168.0.64:80", "admin", "12345");
            _connector.Connect(_camera.VideoChannel, _imageProvider);
            _camera.Start();
            _videoViewerWF1.Start();

            _camera2 = IPCameraFactory.GetCamera("192.168.0.64:80", "admin", "12345");
            _connector2.Connect(_camera2.VideoChannel, _imageProvider2);
            _camera2.Start();
            _videoViewerWF2.Start();
        }

     
        private void Form1_Load(object sender, System.EventArgs e)
        {
            _camera = IPCameraFactory.GetCamera("192.168.0.64:8000", "admin", "12345");
            _connector.Connect(_camera.VideoChannel, _imageProvider);
            _camera.Start();
            _videoViewerWF1.Start();

            _camera2 = IPCameraFactory.GetCamera("http://192.168.0.64:8000", "admin", "12345");
            _connector2.Connect(_camera2.VideoChannel, _imageProvider2);
            _camera2.Start();
            _videoViewerWF2.Start();
        }



    }
}



so if any one can help me
i will be thankful

What I have tried:

i tried the OZEKI Camera SDK
and it worked but it is not licensed
and i built it on C# witch i dont understand
and i couldnt make it work without pressing on the button
and it takes a round 3 seconds before streaming
Posted
Updated 29-May-16 2:44am
Comments
nasir2341 30-Oct-18 3:22am    
Hi
please can you share complete code?
nasir2341@gmail.com
thanks

You could try this article
C# \ VB.NET Camera Communication Libraries[^]
Maybe it will help you out.
 
Share this answer
 
i tried VLC network stream and it worked good
for monitoring only
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900