Table Of Contents
VSMS Commands
Get VSMS Version
Get SDP Information for Video Stream
Camera Control
RTSP Stream from VSMS
VSMS Commands
Table 2-1 provides a summary of the Video Surveillance Media Server (VSMS) commands. Each command is described in detail in the section that is listed.
Get VSMS Version
http://host/info.bwt?type=version
Purpose
Retrieves the VSMS version.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
type=version
|
Version type. The version keyword specifies the version command type. The version keyword is a reserved value.
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <[Server version] or -1 or output>
[Server version] Successful completion of the URL command
-1 Error in execution of the URL command
Examples
The following example retrieves the VSMS version (for example, 5.1):
http://vsms.cisco.com/info.bwt?type=version
Get SDP Information for Video Stream
http://host/info.bwt?type=sdp&name=proxyName
Purpose
Retrieves the Session Description Protocol (SDP) information from a video stream.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
type=sdp
|
SDP type. The sdp keyword specifies the SDP command type. The sdp keyword is a reserved value.
|
name=proxyName
|
Proxy name where proxyName specifies the name of the proxy or archive. The valid value for proxyName is an alphanumeric string containing 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved proxyName value is -1.
Note Each proxy must have a unique name on a given VSMS host.
|
Return Values
A standard HTTP/1.x header followed by:
Content-Type: application/sdp
o=- 15011761763204733780 15011761763204733810 IN IP4 10.10.40.120
s=Cisco Live Media Streaming Session
a=fmtp:97
profile-level-id=4d4028;packetization-mode=0;sprop-parameter-sets=J01AKI2NKA8ARP9gIA==
,KO48gA==;width=1920;height=1088;4CIF=1
a=control:rtsp://10.194.66.120/live/cisco_hd
Examples
Retrieving SDP Information from a Proxy
The following command retrieves the SDP information for a proxy named ABC:
http://vsms.cisco.com/command.bwt?type=sdp&name=ABC
Retrieving SDP information from an Archive
The following command retrieves the SDP information for an archive named BCD:
http://vsms.cisco.com/command.bwt?type=sdp&name=BCD
Camera Control
http://host/camera.bwt?source=id@host&srctype=device&model=cameraModel&protocol=D
&comport=portNum&number=chainNum&priority=priorityNum
&command=cmdLetterOperand&button=macroName&speed=speedNum&ms=msTime
Purpose
Configures camera features (such as enabling or disabling backlight compensation or digital zoom) and controls camera functions (such as PTZ movement, iris control, and focus) through the network without having to know the low-level control protocols for specific cameras.
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
source=id@host
|
Video source where id@host specifies the channel number and IP address of a video source where the id value can be one of the following:
• Video input number of the IP camera or encoder. Valid values are 1 to 64.
• Video input number and feed number (separated by an underscore) of the IP camera or encoder. This option applies only to video sources that support dual streaming. Valid input number values are 1 to 64. Valid feed number values are 1 and 2.
• Name of the parent proxy. This option applies only to parent-child proxy configurations. The valid value is an alphanumeric string containing 1 to 256 of the following characters:
– Digits (0 to 9)
– Upper case letters (A to Z)
– Lower case letters (a to z)
– Underscore (_)
– Hyphen (-)
The reserved value is -1.
For example:
– 10.10.10.1
– 1@10.10.10.1
– 1_1@10.10.10.1.
The host value is the IP address or hostname (hostname.domain) for the video source. You can optionally specify a port number with the IP address or hostname. For example, to specify port 8080, use host:8080. If no port number is specified, port 80 is used by default.
Note For child proxies, the parent proxy name becomes the source.
|
srctype=device
|
Source type where device specifies the device to use as the media source for the proxy, such as a parent proxy, an encoder, or an IP camera. If the source is a parent proxy, the device value is proxy. For all other devices (encoders and IP cameras), the valid device values are listed in the Keyword column of Table B-1 in "Supported Media Devices."
The type of encoder or IP camera, which the module uses to select the appropriate device driver.
|
model=modelNum
|
The type of encoder or IP camera, which the module uses to select the appropriate device driver.
|
protocol=D
|
The particular variant of the camera control protocol for VSMS to employ. Only Pelco-D is supported. D is a reserved value.
|
comport=portNum
|
The encoder's serial port to which the camera is connected. This is required for analog cameras unless a proxy is provided. COM1 and COM2 are reserved values.
|
number=chainNum
|
The chain number for the camera. Valid values are 0 to 64.
|
priority=priorityNum
|
Assigns a priority for the current command. Each time a command is sent, the priority of the command is compared to the priority of the previous command. If the priority is lower than that of the previous command, it is rejected until a sufficient duration of time has passed since the previous command was executed. The default exclusive access is five minutes. This value can be modified in the PTZ Configuration section of the management console. The range of valid values is 1 to 100.
|
Required Fields
Operational Fields
command=cmdLetterOperand
|
Operational command. Defines a command to perform a camera control operation, such moving the camera, adjusting the camera focus, opening or closing the camera iris, and using camera position presets. An operational command is specified as a name-value pair using the following format:
command=cmdLetterOperand
where:
• The name is command.
• The value is cmdLetterOperand, which represents a single letter identifying the command to be executed and the operand for that command.
For example, command=F9 specifies a command to shift the camera focus farther away by a distance of 9.
Note Only one operational command or operational button should be specified in a camera control API command. That is, you should not use multiple operational commands, multiple operational buttons, or a mixture of operational commands and buttons in the same camera control API command.
The operational command values are described in Table 2-2 through Table 2-6.
|
button=macroName
|
Operational Button. Specifies the name of a macro defined for a camera that performs a camera control operation, such as moving the camera, adjusting the camera focus, and opening or closing the camera iris. An operational button is specified as a name-value pair using the following format:
button=macroName
where:
• The name is button.
• The value is macroName, which represents the name of the macro that is to perform a camera control operation.
For example, button=dzoom_on specifies a macro that enables digital zoom.
Note Only one operational command or operational button should be specified in a camera control API command. That is, you should not use multiple operational commands, multiple operational buttons, or a mixture of operational commands and buttons in the same camera control API command.
The operational button values are described in Table 2-2 through Table 2-5.
|
speed=speedNum
|
(Optional) Sets the pan and tilt speed for momentary PTZ movement commands. The range of valid values is 1 to 100, with 1 being the slowest speed and 100 being the fastest speed.
|
ms=msTime
|
(Optional) Transforms a continuous PTZ movement operational command to a momentary one. After a continuous PTZ movement operational command (command=_pSpeed,tSpeed,zSpeed) is sent, the server waits the time specified by the msTime value and then automatically issues a stop movement command to the camera. The range of valid values is 20 to 20000000 milliseconds.
|
Table 2-2 Configuration Values
Value
|
Type
|
Description
|
*
|
Command
|
Passes through a low-level, camera-specific command. All camera drivers support the pass through feature, but the interpretation of the operational command depends on the driver. For example, the following command passes through the low-level command that disables backlight compensation for PTZ cameras using the PelcoD protocol:
command=*00310001
Using the pass through feature is a way to use camera features that are not currently supported by VSM. To display the syntax for a particular model, find the appropriate entry in the camera PTZ XML file.
|
backlight_off
|
Button
|
Disables backlight compensation.
|
backlight_on
|
Button
|
Enables backlight compensation.
|
dzoom_off
|
Button
|
Disables digital zoom.
|
dzoom_on
|
Button
|
Enables digital zoom.
|
focus_auto
|
Button
|
Enables auto focus.
|
focus_manual
|
Button
|
Enables manual focus.
|
init
|
Button
|
Initializes the default PTZ control settings.
|
iris_auto
|
Button
|
Enables auto iris.
|
iris_manual
|
Button
|
Enables manual iris.
|
night_auto
|
Button
|
Enables auto night mode.
|
night_off
|
Button
|
Disables night mode.
|
night_on
|
Button
|
Enables night mode.
|
reset
|
Button
|
Resets the PTZ control settings.
|
wb_auto
|
Button
|
Enables auto white balance.
|
wb_indoor
|
Button
|
Enables indoor white balance.
|
wb_outdoor
|
Button
|
Enables Outdoor white balance.
|
wb_manual
|
Button
|
Enables Manual white balance.
|
Table 2-3 Focus Values
Value
|
Type
|
Description
|
Fdist
|
Command
|
Shifts the camera focus farther away specified by the dist value. The range of valid dist values is 0 to 9, where 0 is a short distance and 9 is a long distance.
|
Rdist
|
Command
|
Shifts the camera focus nearer specified by the dist value. The range of valid dist values is 0 to 9, where 0 is a short distance and 9 is a long distance.
|
far
|
Button
|
Focus farther away.
|
near
|
Button
|
Focus nearer.
|
Table 2-4 Iris Values
Value
|
Type
|
Description
|
DcloseNum
|
Command
|
Closes (dims) the camera iris specified by the closeNum value. The range of valid closeNum values is 0 to 9, where 0 is a small amount and 9 is a large amount.
|
EopenNum
|
Command
|
Opens (brightens) the camera iris specified by the openNum value. The range of valid openNum values is 0 to 9, where 0 is a small amount and 9 is a large amount.
|
bright
|
Button
|
Opens (brightens) the camera iris.
|
dim
|
Button
|
Closes (dims) the camera iris.
|
Table 2-5 PTZ Values
Value
|
Type
|
Description
|
Bdist
|
Command
|
Moves the camera down and left the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Hdist
|
Command
|
Pans the camera left the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Jdist
|
Command
|
Tilts the camera down the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Kdist
|
Command
|
Tilts the camera up the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Ldist
|
Command
|
Pans the camera right the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Ndist
|
Command
|
Moves the camera down and right the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Udist
|
Command
|
Moves the camera up and right the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Wdist
|
Command
|
Zooms the camera out the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Ydist
|
Command
|
Moves the camera up and left the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
Zdist
|
Command
|
Zooms the camera in the relative distance specified by the dist value. The range of valid dist values is 1 to 360, where 1 is a short distance and 360 is a long distance.
|
_pSpeed,tSpeed,zSpeed
|
Command
|
Starts continuous PTZ movement. The camera will continue to move at the speeds specified by the pSpeed, tSpeed, and zSpeed values until a subsequent command is issued (unless an ms=msTime parameter is supplied with this operational command). The range of valid speed values is -100 to 100, where:
• For the pSpeed value, negative values indicate pan left, and positive values indicate pan right.
• For tSpeed value, negative values indicate tilt down, and positive values indicate tilt up.
• For zSpeed value, negative values indicate zoom out, and positive values indicate zoom in.
• For all three values, -100 and 100 indicate the fastest movement, and 0 indicates a stop (no movement). For example, command=_0,0,0 stops all camera PTZ movement.
|
down
|
Button
|
Tilts the camera down.
|
downleft
|
Button
|
Moves the camera down and left.
|
downright
|
Button
|
Moves the camera down and right.
|
left
|
Button
|
Pans the camera left.
|
right
|
Button
|
Pans the camera right.
|
stop
|
Button
|
Stops all PTZ movement.
|
tele
|
Button
|
Zooms the camera in.
|
up
|
Button
|
Tilts the camera the camera up.
|
upleft
|
Button
|
Moves the camera the camera up and left.
|
upright
|
Button
|
Moves the camera up and right.
|
wide
|
Button
|
Zooms the camera out.
|
Table 2-6 Presets Values
Value
|
Type
|
Description
|
GpresetNum
|
Command
|
Moves the camera to the preset position specified by the presetNum value. Preset numbering starts at 1. Most cameras support at least 10 presets.
|
SpresetNum,label
|
Command
|
Assigns a preset number and text label to the current camera position, as specified by the presetNum and label values. Preset numbering starts at 1. Most cameras support at least 10 presets.
|
Examples
Starting Continuous PTZ Movement
The following example starts a continuous PTZ movement, with pan moving left at a speed of 75, tilt moving up at a speed of 50, and zoom moving in at a speed of 25:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=_-75,50,25
Stopping Continuous PTZ Movement
The following example stops continuous PTZ movement:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=_0,0,0
Stopping Continuous PTZ Movement After a Specific Amount of Time
The following example stops continuous PTZ movement after 1,250 milliseconds (1.25 seconds):
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=_-75,50,25
&ms=1250
Passing Through a Low-Level Camera-Specific Command
The following example passes through the low-level command that switches to manual iris control for a PTZ camera using the PelcoD protocol:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=*002D0002
Momentary Pan
The following example uses an operational command to perform a momentary pan left for a relative distance of 100:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=H100
The following example uses an operational command to perform a momentary pan left for a relative distance of 100 at a speed of 80:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=H100&speed=80
The following example uses an operational button to perform a momentary pan right:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&button=right
Momentary Tilt
The following example uses an operational command to perform a momentary tilt up for a relative distance of 125:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=K125
The following example uses an operational command to perform a momentary tilt up for a relative distance of 125 at a speed of 75:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=K125&speed=75
The following example uses an operational button to perform a momentary tilt down:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&button=down
Momentary Zoom
The following example uses an operational command to perform a momentary zoom out for a relative distance of 35:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=W35
The following example uses an operational command to perform a momentary zoom out for a relative distance of 35 at a speed of 50:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=W35&speed=50
The following example uses an operational button to perform a momentary zoom in:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&button=tele
Assigning a Preset
The following example assigns the current PTZ position to preset 1 and labels the preset as Front_Door:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=S1,Front_Door
Going to a Preset
The following example moves the camera to PTZ position preset 5:
http://vsms.cisco.com/camera.bwt?source=1@192.168.1.109&srctype=sony_snc_rz30
&model=sony_snc_rz30&protocol=D&comport=COM1&number=0&priority=100&command=G5
RTSP Stream from VSMS
rtsp://host/live/proxyName
rtsp://host/archive/archiveName
Purpose
Retrieves a Real Time Streaming Protocol (RTSP) stream from a proxy or archive for a third party video player.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
live/proxyName
|
The name of the proxy. The valid proxyName value is an alphanumeric string containing 1 to 256 of the following characters:
– Digits (0 to 9)
– Upper case letters (A to Z)
– Lower case letters (a to z)
– Underscore (_)
– Hyphen (-)
The reserved value is -1.
|
archive/archiveName
|
The name of the archive. The valid archiveName value is an alphanumeric string containing 1 to 256 of the following characters:
– Digits (0 to 9)
– Upper case letters (A to Z)
– Lower case letters (a to z)
– Underscore (_)
– Hyphen (-)
The reserved value is -1.
|
Examples
Retrieving an RTSP Stream from a Proxy
The following command retrieves an RTSP stream from proxy ABC for a 3rd party video player (such as VLC Player):
rtsp://vsms.cisco.com/live/ABC
Retrieving an RTSP Stream from an Archive
The following command retrieves an RTSP stream from archive BCD for a 3rd party video player (such as VLC Player):
rtsp://vsms.cisco.com/archive/BCD