ACTi Camera URL Commands ACTi Knowledge Base

ACTi Camera URL Commands  ACTi Knowledge Base
Category: Design & Spec Note
Sub-category: Integration, Application
Model: All Cameras
Firmware: All
Software: N/A
Author: Ando.Meritee
Published: 2012/03/27
Reviewed: 2012/03/27
ACTi
Knowledge Base
ACTi Camera URL Commands
Contents
Introduction
How Does URL Command Look Like
Camera Sending URL Commands to Itself
。
。
Frequently Used URL Commands
Hands-on Practice
Camera Sending URL Commands to another Camera
。
Hands-on Practice
Interaction between Camera and Website over WA N
。
Frequently Used URL Commands
Convenient Installation & Configuration using URL Commands
。
。
Frequently Used URL Commands
Hands-on Practice
Introduction
The communication language of ACTi cameras is very simple – it consists of clearly
understandable text based c ommands. Since th e receiver of the commands is usually the
built-in web server within the camera, those texts are also called URL commands. By using
URL commands it is possible to change the configuration of the camera, check the status of
any of the services or alarms, request video or snapshots, and much more.
While the most common usage of URL commands is ACTi camera integration with video
management systems, the simplicity of the commands allows them to be used in variety of
practical applications even for thos e who have no previous experience in text-based camera
control.
The most frequently used applications that can take a good use of URL commands are relat ed
to event management – by using the URL commands within the Event Handler system of the
camera it is possible to change the system or video settings or change the PTZ position of the
camera itself or any other ACTi camera upon triggered events.
That’s not all – it is even possible to integrate ACTi cameras with web applications by using
1
www.acti.com
URL commands. You could easily create a web page by which you can dis play the list of
camera events, snapshots or live video from the camera or change the camera settings by
pressing the buttons on your custom made website.
Last, but not least – URL commands help save lots of camera installation time. Instead of
repeating same configuration steps on multiple cameras, such as full-screen motion detection
region setup, it is possible to take a good use of ACTi IP Utility 4 that allows configuration of
any parameters on multiple devices at the same time by using URL commands.
The following chapters are divided into two main parts – the practical applications for the
end user daily surveillance purpose and convenient installation tips for system
integrators using URL commands.
2
www.acti.com
How Does URL Command Look Like
Before going int o details of URL command applications, let ’s see how a typical URL command
would look like. Below is the example of the URL command that changes the camera’s frame
rate to 1 fps.
http://172.16.26.92:80/cgi-bin/encoder?USER=Admin&PWD=123456&VIDEO_FPS_NUM=1
IP address & port
The
target
CGI
of target camera
program inside the
password that have
(forcing the camera to 1
camera to receiv e
permission to send
fps immediately after it
the command
given URL command
receiv es the command)
User
name
and
The
actual
command
It is possible to send multiple commands with one URL command line by separating them
with “& ” symbol. For example, if the user wants to change both frame rate and bitrate at the
same time, it is possible to write the ending of the URL command this way:
…&VIDEO_FPS _NUM=1&V IDE O_B ITRATE=500K
If it is necessary to have encrypted user name and password, it is possible to use following
URL command syntax:
http://172.16.26.92:80/cgi-bin/cmd/encoder?VIDE O_FPS_NUM=1
Will prompt to require user name
and password that will be encrypted
If you are working with the multi-channel device (including multi-channel encoders, dual
stream media 1 and media 2, KCM series 4VGA and 6VGA) the channel number has to be
added. For channel 1, you may omit the channel command or have it as CHANNEL=1.
http://172.16.26.92:80/cgi-bin/cmd/encoder?CHANNEL=2&VI DEO_FPS _NUM=1
The target of this URL command is channel 2.
For dual stream camera it means media 2.
3
www.acti.com
Camera Sending URL Commands to Itself
With the help of the Event Handler function inside the camera it is possible to change the
camera settings or PTZ position automatically whenever the scheduled or alarm event is
triggered. For example, the camera changes its frame rate from maximum to 1fps together with
lowering the bitrate upon day to night switch, in order to save the recording storage space
during night time.
Such changes are possible thanks to URL commands. When the URL command is written in
the Event Handler rule, it will be executed when the event is triggered. The camera would then
send the URL command to itself to force itself to take pre-defined actions. There are thous ands
of combinations of URL commands that can be used with Event Handler system.
Example 1: Use URL commands in Event Handler to set camera on 12 fps when there is
a motion alarm and set it back to 2 fps when the event ends 30 seconds later.
4
www.acti.com
Example 2: Allow access for certain user only for a limited period of time. If you wish a
certain user to have a visitor access to your camera every Wednesday bet ween 2p.m. -3p.m.
then you c an first create the user account and then manage its password by event handler.
Then, notify the user of the name and password that is activated during given period of time.
It is a secure method because the user itself will not be able to access the setup page of the
camera to do any Event Handler configurations. Only Admin account can do it.
Please note that in this case, the system cgi is used as a target of URL command instead of
encoder cgi, as it changes the system settings, not video settings.
Prepare the following URL commands to change
User 1 password:
/cgi-bin/cmd/system?ACCO UNT_ USE R_PAS SWORD_1 =123
/cgi-bin/cmd/system?ACCO UNT_ USE R_PAS SWORD_1 =asdfgh
With these settings, the user can login using the name “visitor” and password “123” on
Wednesdays between 2p.m.-3p.m.
Do you want to check which names and passwords exist in the camera system?
Simply type the following URL to browser ’s address bar (using your camera IP instead):
http://172.16.26.92:80/cgi-bin/cmd/system?ACCOUNT
5
www.acti.com
Example 3: Show alarm message as text overlay when digital input is triggered.
It would be useful to display the alarms of digital input
as text overlay – this way the exact moment of the
event trigger will be recorded as a visual evidence
right wit hin the video clip.
The instruction below explains how to take a good
use of URL commands to display “ALARM1-ON” text on video for 5 seconds whenever digital
input 1 is triggered. It is especially useful for the cases when the third party VMS does not
support the event management of digital inputs of the camera.
Prepare the following URL commands to turn on and off the
text overlay:
/cgi-bin/cmd/encoder?OSD_FORMAT=1,1,ffffff,100,TOP,%U,ALARM1-ON
/cgi-bin/cmd/encoder?OSD_FORMAT=1,0,ffffff,100,TOP,%U,ALARM1-ON
Set DI 1 interval as 5 seconds. This
is how long the DI event will be
active.
For the detailed explanation of the URL commands used in this example, please refer to the list
of URL commands at the end of this chapter.
6
www.acti.com
FREQUENTLY USED URL COMMANDS
Video Settings
Objective
Receiver
cgi
program
Command with example parameters
Allowed parameters
Change the video
resolution
encoder
VIDEO_RESOLUTION=N1280x1024
Change the frame rate
encoder
VIDEO_FPS_NUM=15
Change the (average)
bitrate for H.264 or
MPEG-4 (for CBR*)
encoder
VIDEO_BITRATE=2M
Change the maximum
bitrate for H.264 or
MPEG-4 (for CBR*)
encoder
VIDEO_MAX_BITRATE=2M
One of the bitrates of the
camera between 28K and 6M, or
UNLIMITED**
encoder
VIDEO_MJPEG_QUALITY=60
1~100
encoder
VIDEO_MPEG4_QUALITY=HIGH
HIGH, MIDDLE, LOW, NONE (if
NONE, then the average or max
bitrate is used instead = CBR*)
encoder
VIDEO_H264_QUALITY=HIGH
HIGH, MIDDLE, LOW, NONE (if
NONE, then the average or max
bitrate is used instead = CBR*)
encoder
VIDEO_GOP=5
0~60 (0 means GOP length =
current frame rate)
encoder
VIDEO_ENCODER=MPEG4
MJPEG, MPEG4, H264
Change the streaming
mode
encoder
VIDEO_STREAM=DUAL
SINGLE, DUAL, EPTZ,
MD_PRESET, 4VGA, 6VGA,
SEQUENTIAL, QUAD
Change video settings
of other channels
encoder
CHANNEL=2&…. (include any command
from above)
One of the supported channel
numbers of the device
Change the video
quality (bitrate) for
MJPEG
Change the video
quality (bitrate) for
MPEG-4 (for VBR*)
Change the video
quality (bitrate) for
H.264 (for VBR*)
Change the GOP
length for MPEG-4 or
H.264 (for VBR*)
Change the
compression
One of the resolutions of the
camera**
One of the frame rates of the
camera**
One of the bitrates of the
camera between 28K and 6M, or
UNLIMITED**
* CBR = constant bitrate mode; VBR = variable bitrate mode
** You may use system?SYSTEM_INFO URL command to find out all available parameters for giv en function
Audio Settings
Objective
Enable Audio-in
Receiver
cgi
program
system
Command with example parameters
Allowed parameters
V2_AUDIO_ENABLED=1
1 (enabled), 0 (disabled)
Audio-in sensitivity
system
AUDIO_IN_SENSITIVITY=HIGH
LOW (0dB boost), HIGH (20dB)
Audio-in format
Audio-out volume
system
system
AUDIO_IN_FORMAT=PCM
AUDIO_OUT_VOLUME=50
PCM, G711A, G711U
0~100
7
www.acti.com
Im age Settings
Objective
Receiver
cgi
program
Command with example parameters
Allowed parameters
Brightness
encoder
VIDEO_BRIGHTNESS=60
1~100
Contrast
Saturation
encoder
encoder
VIDEO_CONTRAST=60
VIDEO_SATURATION=60
1~100
1~100
White Balance Mode
encoder
VIDEO_WB_MODE=AUTO
AUTO, INDOOR1, INDOOR2,
OUTDOOR1, OUTDOOR2,
HOLD, MANUAL
Manual White Balance
Settings
encoder
VIDEO_WB_GAIN=128,128
1.
2.
Exposure Mode
encoder
VIDEO_EXPOSURE_MODE=AUTO
Shutter Mode
encoder
VIDEO_SHUTTER_MODE=AUTO
AUTO, MANUAL
encoder
VIDEO_EXPOSURE_GAIN=128
1~255
encoder
VIDEO_SHUTTER_SPEED=60
(it means 1/60s)
13, 15, 30, 60, 120, 25, 50, 100, 250,
Exposure Reference
Target
Shutter Speed for
Manual Mode
Slowest Shutter Speed
R-Gain 1~255
B-Gain 1~255
AUTO, MA NUAL, IRIS_P RIO RITY,
SHUTTE R_ PRIO RITY
500, 1000, 2000, 5000, 10000
Settings of CMOS ; CCD
0: sensor’s default setting
1: 1/60 or 1/50 s ; 1/500s
2: 1/30s or 1/25s ; 1/250s
3: 1/10s ; 1/120s or 1/100s
4: 1/5s ; 1/60s or 1/50s
5: 1/120 or 1/100 ; 1/30 or 1/25
6: 1/250s ; 1/15 or 1/10s
7: 1/500 ; 1/5
8: 1/1000 ; 1
9: 1/2000 ; 2
10: 1 ; 3
11: 2 ; 4
12: 3 ; N/A
13: 4 ; N/A
14: 1/15 or 1/13 ; N/A
1~255
AUTO, MANUAL
encoder
VIDEO_MAX_SHUTTER=4
AGC Target Gain
Iris Mode for Auto Iris
encoder
encoder
VIDEO_AGC_GAIN=55
VIDEO_IRIS_MODE=AUTO
Set DC level for DC iris
lens
encoder
VIDEO_DC_LEVEL=123
Set specific F-number
for DC iris that has
controllable F-stops
encoder
VIDEO_IRIS=F40
(means F4.0)
P-Iris
encoder
PIRIS_OPTION=1
F220 (means F22.0), F190,
F160, F140, F110, F96, F80,
F68, F56, F48, F40, F34, F28,
F24, F20, F18, F16, F14, F10
1 (enabled), 0 (disabled)
BLC
encoder
VIDEO_BLC_MODE=1
1 (enabled), 0 (disabled)
Mirror
Flip
encoder
encoder
VIDEO_MIRROR_MODE=1
VIDEO_FLIP_MODE=1
1 (enabled), 0 (disabled)
1 (enabled), 0 (disabled)
Limit for Auto Mode
The range depends on the
camera type
2D DNR
encoder
VIDEO_DNR=1
KCM C1 ISP:
1 (enabled), 0 (disabled)
KCM C2 or C3 ISP:
1~4 (levels ), 0 (disabled)
3D DNR
Defogging
encoder
encoder
VIDEO_3DNR=1
VIDEO_DEFOG=2
1 (enabled), 0 (disabled)
1~4 (levels ), 0 (disabled)
WDR / ExDR
encoder
VIDEO_WDR=AUTO,120,0
1.
2.
3.
Sharpness
KCM image settings
reset to factory default
encoder
VIDEO_SHARPNESS=192
1~255
encoder
IMAGE_QUALITY_RESET
-
8
AUTO, ON, OFF
0~255 (day level)
0 (night level)
www.acti.com
OSD & Motion Detection Settings
Objective
Manage the
On-Screen Text
Receiver
cgi
program
Command with example parameters
encoder
OSD_FORMAT=1,1,ffffff,0,TOP,%U,test
Manage the Privacy
Masks
encoder
PRIVACY_REGION=1,1,ffddaa,100,100,
300,400
(using URL command, any color is
selectable, while UI only has 4 colors)
Motion Detection
System Activ ation
encoder
MOTION_ENABLED=0x01
Motion Detection
Region Management
MOTION_CONFIG=
1,1,0,0,1279,959,70,5,10
encoder
(MOTION_ENABLED has to be 0x01 in
order to have regions take effect)
Allowed parameters
1.
2.
3.
4.
5.
6.
7.
Region: 1~4
State 0,1 (disable, enable)
Color: 000000~ffffff
Transparency: 0~100
Position: TOP, BOTTOM
Format: %U is user’s text
String: Content of text
1.
2.
3.
4.
1.
2.
Region: 1~4
State 0,1 (disable, enable)
Color: 000000~ffffff
Coordinates (pix els)
Disable: 0x00
Enable: 0x01
1.
2.
3.
4.
5.
6.
Region: 1~3
State 0,1 (disable, enable)
Coordinates (pix els)
Sensitivity:0~100
Timer: 0~300
Threshold: 0~100
TCM Series Night Profile Video Settings
Objective
Adjust the video
settings of the night
profile of TCM series
cameras
Receiver
cgi
program
Command with example parameters
Same parameter range as …
encoder
encoder
NIGHT_MPEG4_QUALITY=…
NIGHT_H264_QUALITY=…
VIDEO_MPEG4_QUALITY
VIDEO_H264_QUALITY
encoder
NIGHT_MJPEG_QUALITY=…
VIDEO_MJPEG_QUALITY
encoder
encoder
NIGHT_BITRATE=…
NIGHT_MAX_BITRATE=…
VIDEO_BITRATE
VIDEO_MAX_BITRATE
encoder
NIGHT_GOP=…
VIDEO_GOP
encoder
encoder
NIGHT_FPS_NUM=…
NIGHT_WB_MODE=…
VIDEO_FPS_NUM
VIDEO_WB_MODE
encoder
NIGHT_WB_GAIN=…
VIDEO_WB_GAIN
encoder
encoder
NIGHT_EXPOSURE_MODE=…
NIGHT_EXPOSURE_MODE=…
VIDEO_EXPOSURE_MODE
VIDEO_EXPOSURE_GAIN
encoder
NIGHT_AGC_GAIN=…
VIDEO_AGC_GAIN
encoder
encoder
NIGHT_SHUTTER_MODE=…
NIGHT_SHUTTER_SPEED=…
VIDEO_SHUTTER_MODE
VIDEO_SHUTTER_SPEED
encoder
NIGHT_MAX_SHUTTER=…
MAX_AUTO_SHUTTER
encoder
encoder
NIGHT_IRIS=…
NIGHT_IRIS_MODE=…
VIDEO_IRIS
VIDEO_IRIS_MODE
encoder
NIGHT_DC_LEVEL=…
VIDEO_DC_LEVEL
encoder
encoder
NIGHT_SHARPNESS=…
NIGHT_BRIGHTNESS=…
VIDEO_SHARPNESS
VIDEO_BRIGHTNESS
encoder
NIGHT_CONTRAST=…
VIDEO_CONTRAST
encoder
NIGHT_SATURATION=…
VIDEO_SATURATION
9
www.acti.com
Day and Night Control
Objective
Day & Night Mode
Day to Night switch
threshold
Night to Day switch
threshold
IR LED control
Timer to avoid fals e
day & night switches
Set the day & night
detection source
Receiver
cgi
program
encoder
encoder
encoder
Command with example parameters
VIDEO_DAYNIGHT_MODE=AUTO
NIGHT_GAIN_THD=90
(only works in AUTO mode)
DAY_GAIN_THD=75
(only works in AUTO mode)
Allowed parameters
AUTO, DAY, NIGHT
0~100
0~100
encoder
VIDEO_DN_IRLED=1
1 (IR LED follows D/N switches)
0 (IR LED will not be controlled
upon D/N switches)
encoder
VIDEO_DN_TIMER=10,10
1.
2.
encoder
VIDEO_DN_TYPE=CDS
CDS, DSP
Night-to-day timer (0~255s)
Day-to-night timer (0~255s)
PTZ and Focus
Objective
Continuous Zoom
Receiver
cgi
program
encoder
Command with example parameters
ZOOM=DIRECT,300
or
ZOOM=TELE,6
or
ZOOM=STOPS
(KCM-5211 zoom range is 30-2520)
(Check range by ZOOM_CAP_GET)
(Current pos by ZOOM_POSITION)
Stepped Zoom
encoder
STEPPED_ZOOM=TELE,100
Stepped Focus
encoder
STEPPED_FOCUS=NEAR,10
FOCUS=DIRECT,800
(focus has to be in MANUAL mode for
this command)
Focus
encoder
(KCM-5211 focus range is 1029~221)
(Check range by FOCUS_CAP_GET)
(Current pos by FOCUS_POSITION)
Pan and Tilt Move
encoder
MOVE=UPLEFT,5,5
10
Allowed parameters
Exact positioning: DIRECT,n (n
is a decimal for zoom position)
Zooming in: TELE,n (n is the
zoom speed between 2~7)
Zooming out: WIDE,n (n is the
zoom speed between 2~7)
Stop zooming: STOP
1.
2.
1.
2.
TELE, WIDE (dir ection)
1~255 (step size)
NEAR, FAR (dir ection)
1~255 (step size)
STOP (stop focus action)
FAR (shift focus to far)
NEAR (shift focus to near)
AUTO (adjust focus all the time)
MANUAL (manual focus mode)
ZOOM_AF (refocus when zoom)
REFOCUS (refocus w/o zoom),
DIRECT,n (exact focus location;
n is a decimal for focus position)
UP,n (n is tilt speed 1~5)
DOWN,n
LEFT,m (m is pan speed 1~5)
RIGHT,m
UPLEFT,m,n
UPRIGHT,m,n
DOWNLEFT,m,n
DOWNRIGHT,m,n
STOP
HOME
www.acti.com
PTZ and Focus
1.
2.
POSITION=ABSOLUTE,100,100,5,5
Pan and Tilt Go to
Specific Location
encoder
(Current pos by XYZ_POSITION_GET
as decimal, or POSITION_GET as
hexadecimal)
3.
4.
5.
PTZ Home Position
encoder
ABSOLUTE, RELATE
-32767~32767 (ACM,KCM)
or 0~32767 (TCM) (pan
position)
-32767~32767 (ACM,KCM)
or 0~32767 (TCM) (tilt
position)
1~5 (pan speed)
1~5 (tilt speed)
1 (set current position as home)
0 (clear the home position)
HOME_POS=1
1.
PTZ_PRESET_SET=1,1,100,100,100,3
5,5,7,10,Door1
Set PTZ Preset Point
encoder
(Check existing PTZ preset points by
PTZ_PRESET_GET)
Go to PTZ Preset
Point
encoder
PTZ_PRESET_GO=1
ZOOM_PRESET_SET=1,1,1,30,306
Set Zoom Preset Point
encoder
1~32 (ACM), 1~64 (others)
(ID of preset point)
2. 1 (create), 0 (delete)
3. Decimal pan position
4. Decimal tilt position
5. 0~65535 (zoom position)
6. 5 (fixed max pan speed)
7. 5 (fixed max tilt speed)
8. 7 (fixed max zoom speed)
9. 10 (fixed dwell time,
unused by system)
10. Name of preset point
(maximum length 31)
1~32 (ACM), 1~64 (others) (ID
of preset point)
1.
2.
3.
(Check existing Zoom preset points by
ZOOM_PRESET_GET)
(For cameras with zoom lens)
4.
5.
Go to Zoom Preset
Point
ZOOM_PRESET_GO=1
encoder
1~64 (ID of zoom preset point)
(For cameras with zoom lens)
1.
2.
3.
Set Scanning
(Auto-pan)
Tour
1~64 (ID of preset point)
1 (enabled), 0 (disabled)
1 (use current zoom and
focus as preset position), 0
(use the focus and zoom
position
defined
by
following 2 parameters)
0~65535 (absolute position
of zoom)
0~65535 (absolute position
of focus)
encoder
PTZ_TOUR_SCAN=1,0,-32767,32767
4.
11
1~5 (pan speed)
1 (counter-clockwise), 0
(clockwise). Non-endless
pan cameras ignore this.
-32767~32767 (left limit. If
value is bigger than camera
limit, maximum camera left
pan is used)
-32767~32767 (right limit. If
value is bigger than camera
limit, maximum camera
right pan is used)
www.acti.com
PTZ and Focus
1.
2.
7.
8.
9.
1~10 (ID of tour)
1~32 (ACM), 1~64 (others)
(ID of preset point slot
within tour), 0 (delete all
the preset points from
given tour)
1 (enable tour), 0 (delete
tour)
1~32 (ACM), 1~64 (others)
(ID of preset point defined
by PTZ_PRESET_SET)
1~128 (dwell time, sec)
Sequence ID. Not used.
Keep it same as 2nd
parameter.
1~5 (pan speed)
1~5 (tilt speed)
2~7 (zoom speed)
PTZ_TOUR_NAME=1,daytour
1.
2.
1~10 (tour ID)
Tour name
3.
Add PTZ Preset Point
into Tour
encoder
PTZ_TOUR_SET=2,30,1,1,10,30,5,5,7
4.
5.
6.
Set name of the PTZ
Tour
encoder
Start or Stop the Tour
encoder
PTZ_TOUR_STATE=TOUR1
DISABLE, TOUR1, TOUR2,
TOUR3,
TOUR4,
TOUR5,
TOUR6,
TOUR7,
TOUR8,
TOUR9, TOUR10, SCAN
Auto speed for Pan
and Tilt according to
Zoom position
encoder
PTZ_AUTO_SPEED=1
1 (enabled), 0 (disabled)
Alarm
Objective
Receiver
cgi
program
Activate Digital Output
encoder
Command with example parameters
Allowed parameters
1.
2.
SET_DO=1,1
1 or 2 (DO1 or DO2)
1 (high), 0 (low)
Account Management
Objective
Change the root
account & password
Change the user 1
account & password
Receiver
cgi
program
Command with example parameters
Allowed parameters
system
ACCOUNT_ROOT=Admin,123
Type any name and password
system
ACCOUNT_USER_1=visitor,123
Type any name and password
12
www.acti.com
HANDS-ON PRACTICE
TASK 1
Normally there are beige color privacy ma sks covering t he discreet items in the office, such
as the computer screen, etc. When the panic button i s pre ssed by the user at the camera
site, all the privacy masks are removed for capturing the evidence of the intrusion until the
panic button is released. How to set it all up?
TASK 2
I want the motion detection regions t o be in di fferent locations for daytime and night time.
How to do that?
TASK 3
I have a cube camera with built-in microphone. Although I wish to have video stream from t he
camera to VMS 24 hours a day, I don’t want the conversations to be listened and recorded
during office hours for privacy reasons. However, during night time and weekends, the
audio-in should be enabled to capture the sounds of potential intruders. How to do that?
TASK 4
I have an optical zoom camera. When the door is opened ac ross the corridor, the digital input
of the camera will get the alarm signal and the camera zooms in to the door area in order to
capture clear details of the intruder. How do set it up?
TASK 5
I have a PTZ camera. During office hours, I want the camera to run the tour between three
important locations. The rest of the time, the camera should be pointed at location 1 only.
13
www.acti.com
Camera Sending URL Commands to another Camera
The beauty of Event Handler and URL commands is the possibility of managing not only the
camera that is the source of the event, but in fact any ACTi camera within the network. When
there is an intrusion in the camera site, we might want all the neighboring cameras within the
site have certain response – either letting them have more advanced streaming settings for
better video quality, or requesting nearby PTZ cameras to point towards the region of intrusion
automatically.
Since all the URL commands that can be used for communication between two cameras
have already been listed in previous chapter, we will only list one example here for your
reference, to get the idea how easy it is to set it up.
Compared to camera sending URL commands to itself, sending URL commands to other
cameras has only 1 slight difference – instead of using camera’s own IP as the target, the other
camera’s IP will be used instead. The rest is exactly the same.
Example 1: Command the PTZ camera to turn towards the region of intrusion (“Left
Door”) when the fixed camera of that region has detected motion. When event ends, go
back to “Normal Position”.
PTZ Camera Settings (to be the receiver of commands later)
The PTZ camera in our example has an IP address 172.16. 26.99.
First, create preset points. The camera will be normally staying at “Normal Position” preset
point when there is no event.
14
www.acti.com
Fixed Camera Settings (to be the one to detect motion and send commands)
Set the IP of PTZ camera as a target IP in
Event Handler of the fixed camera.
Prepare the following URL commands to
control the PTZ preset points of the other
camera:
/cgi-bin/cmd/encoder?PTZ_PRESET_GO=1
/cgi-bin/cmd/encoder?PTZ_PRESET_GO=3
HANDS-ON PRACTICE
TASK 1
We would like to have all the lights turned on for better exposure of the intruder whenever there
is motion detected at night. Technically, it is possible to control the lights system of the area
through t he digital output of the cameras. For the convenience of installation, we would like to
do the wiring of the digital output using the closest camera to t he lights system switches.
However, that camera is not necessarily the one to detect the intrusions. Therefore, we might
have the situations where one camera would detect motion, and then command the other
camera that is connected to the lights system by digital output to turn on all the lights in the
area. How to se t up the system so that whenever one camera detects the motion, it can
activate the digital output of the other camera?
15
www.acti.com
Interaction between Camera and Website over WAN
Since the IP cameras are pure network devices, just like any other computers online, it is really
easy to integrate them with FTP, mail or web servers. The possibility to integrate with web
servers gives the whole new range of useful applications.
There are three kinds of interactions between camera and Web server:
1.
Camera sends data (event information) to Web server upon camera events. Web
server might store the retrieved data.
2.
Web server or client requests data (snapshots, system status) from the camera
either periodically or by user’s request. Web server might store the ret rieved data.
3.
Web server or client commands the camera to take certain actions or change
settings
At the same time, we should keep in mind that the camera itself should not be treated as a
multi-user server – in ideal concept there should be only one session between Web server and
the camera. It is strongly advised not to get multiple video streams from the camera – it is best
to get just 1 video stream from the camera and then manage the video dis tribution on web
server side.
16
www.acti.com
Example 1: Turn on the lights by pressing the button on the Web page. Having the digital
output of the camera connected to lights system, it is possible to turn the lights on or off
remot ely. To do that, we have to prepare two URL commands – one for turning on the lights,
and the other one for turning off the lights.
To turn on the lights (set digital output 1 as “high”):
http://172.16.26.127/cgi-bin/encoder?USER=Admin&PWD=123456&SET_DO=1, 1
To turn off the lights (set digital output 1 as “low”):
http://172.16.26.127/cgi-bin/encoder?USER=Admin&PWD=123456&SET_DO=1, 0
There are many ways to implement these URL commands within the web page either by using
pure HTML code only, or more advanc ed methods, such as Ajax . The example code below is
quite simple to have your first lights controller ready.
<html>
<head>
<title>Lights Control</title>
<script language="Javascript">
function switcher(st) {
var a="http://172.16.26.127/cgi-bin/encoder?USER=Admin&PWD=123456&SET_DO=1," + st;
window.urltarget.location=a;
}
</script>
</head>
<body>
<button OnClick="switcher(1);">Lights ON</button>
<button OnClick="switcher(0);">Lights OFF</button>
<iframe name="urltarget" width="0" height="0" frameborder="0"></iframe>
</body>
</html>
17
www.acti.com
Example 2: Get snapshots from the camera and show directly within the web page. It is
possible to define the quality and resolution of the snapshot. When the specific resolution of
the snapshot is requested, it has to be one of the supported resolutions of the camera;
otherwise the snapshot request will be ignored by the camera.
In this example, we are using 1.3 -Megapixel camera which supports following resolutions:
1280x1024, 640x480, 320x 240, 160x112. Our aim is to get the snapshot with the VGA
resolution (640x480) with the best possible quality (100).
We will prepare the following URL command:
http://172.16.26.127/cgi-bin/encoder?USER=Admin&PWD=123456&SNAPSHOT=N640x480,100&DUM
MY=n
, where n will be a different number eac h time, to force browser to get a snaps hot from t he
camera instead of using browser’s own cache. The DUMMY command is specially designed
command for such purposes – the camera will accept it and ignore its parameters.
<html>
<head>
<title>Snapshot</title>
<script language="Javascript">
var counter=0;
function snapshot() {
var a="http://172.16.26.127/cgi-bin/encoder?USER=Admin&PWD=123456&SNAPSHOT=N640x480,100&DUMMY=" +
counter;
document.images.img.src=a;
counter++;
}
</script>
</head>
<body>
<button OnClick="snapshot();">Get a Snapshot</button><br/>
<img border="1" width="640" height="480" name="img"
src="http://172.16.26.127/cgi-bin/encoder?USER=Admin&PWD=123456&SNAPSHOT=N640x480,100">
</body>
</html>
18
www.acti.com
Example 3: Show live video from the camera right within the browser without any
Acti veX control s or other plug-ins. Several browsers (Firefox, Chrome, Safari) are able to
decode MJPEG video wit hout requiring any plug-ins. Please note that the video has to be
clean sequence of JPEG images without any additional information. To achieve that, there are
3 settings to be adjusted:
1.
Set the compression type to MJP EG (VIDE O_E NCODE R=MJPEG)
2.
Di sable audio-in (V2_AUDIO_ENAB LED=0)
3.
Di sable B2 frames (ACTi propriet ary protocol, RTP_B 2=1)
After these 3 steps, it is possible to get video stream from the camera with a single URL
command. It is also possible to make further adjustments before starting the video streaming,
such
as
choosing
specific
resolution
(VIDEO_RESOLUTION)
or
frame
rate
(VIDEO_FPS_NUM). Make sure that you only use supported resolution and frame rate.
With the implement ation of <iframe> tag in t he html code, it is possible to see camera
responses upon successful changes of settings.
When everything is done, you may use GET_STREAM command to start video streaming.
<html>
<head>
<title>Video Streaming</title>
</head>
<body>
<button
OnClick="window.urltarget.location='http://172.16.26.127/cgi-bin/system?USER=Admin&PWD=123456&V2_AUDIO_ENABLED=0';">
Disable Audio </button>
<button OnClick="window.urltarget.location='http://172.16.26.127/cgi -bin/system?USER=Admin&PWD=123456&RTP_B2=1';">
Disable B2 Frames </button>
<button
OnClick="window.urltarget.location='http://172.16.26.127/cgi -bin/encoder?USER=Admin&PWD=123456&VIDEO_ENCODER=MJPEG';">
Set MJPEG Compression </button>
<button
OnClick="window.urltarget.location='http://172.16.26.127/cgi -bin/encoder?USER=Admin&PWD=123456&VIDEO_RESOLUTION=N640x48
0';"> Set VGA Resolution </button>
<button
OnClick="window.urltarget.location='http://172.16.26.127/cgi -bin/encoder?USER=Admin&PWD=123456&VIDEO_FPS_NUM=2';"> Set 2
fps </button>
<button
OnClick="window.videotarget.location='http://172.16.26.127/cgi-bin/encoder?USER=Admin&PWD=123456&GET_STREAM';"> START
VIDEO STREAMING </button>
<br/>
<iframe name="urltarget" width="300" height="50" frameborder="0"></iframe>
</br/>
<iframe name="videotarget" width="660" height="500" fra meborder="0"></iframe>
</body>
</html>
19
www.acti.com
Example 4: Camera sends intrusion alarms to web server and web server logs all the
events into database and li sts the reports to web users whenever they open the web
page. This application does not require any specific ACTi URL commands since the receiver of
the messages is the web server, not the camera. The developer of the web page can f reely
decide the format of the message and how it will be handled by the web server.
Let’s say that you have a web hosting service (for example wit h IP 123. 123. 123.123) that
supports php and mysql database. You could then create a php that writes a record into a
mysql database each time it is called. In order to be more specific, the query would contain a
variable with some text, describing the nature of the event. For example, we have a php file that
accepts a variable name “event ” within the query string. When camera det ects the motion, it
would send out following query (the text MD1_triggered is chosen freely ):
http://123.123.123.123/event.php?event=MD1_triggered
And when the event ends, the camera would send another query to the web server:
http://123.123.123.123/event.php?event=MD1_end
When the server receives the query, it would write it into the database together wit h current
date and time of the server. There will also be a specific web page that would list the report of
all the events, retrieved from the database. It might look something like this:
Having prepared everything on the web server side, it is time to configure the Event Handler of
the camera to send out the above listed commands whenever motion is detected.
20
www.acti.com
21
www.acti.com
FREQUENTLY USED URL COMMANDS
Most of the frequently used URL commands have already been introduced in the chapt er
“Camera Sending URL Commands to Itself”. Here we will only list the URL commands that
are specifically used for web integration.
Video and Audio
Objective
Receiver
cgi
program
Get live video or audio
stream
encoder
GET_STREAM=VIDEO
Can be without parameters, or:
VIDEO, AUDIO
encoder
GET_DI_STATE
-
encoder
GET_CTRL_MSG
-
Check the status of
digital input
Request camera to
send the notification of
DIs, motion, video loss
and serial output data
to the remote host
Command with example parameters
Allowed parameters
Get a snapshot
encoder
SNAPSHOT=N640x480,100
Can be without parameters (in
which case it follows camera’s
MJPEG codec settings), or:
1. One of the supported
resolutions preceded by N
2. 1~100 (picture quality)
A dummy command
without any action
encoder
DUMMY=123
Any parameter, text or numbers
system
POWER_LED=0
1 (enabled), 0 (disabled)
system
ONVIF_STATE=1
1 (enabled), 0 (disabled)
system
PSIA_STATE=1
1 (enabled), 0 (disabled)
system
SYSTEM_INFO_XML
-
system
DATE
-
system
WAN_STATUS
-
system
WAN
-
system
LAN
-
system
DUMMY=123
Any parameter, text or numbers
SERVER_REPORT
-
System
Enable or disable
Power LED
Enable or disable
ONVIF compliance
Enable or disable PSIA
compliance
System information in
XML format
Get date and time
settings of the camera
Get the WAN port
runtime status
Get the WAN port
configuration
Get the host name
A dummy command
without any action
The full report
including system info,
system
WAN status, system
log, parameters.
22
www.acti.com
Local Storage of the Camera
Get the recorded files
list
system
DISK_FILE_LIST
-
Get the recorded file
system
DISK_GET_FILE=[filename.raw]
Any file name from the file list
system
DISK_REMOVE_FILE=[filename.raw]
Any file name from the file list
system
DISK_INFO
-
system
DISK_STATE=MOUNT
MOUNT, UNMOUNT
system
DISK_FORMAT
-
system
DISK_FORMAT_LOG
-
DISK_REMOVE_OLD_FILES=0
The number represents the
amount of oldest files to be
deleted. 0 means deleting all
files.
Delete the recorded
file
Get the status of local
storage
Mount or unmount the
disk
Format the local
storage
Check the report of
disk format
Remove older files
from local storage
system
1.
1 (use time filter), 0 (not
use time filter)
2. 4 digits for year
3. 2 digits for month
4. 2 digits for day
5. 2 digits for hours
6. 2 digits for minutes
7. 2 digits for seconds
8. 1-60 (time period in
minutes, defines the end
time of search range)
NONE, DI1, DI2, MD1, MD2,
MD3, PIR, SCH (scheduled
recording), READY (continuous
recording)
Set date and time filter
for local storage file
search
system
DISK_FILE_SEARCH_TIME=1,2011,09,
23,13,40,30,60
Search for event
related recordings
system
DISK_FILE_SEARCH_EVENT=DI1,DI2
Scan the disk for
possible errors
system
DISK_SCAN
-
Check the report of the
disk scan
system
DISK_SCAN_LOG
1.
Set overwrite
parameters and low
disk warning rule
system
DISK_CONFIG=1,5
23
2.
0 (not allow overwriting), 1
(allow overwriting of oldest
files)
1~50 (% of remaining
storage at which camera
sends warning message)
www.acti.com
Convenient Installation & Configuration using URL Commands
When you are installing and configuring just one camera, it is reasonable to use the Web
Configurator of the camera to set up everything. However, if you are installing tens of cameras,
you might need more efficient methods to save the labor cost of installers.
ACTi IP Utility 4 is a powerful tool that provides several convenient functions for one-to-many
configurations. It can be downloaded here:
http://www.acti.com/IP_utility
Although several frequently used settings can be directly managed by special buttons of IP
Utility 4 (such as full screen motion detection region setup of multiple cameras), there are still
several commands that do not have their own buttons in IP Utility. For such cases, it is possible
to take a good use of the possibility to enter URL Commands into IP Utility so that the utility
could then deliver thes e commands to multiple cameras at the same time.
Example 1: After all the tests, I want to reset all the cameras back to factory default
settings. How to do it by using IP Utility 4 and URL commands?
It is very easy to do it. Just select “system” cgi and type the FACTORY_DEFAULT into URL
section of IP Utility. After pressing “Apply”, all the checked devices will be reset to factory
default at the same time. More than one hour of labor has been saved with this simple
operation!
24
www.acti.com
FREQUENTLY USED URL COMMANDS
System Settings
Reset all settings to
factory default
system
FACTORY_DEFAULT
-
Reset settings to
factory default except
IP settings
system
CONFIG_RESET
-
system
SAVE_REBOOT
-
system
ACCOUNT_ROOT=Admin,123
Type any name and password
Save settings and
restart the camera
Change the root
account & password
1.
DATE _CONFIG=1,0101000 02004,00:00:00,+0
2.
0 ( manua l)
Set the date and time
system
or
DATE _CONFIG= 2,192.168.0.2,8640 0,+00
3.
(SNTP synchronization)
4.
Set daylight saving
configuration
system
DAYLIGHT_SAVING_CONFIG=
0,1,7,1,2:45,7,2,3,5,2:45
25
1 (manual date), 2 (SNTP
synchronization)
Date as mmdd0000yyyy (if
manual), IP of SNTP server
(if SNTP)
Time as hh:mm:ss (if
manual), update interval in
seconds (if SNTP)
Time zone setting
a,b1,c1,d1,e1,f1,b2,c2,d2,e2,f2
where
a: 1 (enabled), 0 (disabled)
b1/b2: 1,2 (input argument type)
c1/c2: 1~12 (month)
d1/d2: (if b1/b2=1): 1,2,3,4
(order of weeks in a month)
d1/d2: (if b1/b2=2): 1~31 (day of
month)
e1/e2: hh:mm
f1/f2: (if b1/b2=1): 1~7 (day of
the week, 7=Monday)
f1/f2: (if b1/b2=2): (empty)
www.acti.com
Network Settings
UPnP configuration
system
UPNP_CONFIG=1,IPCAM-00001
1.
2.
1 (enabled), 0 (disabled)
Friendly name (max 31)
Bonjour configuration
system
BONJOUR_CONFIG=1,IPCAM-00001
1.
2.
1 (enabled), 0 (disabled)
Friendly name (max 31)
Set IEEE 802.1X
authentication config.
system
8021X=0,2,,
Change HTTP port
system
PORT_HTTP=80
1. 1 (enabled), 0 (disabled)
2.
1 (ver 1.0), 2 (ver 2.0)
3. User name (0~16 symbols)
4. Password (0~16 symbols)
port number
Change HTTPs port
system
PORT_HTTPS=443
port number
Change streaming port
system
PORT_VIDEO=6002
port number
Change control port
system
PORT_CONTROL=6001
port number
Change multicast port
system
PORT_MULTICAST=5000
port number
Set primary DNS
system
DNS_PRIMARY=168.95.1.1
IPv4 address
Set secondary DNS
system
DNS_SECONDARY=168.95.1.1
IPv4 address
Set IP
system
WAN_IP=192.168.0.100
IPv4 address
Set network mask
system
WAN_NETMASK=255.255.255.0
IPv4 mask
Set gateway
system
WAN_GATEWAY=192.168.0.254
IPv4 address
HANDS-ON PRACTICE
TASK 1
Change streaming ports of all the cameras from 6002 to another value.
TASK 2
Set all the cameras to have current date and time.
TASK 3
Change the password of “Admin” account of all the cameras to be other than 123456.
26
www.acti.com
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement