VPort CGI Commands User’s Manual Fourth Edition, July 2012 www.moxa.com/product © 2012 Moxa Inc. All rights reserved. Reproduction without permission is prohibited.
VPort CGI Commands User’s Manual The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement. Copyright Notice Copyright ©2012 Moxa Inc. All rights reserved. Reproduction without permission is prohibited. Trademarks The MOXA logo is a registered trademark of Moxa Inc. All other trademarks or registered marks in this manual belong to their respective manufacturers.
Table of Contents 1. Overview ........................................................................................................................................... 1-1 Release Notes .................................................................................................................................... 1-2 General CGI URL Syntax and Parameters ............................................................................................... 1-2 2.
1 1. Overview This document describes the CGI commands that are used with Moxa VPort 1-channel video encoders, 4-channel video encoders, and IP cameras. Commands are included for set/get configuration parameters and PTZ control.
VPort CGI Commands Overview Release Notes Version 1.0 Includes CGI commands for the VPort 251/351/25. Version 1.1 Includes CGI commands for the VPort 451/461. Version 2.0 Includes CGI commands for all VPort models, 1-channel and 4-channel video encoders, and IP cameras. Version 2.1 Fixed incorrect description, and updated to account for new VPort models. Version 4.0 Updated for new VPort models VPort 06/36, and MxNVR-MO4.
2 2. VPort Set/Get Configuration CGI URL and Parameter Items The following topics are covered in this chapter: VPort Set/Get Configuration CGI URL and PTZ Control of CGI URL Command Sets and Parameter items Parameters system setptzctrl.cgi systemio setpreset.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items VPort Set/Get Configuration CGI URL and Parameter items These parameters are used for different VPort function sections. The parameters include system information, security, network, video, audio, and alarm. Every section has one or many items. Detailed information about sections and items is shown in the table below. getparam.cgi setparam.cgi Section names are typed in bold-face at the top of each table (e.g., system).
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items firmwarebuildtime G yymmddhh Firmware build time serialnumber G xxxxx Product serial number macaddress G aa:bb:cc:dd:ee:ff Mac address modelname G EX: VPort 351 Model name Example: Change Server Time: http://ip/moxa-cgi/setParam.cgi?system_timemethod=3&date=yyyy/mm/dd&time=hh:mm:ss Set NTP: http://ip/moxa-cgi/setParam.cgi?system_timemethod=4&ntpserver=bitsy.mit.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items network Item Action Value Description networktype G/S 1: Get IP address automatically Method used to get the IP address 2: Use fixed IP address • 3: DHCP with Auto configure option 66/67 • ipaddress Auto configure is based on DHCP Auto configure G/S xxx.yyy.zzz.www IP address subnet G/S xxx.yyy.zzz.www Subnet mask router G/S xxx.yyy.zzz.www Router IP address dns01 G/S xxx.yyy.zzz.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items ftp Item Action Value Description serverip01, G/S Max 40 char (HostAddressString) First and second FTP server IP or URL G/S 1 to 65535 Port Number of first and second FTP G/S Max 60 char (UsernameString) Username of first and second FTP serverip02 port01, port02 username01, server username02 password01, server G/S Max 15 char (PasswordString) password02 folder01, server G/S Max 40 char (FolderString) Folder pa
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items snmp Item Action Value Description versions G/S 1: V1, V2c, V3 2: V1, V2c 3: V3 only SNMP version rocomm G/S Max 40 char (ExtensiveString) V1,V2c Read Community rwcomm G/S Max 40 char (ExtensiveString) V1,V2c Write/Read Community adminauthtype G/S Administrator authentication type 1: No-Auth 2: MD5 3: SHA admindpvcy G/S Max 40 char (ExtensiveString) Administrator Data Encryption Key enableadpvcy G
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items ethport Item Action Value Description Mode G/S 1: Cascade Mode Select the link mode of Ethernets 2: Redundant Mode Models with dual Ethernet port 3: Single Port Mode supported 1: Enable Ethernet Port 1 The link mode is set up in Single Port 2: Enable Ethernet Port 2 Mode. activeport G/S Value is for enabling port 1 or port 2. When one port is enabled, the other port will be disabled.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items Setting an RTSP URL in VLC media player RTSP over HTTP Tunnel access name: HTTP URL Syntax Format: rtsp://:/moxa-cgi/access name_(channel index)_(stream index)_(codec type) example: rtsp://192.168.127.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items VLC media player works with RTSP using an HTTP URL.
VPort CGI Commands VPort 364 VPort Set/Get Configuration CGI URL and Parameter Items H264 codec: updstream(default value = udpstream_ch1_stream1) Channel #: (# = 1/2/3/4) udpstream_ch# or udpstream_ch#_stream1 or udpstream_ch#_stream1_h264 Table of Multicast Access Names, for all products Models Access Name VPort 251/351/25/15 MPEG4 mode: (supported by RTSP protocol) multicaststream or multicaststream _ch1 or multicaststream _ch1_stream1 or multicaststream _ch1_stream1_mp4v Only valid with selecting MP
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items multicast This section describes the RTSP multicast address group parameter settings for Moxa VPort 1-channel video encoders and IP cameras. VPort 251/351/25/15 items Item Action Value Description ipaddress G/S xxx.yyy.zzz.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items VPort 251/351/25 items Item Action Value Description text G/S Max 14 char (ExtensiveString) Information about the video imprinttimestamp G/S 0: Not Shown The location of the shown video 1: Shown in the caption information 2: Shown in the image codectype G/S 1,[1,1,(1,1)]: MPEG4 Video codec type selection 1,[1,1,(1,2)]: MJPEG size G/S 1: 720x480(NTSC), 720x576(PAL) Video resolution 2: 640x480(NTSC), 640x576(PAL
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items VPort 251/351/25 bit-rate mapping: Video Size 720x480(NTSC) 704x480(NTSC) 640x480(NTSC) 352x240(NTSC) 320x240(NTSC) Bit rate 720x576(PAL) 704x576(PAL) 640x576(PAL) 352x288(PAL) 320x288(PAL) B1 600 Kbps 570 Kbps 534 Kbps 144 Kbps 132 Kbps B2 1200 Kbps 1140 Kbps 1068 Kbps 288 Kbps 264 Kbps B3 1800 Kbps 1710 Kbps 1602 Kbps 432 Kbps 396 Kbps B4 2400 Kbps 2280 Kbps 2136 Kbps 576 Kbps 528 Kbps B5 3000
VPort CGI Commands quant01_h264, VPort Set/Get Configuration CGI URL and Parameter Items G/S Video quality 13: Medium quant02_h264, 11: Standard quant02_mjpg 8: Good 6: Detailed quant01_mp4v, 4: Excellent quant02_mp4v, quant02_mjpg quality01_h264, G/S quality02_h264 1: Fixed bit rate Video quality type. 2: Fixed quality quality01_mp4v, quality02_mp4v modulation G/S 0: Auto (auto detection) Select Video input.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items VPort 06/36 items: Item Action Value Description text G/S Max 14 char (ExtensiveString) Information about the video imprinttimestamp G/S 0: Not Shown The location of shown video 1: Shown in the caption information 2: Shown in the image codectype G 1,[1,2,(1,1),(2,3)] Video codec type selection size01_h264, G/S 1: 720x480(NTSC), 720x576(PAL) Video resolution size02_h264, 2: 640x480(NTSC/PAL) size02_mjpg 3: 3
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items video## This section applies to 4-channel video encoders; “##” indicates the channel number of the video encoder (01 to 04), for example: To get the information about the channel 2 video, the CGI command format: http:///moxa-cgi/getparam.cgi?video02_text To set the size of channel 4 video resolution, the CGI command format: http:///moxa-cgi/setparam.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items keyinterval01_h264 G Default Value: 15 Key frame interval for VPort 364 bitrate G/S 20: B1 Kbps Fixed bit rate selection for VPort 40: B2 Kbps 254 and VPM 7304: 60: B3 Kbps The B1 to B9 values are different 80: B4 Kbps for different video resolutions. The 100: B5 Kbps values are listed in the table 120: B6 Kbps below. Read only, fixed value.
VPort CGI Commands modulation VPort Set/Get Configuration CGI URL and Parameter Items G/S actualmodulation G frameratetype G 0: Auto (auto detection) Select video input modulation 1: NTSC format 2: PAL 1: NTSC The auto detection result of video 2: PAL input Modulation format 1: default value For identifying the frame rate setting mode.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items Image This section applies to 1-channel video encoders or IP cameras.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items VPort 351 and VPort 251 serial and PTZ control configuration serial This section covers PTZ port settings of the VPort 251 and VPort 351 video encoders. Selecting the PTZ driver requires choosing the related PTZ camera. When the PTZ camera receives PTZ control CGI commands (refer to page??), “move up” for example, it will translate into a PTZ serial command pattern that is sent to the PTZ camera through the serial interface.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items 05: “Zoom In” command 06: “Zoom Out” command 07: “Focus Near” command 08: “Focus Far” command 09: “Home” command 10: “Stop” command custcommand Item Action Value Description speedlinkname01 G/S Max. 8 char (BasicString) User defined command name G/S Max.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items VPort 451/461/254/354/364/364A/VPM7304 serial and PTZ control configuration ptzport This section covers PTZ port settings for video encoders; 2 different modes are used: Specific PTZ driver mode and Transparent Mode. A suitable PTZ driver must be used for PTZ driver mode, in which case the VPort receives PTZ control CGI commands (refer to page ??) such as “move up.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items comport Some VPorts have a DB9 COM port, which can act as the NPort’s COM port. This port can be used to control the PTZ camera, or for pure Serial–to-Ethernet communications, just like a Moxa NPort series product. For Real-COM driver details, please refer to VPort ActiveX SDK Plus, which includes the windows driver installation utility. *This section only applies to models with a COM Port serial interface.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items 6: Cohu controlmode G/S 0: Transparent PTZ Control PTZ control mode. 1: Specific PTZ Driver speedlinkname01 to Max. 8 char (BasicString) speedlinkname24 User defined command name. These commands can be used for extended PTZ control. speedlinkcmd01 to Max. 60 char (CustCamString) speedlinkcmd24 User defined string pattern for command instruction customcmd01 to Max.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items MJPEG Mode Media Stream CGI URL JPEG video streaming is implemented using HTTP push technology (http://en.wikipedia.org/wiki/Push_technology#HTTP_server_push), which is popular for IP video products. VLC media player is also compatible with the MJPEG HTTP push protocol. mjpeg.cgi pcmu.cgi These command are used to get the MJPEG video stream and audio stream. Example: To get channel 2’s MJPEG video stream:. http://192.168.127.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items PTZ Control of CGI URL Command Sets and Parameters PTZ Control CGIs are used to control the PTZ action of cameras and devices. The CGIs are organized by function-related directories under the moxa-cgi directory, and are followed by one of two actions: setptzctrl and setpreset. The file extension of the CGI is required. The first parameter move indicates the command of this request.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items setpreset.cgi This function is used to edit the preset position of the PTZ camera. There are three “move” values, clearpreset, and addpreset. • addpreset is used to add the current PTZ position to a preset position with a specified presetindex. • clearpreset is used to remove a preset position. The maximum number of preset positions is 25. NOTE Preset positions actually keep in the PTZ camera.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items Get Snapshot CGI URL The Get Snapshot CGI is used to get a JPEG snapshot from a Moxa VPort. getsnapshot.cgi Example: http://192.168.127.100/moxa-cgi/getsnapshot.cgi?chindex=2 Item Value Description chindex 1 to 4 Specify channel index. Default value is 1, if omit this item. Remove PTZ Driver CGI URL The Remove PTZ driver CGI is used to remove the customer uploaded PTZ driver. removeptzdriver.cgi Example: http://192.168.127.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items 1: data transmit VIDEO 0: no video signal Status of video signal 1: video signal detected SD 0: no SD card inserted Status of SD insertion DI 0: non-active DI1 to DI# 1: active Note: Depends on the number of digital 1: SD card insert inputs on the VPort. DO 0: non-active DO1 to DO# 1: active Note: Depends on the number of replay outputs on the VPort.
VPort CGI Commands VPort Set/Get Configuration CGI URL and Parameter Items Description: format of StreamingSupport and StreamingNowCodec: StreamingSupport: Channels,[Channel1,Streams,(S1,Codectype,Mode),(S2,CodecType,Mode)…],[Channel2,Streams,(S1,Codec type,Mode),(S2,CodecType,Mode)…],……… StreamingNowCodec: Channels,[Channel1,Streams,(S1,Codectype),(S2,CodecType)…],[Channel2,Streams,(S1,Codectype),(S2,Co decType)…],……. Channels video input numbers for MOXA VPort.