Skip to main content

PtzControl

Application Guide

For a complete walkthrough of PTZ camera control with code examples, see the PTZ Camera Control application guide.

Controls PTZ camera movement including pan, tilt, zoom, focus, and iris adjustments. The movement action is specified in the URL path, and the speed is provided in the request body.

FieldValue
Endpoint/PtzControl[/channelId]/<action>
MethodPOST
ProductsIPC, NVR
Channel IDOptional (default 1)
ActionMovement command in URL path (see table below)

Available Actions

ActionDescription
UpTilt up
DownTilt down
LeftPan left
RightPan right
LeftUpPan left and tilt up simultaneously
LeftDownPan left and tilt down simultaneously
RightUpPan right and tilt up simultaneously
RightDownPan right and tilt down simultaneously
ZoomInZoom in (telephoto)
ZoomOutZoom out (wide angle)
NearFocus near
FarFocus far
IrisOpenOpen iris
IrisCloseClose iris
StopStop all current PTZ movement

Request Example

Send this XML body with the desired movement speed:

<?xml version="1.0" encoding="utf-8"?>
<actionInfo version="1.0" xmlns="http://www.ipc.com/ver10">
<speed>4</speed>
</actionInfo>

Parameters

ParameterTypeRangeDescription
speeduint321 - 8Movement speed. Use PtzGetCaps to confirm the valid range for your device.

URL Examples

# Pan left at speed 4
POST http://192.168.1.100/PtzControl/Left

# Zoom in on NVR channel 3
POST http://192.168.1.100/PtzControl/3/ZoomIn

# Stop all movement
POST http://192.168.1.100/PtzControl/Stop

Notes

  • Always send a Stop command to halt continuous movement. Pan and tilt actions continue until stopped.
  • The speed value must fall within the range returned by PtzGetCaps (controlMinSpeed to controlMaxSpeed). The typical range is 1-8.
  • On NVR systems, place the channel ID between PtzControl and the action: /PtzControl/3/Left.