Show IP camera using c# windows forms
-
19-06-2021 - |
Question
i'm developing software to display ip camera "Acti", i tried to use axnvUnifiedControl but i cannot find any information about it.
my goal is to connect to the camera using IP, username, and password and display the camera image in windows form.
i'm using c# .net 4.0
Solution
This can be done using the following code snippet:
First you should reference the OCX in your toolbox, and drag it to your form. but i tried to use it in design mode, but the VS is hang and force close.
camMedia.MediaSource = CameraIP; camMedia.MediaUsername = UserName; camMedia.MediaPassword = Password; camMedia.HttpPort = HttpPort;//80 camMedia.RegisterPort = RegisterPort;//6000 camMedia.ControlPort = ControlPort;//6001 camMedia.StreamingPort = StreamingPort;//6002 camMedia.Connect(0);
where the camMedia
is the OCX object name.
OTHER TIPS
ACTi has quite a wide range of cameras, and they do not share uniform API. You have to look for documentation for your model of interest and check the vendor's sample code and SDKs. The cameras also have some support for well known protocols, such as RTSP
and M-JPEG over HTTP
so you can leverage certain libraries to visualize the feed, but again you will need documentation, specification and SDKs to find out the essential information.