MPEG4 Camera CGI Reference Document V1...MPEG4 Camera CGI Reference Document V1.05 This...
Transcript of MPEG4 Camera CGI Reference Document V1...MPEG4 Camera CGI Reference Document V1.05 This...
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Supported Cameras:
Fixed Dome Network Cameras
Fixed Indoor Cameras (CCD, Digital PTZ, Infrared and Wireless)
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
This documentation explains the usage of CGI commands for the INTELLIET ACTIVE NETWORKING Pro-Series Network Cameras (wired + wireless). Note: The minimum firmware version required is V 4.77 (CCD Cameras) and V 4.8 (1.3M Digital PTZ CMOS Cameras) and V 1.24 (2.0M Digital PTZ CMOS Cameras). The CGI reference is broken down into five sections:
1) Image request commands Direct access to the live image via ActiveX and JAVA.
2) GP_OUT setting command Control the power output port (digital IO) of the camera.
3) Parameter Value Inquiry commands Retrieve the current configuration of the camera via remote HTTP calls.
4) Setting commands Control the camera parameters via remote HTTP calls.
5) PTZ commands (for Digital PTZ models)
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
1. Image request commands Direct access to the live image via ActiveX and JAVA. Syntax 1: http://camera_ip/image.cgi?id=<value>&passwd=<value>&mode=<value>&fr=<value>&img_size=<value>&bf=<value> Parameters: id & passwd: valid username and password for camera (e.g. guest/guest). Account does not need to have admin access. mode:
Value Description
activex ActiveX MPEG4 stream image
applet Applet MPEG4 stream image
jpeg Still image capture
If the mode parameter is not specified, value 'jpeg' is assumed. fr: specify the frame rate (only valid for stream image command). Possible values are 1, 3, 5 10, 15 and 30. image_size:
bf: behind firewall. Use this parameter to receive the image data through the web server port of the camera rather than the image transfer port. Possible values are 0 (use image transfer port) or 1 (use web server port).
Description Value
NTSC Models PAL Models
D1 720 * 480 720*576
CIF 352 * 240 352*288
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Syntax 2: Motion JPEG Image Access http://camera_address/image.cgi? id=<value>&passwd=<value>&mode=http&fr=<value> id & passwd: valid username and password for camera (e.g. guest/guest). Account does not need to have admin access. fr: specify the frame rate of the Motion-JPEG stream. Possible values are 1, 2, 5, etc. Condition: - JPG Stream must be activated in the System Configuration.
M-JPEG video consists of a continuous flow of JPEG images reducing the network overhead proving a better frame rate.
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Syntax 3a: Direct Image Access http://camera_ip/jpg/image.jpg Condition: - Dual Mode (MPEG4 & JPEG) or Single (JPEG only) is enabled - Direct public access to image via HTTP is enabled
This access method is slower than the Motion JPEG access, but it provides better compatibility. Any program which can fetch single JPEG images can use the direct image access method to retrieve image information from the camera server.
The Image name can be adjusted
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Syntax 3b: http://username:password@camera_ip/jpg/image.jpg This version requires authentication via username and password. Condition: - Dual Mode (MPEG4 & JPEG) or Single (JPEG only) is enabled - Direct public access to image via HTTP is disabled
This access method is slower than the Motion JPEG access, but it provides better compatibility. Any program which can fetch single JPEG images can use the direct image access method to retrieve image information from the camera server.
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
2. GP_OUT setting command Control the power output port (digital IO) of the camera. Syntax 1: http://camera_ip/gp_out.cgi?id=<value>&passwd=<value>&out=<value>&interval=<value> Parameters: id & passwd: valid username and password for camera with admin authority, e.g. admin/admin. out: - 'on': activates the GPIO (General Purpose I/O) output port - 'off': de-activates the GPIO (General Purpose I/O) output port
interval: Specifies the time (s) interval in which the port remains active. Possible values are 1 – 255. Use the interval parameter in combination with out=on in order to automatically disable the port after a certain time interval. Example: http://camera_ip/gp_out.cgi?id=admin&passwd=admin&out=on&interval=20 Camera activated the GPIO output and sets the GPIO output to “off” after 20 seconds.
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
3. Parameter Value Inquiry commands Retrieve the current configuration of the camera via remote HTTP calls, e.g. to process them in your own application. The configuration data is broken down into nine categories. 1) Image Settings 2) Network Settings 3) Wireless Settings 4) Event Settings 5) Time Settings 6) System Settings 7) User Settings 8) Complete configuration data as XML formatted output 9) Alert state of camera (using alert_state.cgi) Syntax 1: http://camera_ip/inquiry.cgi?id=<value>&passwd=<value>&inq=<value> Parameters: id & passwd: valid username and password for camera with admin authority, e.g. admin/admin. inq: - image: returns the current image settings - network: returns the current network settings - wireless: returns the current wireless settings - event: returns the current event trigger settings - system: returns the current system configuration settings, incl. time server settings - gpio: returns the status of the camera's alert state - Ddns_status: returns the DDNS update status - user: returns user account information - xml: returns the entire camera configuration data in XML format
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Example 1: http://192.168.1.221/inquiry.cgi?id=admin&passwd=admin&inq=image Returns: Setting Information of Image configuration Rate Control : VBR MODE Image Size : 720*576 Quality: 4 Frame rate : 25 fps GOP : 5 Display cam name and location stamp : On Display Time stamp : On De-Interlace : On Brightness(0 ~ 255) : 128 Contrast(0 ~ 15) : 128 Hue(0 ~ 15) : 8 Saturation(0 ~ 255) : 148 Color Killer : Disable
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Example 2: http://192.168.1.221/inquiry.cgi?id=admin&passwd=admin&inq=network Returns: Setting Information of System configuration Camera name(max 15 characters) : my camera Camera location(max 30 characters) : my location Operation Mode : Dual Mode (MPEG4 & JPEG) Output Stream Type : JPEG Direct public access to image via HTTP : enable Image file name (max 10 characters): image.jpg Audio On/Off : On Video On/Off : On Led On/Off : On System Information : Model : INT-L200 Serial Number : MNCL200NA000004 Bootrom Version : BLMPG001.8 Firmware Version : FLMPG004.5 Wired Mac Number : 00:0c:1c:05:00:04 Setting Information of Time configuration Synchronized with NTP server : enable NTP server : 192.5.41.40 Time Zone : GMT-05:00 Eastern Time (US&Canada) Update Interval : 5 Set Manually : disable Date(yyyy/mm/dd) : 2001/12/31 Time(hh:mm:ss) : 12:00:00
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Enable Daylight Savings : disable Start Daylight Savings Time(mm/dd) : 04/05 End Daylight Savings Time(mm/dd) : 10/03 Example 3: http://192.168.1.221/inquiry.cgi?id=admin&passwd=admin&inq=xml Returns an XML formatted document listing all configuration values. Extract: <INTELLINET-cam-config> <network-configuration> <mode>manual</mode> <ip-address>192.168.1.221</ip-address> <subnet>255.255.252.0</subnet> <gateway-address>192.168.1.221</gateway-address> -> more parameters </network-configuration> <image-configuration> <quality-vbr>4</quality-vbr> <rate-control>vbr</rate-control> <resolution>VGA (640 x 480)</resolution> <framerate-limit>30 fps</framerate-limit> -> more parameters </image-configuration> <user-configuration> -> user parameters </user-configuration> <event-configuration> -> event parameters </event-configuration> <system-configuration> -> system parameters
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
</system-configuration> </INTELLINET-cam-config>
See http_inq_output.xml in ZIP file.
Example 4: Query of the alert state of the camera: http://camera_address/alert_state.cgi?id=admin&passwd=admin This command can only be run by proving admin credentials and returns three values: motion=xxxxxx\r\n periodic=xxxxxx \r\n sensor=xxxxxx \r\n
xxxxxx = is the value that can be either a) ‘inactive’ or b) the time stamp of the last event that occurred (yyyymmddhhmm). Example: The periodic and digital input trigger are disabled, but motion detection is enabled and an event has been triggered. The output would look like this: motion=20081202085836\r\n periodic=inactive\r\n sensor=inactive\r\n
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
4. Setting commands Control the camera parameters via remote HTTP calls. The commands below give you the ability to program all parameters of the camera remotely without connecting to the camera's web administration interface. There are six different categories: 1) Image Settings (image_set.cgi) 2) Network Settings (network_set.cgi) 3) Wireless Settings (wireless_set.cgi) 4) Event Settings (event_set.cgi) 5) Time Settings (time_set.cgi) 6) System Settings (system_set.cgi) The syntax is the same for all six categories: http://camera_ip/*_set.cgi?id=<value>&passwd=<value>¶meter=<value> Parameters: id & passwd: valid username and password for camera with admin authority, e.g. admin/admin. Find the list of CGI commands and parameters and values on the following pages.
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
image_set.cgi
Parameter Values Note
Rate_Control vbr/cbr VBR = variable bit rate, CBR = constant bit rate Quality 1 ~ 31 In VBR mode: 1, 2, 3, …, 28, 29, 30 Bit_Rate 10 ~ 300 In CBR mode: 10, 20, 30, …., 280, 290, 300 Resolution d1/cif/vga 720*480 / 640x480 / 352*240 (NTSC model)
720*576 / 640x576 / 352*288 (PAL model) Framerate 1 ~ 30 Values NTSC: 1, 3, 5, 8, 12, 25
Values PAL: 1, 3, 5, 10, 15, 30 Gop 1 ~ 10 Timestamp on/off Namestamp on/off Deinterlace On/off Bright_Value 0 ~ 255 Contrast 0 ~ 200 Hue 0 ~ 15 Saturation 0 ~ 255 Colorkiller on/off on: regular color mode / off: black and white mode
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
network_set.cgi – part 1
Parameter Value Note
Ip_Assign_Method using_dhcp/manually Ip <ip address> Format: 111.222.333.444 Subnet <subnet address> Format: 111.222.333.444 Gateway <gateway address> Format: 111.222.333.444 Send_Email on/off Email_Addr <email address> max 30 characters Web_Port 80 ~ 1023 Img_Port 8000 ~ 65535 Audio_Receive_Port 8000 ~ 65535 Audio_Send_Port 8000 ~ 65535 Upgrade_Port 8000 ~ 65535 Etsp_Port 8000 ~ 65535 Dns1_Server <ip address> Format: 111.222.333.444 Dns2_Server <ip address> Format: 111.222.333.444 Use_Smtp_Auth on/off Smtp_Server server address Format: 111.222.333.444
or: xxx.domain.com max 25 characters
Sender_Email_Addr <email address> max 30 characters Smtp_Auth_Method digest_md5/login/plain Smtp_Auth_Id Text SMTP Username Smtp_Auth_Passwd Text SMTP Password Smtp_Auth_Realm Text SMTP Authentication Realm
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
network_set.cgi – part 2 (DDNS Settings)
Parameter Value Note
Regist enable/disable Ddns_Serv www.dyndns.org
www.ods.org
Regist_Id Text DDNS Account User ID Regist_Pd Text DDNS Account Password Host_Name text e.g. mycam.dyndns.org Manual_update on/off Ddns_status 8000 ~ 65535
Example 1: http://192.168.1.221/network_set.cgi?id=admin&passwd=admin&Ip=192.168.0.223 Returns: Setting of Network configuration IP Address is set "192.168.0.223". Example 2: http://192.168.1.221/network_set.cgi?id=admin&passwd=admin&[email protected] Returns: Setting of Network configuration Sender email address is set "[email protected]".
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
wireless_set.cgi
Parameter Value Note
Operation_Mode InfraStructure/AdHoc Ssid <text> Channel 1 ~ 12 Tx_Rate auto/1mbps/2mbps/5.5mbps/6
mbps/9mbps/11mbps/12mbps/18mbps/24mbps/36mbps/48mbps/54mbps
Preamble auto/long/short WirelessMode 11bg/11b/11g Enc Disable/64bit/128bit Auth Open/Shared/Auto Web_Key1 Any hex value Length:
64 bit = 10 chars, 128 bit = 26 chars
Web_Key2 Any hex value Web_Key3 Any hex value Web_Key4 Any hex value Def_Key 1 ~ 4
Example: http://192.168.1.221/wireless_set.cgi?id=admin&passwd=admin&Channel=8 Returns: Setting of Wireless configuration Channel is set to Channel"8".
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
event_set.cgi Trigger condition
Parameter Value Note Digital_Option on/off Di_From 0 ~ 24 24 hour time format Di_To 0 ~ 24 24 hour time format Di_Port on/off Motion_Option on/off Md_From 0 ~ 24 24 hour time format Md_To 0 ~ 24 24 hour time format Motion_Sensitivity 0 ~ 4 Period_Option on/off Pe_Sec 1 ~ 3600 Pe_From 0 ~ 24 24 hour time format Pe_To 0 ~ 24 24 hour time format
Example: http://192.168.1.221/event_set.cgi?id=admin&passwd=admin&Motion_Option=on Returns: Setting of Event configuration Motion Detection option is set "on".
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
event_set.cgi Image Capture Option
Parameter Value Note Before_Event 0 ~ 21 Max. value depends on image resolution,
capture frame rate, and After_event After_Event 0 ~ 21 Max. value depends on image resolution,
capture frame rate, and Before_event Cap_Rate 1 ~ 15 Img_Name <text> Append_Ip on / off Append_Date on/off Append_Trigger on/off Append_Sequence on/off
Example: http://192.168.1.221/event_set.cgi?id=admin&passwd=admin&Cap_Rate=15 Returns: Setting of Event configuration Image capture frame rate is set "15".
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
event_set.cgi Image Capture Option
Parameter Value Note Trg_Out on/off Sup_Volt 0 ~ 255 Time (s) Send_Alm on/off Trg_Send_Img on/off Email_Addr <email address> max. 30 characters Email_Title <text> max. 30 characters Trg_Send_Ftp on/off Ftp_Serv <ftp server> IP Address or domain name,
enter without ftp:// Fpt_Serv_Port <ftp server port> default = 21 Ftp_User <ftp user> max. 30 characters Ftp_Passwd <ftp password> max. 30 characters Ftp_Dir <ftp directory> max. 30 characters
Example: http://192.168.1.221/event_set.cgi?id=admin&passwd=admin &Trg_Out=on Returns: Setting of Event configuration supply voltage option is set "on".
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
time_set.cgi
Parameter Value Note Time_Ntp sync_ntp/manually Time_Zone 1 ~ 68 * Refer to Time Zone reference at the end
of the document Update_Interval 0 ~ 65536 Ntp_Addr <ntp server address> Td_Year 1000 ~ 9999 Td_Month 1 ~ 12 Td_Date 1 ~ 31 Tc_Hour 0 ~ 23 Tc_Min 0 ~ 59 Enable_Day on/off Start_Month 1 ~ 12 Start_Day 1 ~ 31 End_Month 1 ~ 12 End_Day 1 ~ 31
Example: http://192.168.1.221/time_set.cgi?id=admin&passwd=admin&Ntp_Addr=10.10.8.10 Returns: Setting of Time configuration NTP Server is set "10.10.8.10".
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
system_set.cgi
Parameter Value Note Cam_Name <text> max. 10 characters Cam_Locate <text> max. 10 characters Operation_mode dual/single Image_Name <text> max. 10 characters Audio_OnOff on/off Video_OnOff on/off Led_OnOff on/off Access_Image_Option enable/disable
Example: http://192.168.1.221/system_set.cgi?id=admin&passwd=admin&Audio_OnOff=on Returns: Setting of Network configuration Audio On/Off is set "On".
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Time Zone reference
(value) (details) (value) (details) (value) (details)
1 Midway Island, Samoa 25 Stockholm, Vienna, Belgrade 49 Dhaka, Sri Jayawardenepura
2 Hawaii 26 Bratislava, Budapest 50 Rangoon
3 Alaska 27 Ljubljana, Prague, Brussels 51 Bankok, Hanoi
4 Pacific Time(US&Canada) 28 Copenhagen, Madrid, Paris 52 Jakarta, Krasnoyarsk
5 Tijuana 29 Sarajevo, Skopje, Sofija 53 Beijing, Chongqing, Hong Kong
6 Arizona 30 Vilnius, Warsaw, Zagreb 54 Urumqi, Irkutsk, Ulaan Baraar
7 Mountain Time(US&Canada) 31 West Central Africa 55 Kuala Lumpur, Singapore
8 Central America 32 Athens, Istanbul, Minsk 56 Perth, Taipei
9 Central Time(US&Canada) 33 Bucharest, Cairo, Harare 57 Osaka, Sapporo, Tokyo
10 Mexico City, Saskatchewan 34 Pretoria, Helsinki 58 Seoul
11 Bogota, Lima, Quito 35 Riga, Tallinn, Jerusalem 59 Yakutsk
12 Indiana(East) 36 Baghdad, Kuwait, Riyadh 60 Adelaide, Darwin
13 Eastern Time(US&Canada) 37 Moscow, St. Petersburg 61 Brisbane, Canberra, Melbourne
14 Atlantic Time(Canada) 38 Volgograd, Nairobi 62 Sydney, Guam, Port Moresby
15 Caracas, La Paz, Santiago 39 Tehran 63 Hobart, Vladivostok
16 Newfoundiand 40 Abu Dhabi, Muscat 64 Magadan, Solomon Is.
17 Brasilia, Buenos Aires 41 Baku, Tbilisi, Verevan 65 New Caledonia
18 Georgetown, Greenland 42 Kabul 66 Auckland, Wellington
19 Mid-Atlantic 43 Ekaterinburg 67 Fiji, Kamchatka, Marshall Is.
20 Azores, Cape verde Is 44 Islamabad, Karachi, Tashkent 68 Nuku'alofa
21 Casablanca, Monrovia, Dublin 45 Calcutta, Chennai
22 Greenwich Meam Time 46 Mumbai, New Delhi
23 Edinburgh, Lisbon, London 47 Kathmandu
24 Amsterdam, Berlin, Bern,Rome 48 Almaty, Novosibirsk, Astana
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
5. PTZ commands (for 1.3M and 2.0M Digital PTZ models) It is possible to control the PTZ movement via HTTP commands. Each command moves the camera one step in the direction specified.
The syntax: http://camera_ip/ptz_webctl.cgi?id=<value>&passwd=<value>&Ptz_Cmd=<value> Parameters: id & passwd: valid username and password for camera with admin authority; e.g., admin/admin. value: zoom_in, zoom_out, up,down, left,right, up_left, up_right, down_left, down_right, reset
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
Examples: a) Image zoomed all the way out.
b) Send zoom_in command: http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=zoom_in (eight times = max. zoom in)
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
c) Image after zoom_in command is sent eight times:
d) Send up command: http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=up (eight times = from center to max. up position, sixteen times from max. up position to max. down position)
MPEG4 Camera CGI Reference Document V1.05
http://www.networkipcamera.com
e) Image after up command is sent eight times:
f) Send up command: http://camera_address/ptz_webctl.cgi?id=admin&passwd=admin&Ptz_Cmd=reset -> Image returns to default position