How to forward PTZ instructions in C#

This article show you how to forward the Pan-Tilt-Zoom instructions to the Onvif camera through the server in C#.

What is PTZ?

An IP camera with pan-tilt-zoom (PTZ) functionalities is capable of directional and zoom controlling remotely. These systems can be remotely controlled by automated systems as well as users. The PTZ controls are generally sold separately without the cameras. To fully understand this article, you might have to study the How to implement PTZ IP camera motion control in C# chapter.

the ptz path from clients to camera
Figure 1 - The PTZ path from clients to camera

How to send PTZ instructions through the server?

An avarage camera lets one or two clients to stream at the same time but this problem is easy to solve with Ozeki Camera SDK. With this you can create a server application which handles your clients. By using this, lots of clients will be able to connect to the server and you can make it possible to stream to multiple users at the same time. Usually, more than one people want to use the same camera, so it is possible to the camera channel fills quickly. Using a server application these limitations will be gone.

If the server is connected to the camera which is able to PTZ, then the client sends the PTZ command and the server can move the camera according to it (Figure 1). Multiple clients can control the same camera at the same time so it is recommended to install regulations of PTZ-ing to your server.

Related Pages

FAQ

Below you can find the answers for the most frequently asked questions related to this topic:

  1. I have not managed to build the solution. How to solve it?

    • Please set the Target framework property of the project to .NET 4.0.
    • You should add the OzekiSDK.dll to the references of the solution.
    • Please import the missing classes.
  2. Why is the camera moving, when I am not using it?

    It is possible that someone else is also using the camera.

  3. Why cannot I turn the camera in bigger angle than the current?

    Because all camera have a limit in rotation.

More information