Sony SNCDH110W User Manual 2

Page 1
CGI Command Manual
Sony Network Camera
SNC-CH110 ,SNC-CH120 , SNC-CH140 , SNC-CH160
SNC-CH180 , SNC-CH210 , SNC-CH220 , SNC-CH240
SNC-CH260 , SNC-CH280
SNC-DH110 , SNC-DH110T , SNC-DH120 , SNC-DH120T
SNC-DH210 , SNC-DH210T , SNC-DH220 , SNC-DH220T
SNC-RH124 , SNC-RH164
SNC-RS46 , SNC-RS44 , SNC-RS86 , SNC-RS84
Sony Video Network Station
SNT-EX101 , SNT-EX101E , SNT-EX104 , SNT-EX154
SNT-EP104 , SNT-EP154
CGI Command Manual
5th Generation
1
Version 1.8
Nov. 15, 2010
Sony Corporation
Page 2
CGI Command Manual
Contents
1 About this manual .................................................................................................................................. 4
2 Motion video request commands ........................................................................................................... 6
2.1 Acquiring MPEG-4 or H.264 bit stream ........................................................................................... 6
2.2 Acquiring multiplexed Audio & Video bit stream ............................................................................ 12
3 Audio data request command .............................................................................................................. 15
4 Audio output request commands ......................................................................................................... 17
5 Still image request ............................................................................................................................... 18
6 Setting commands of camera parameters ........................................................................................... 19
7 Inquiry commands of camera parameters ........................................................................................... 20
8 Control commands for Panning, Tilting, Zooming and Focusing ......................................................... 22
8.1 relative parameter (syntax: relative=aabb) .................................................................................... 22
8.2 AbsolutePanTilt parameter ............................................................................................................ 23
8.3 AreaZoom parameter (syntax: AreaZoom=x,y,w,h,<codec>) ........................................................ 24
8.4 ContinuousPanTiltZoom parameter (syntax: ContinuousPanTiltZoom=<pan speed>,<tilt
speed>,<zoom speed>) ...................................................................................................................... 25
9 Configuration command for motion object detection or unattended object detection .......................... 26
9.1 Common configuration terms ........................................................................................................ 26
9.2 Inquiring the configuration ............................................................................................................. 27
10 Information request command ........................................................................................................... 28
11 CGI command list .............................................................................................................................. 30
11.1 System ........................................................................................................................................ 30
11.2 Exclusive camera control ............................................................................................................ 41
11.3 Date and time .............................................................................................................................. 41
11.4 Pan/Tilt/Zoom .............................................................................................................................. 42
11.5 Focus/Zoom ................................................................................................................................ 48
11.6 Camera ....................................................................................................................................... 50
11.7 Privacy mask ............................................................................................................................... 62
11.8 Sense up ..................................................................................................................................... 64
11.9 Serial ........................................................................................................................................... 67
11.10 Network ..................................................................................................................................... 68
11.11 Wireless network ....................................................................................................................... 70
11.12 Filtering ..................................................................................................................................... 72
11.13 QoS ........................................................................................................................................... 73
11.14 Dynamic IP address notification ................................................................................................ 74
11.15 SSL / TLS .................................................................................................................................. 75
11.16 802.1X ....................................................................................................................................... 76
11.17 Viewermode .............................................................................................................................. 77
2
Page 3
CGI Command Manual
11.18 User .......................................................................................................................................... 78
11.19 Security ..................................................................................................................................... 78
11.20 Preset position .......................................................................................................................... 78
11.21 FTP client .................................................................................................................................. 87
11.22 FTP server ................................................................................................................................ 90
11.23 SMTP ........................................................................................................................................ 91
11.24 Image memory .......................................................................................................................... 95
11.25 Edge storage ............................................................................................................................. 99
1 1.26 Alarm out ................................................................................................................................. 101
11.27 Voice alert ............................................................................................................................... 102
1 1.28 Alarm buffer ............................................................................................................................. 103
11.29 Object detection ...................................................................................................................... 103
11.30 VMF ........................................................................................................................................ 106
1 1.31 Tampering detection ................................................................................................................ 108
11.32 Lite object detection ................................................................................................................ 108
1 1.33 Audio detection ........................................................................................................................ 109
1 1.34 All configuration ....................................................................................................................... 109
1 1.35 Trigger ..................................................................................................................................... 110
11.36 Other operation ....................................................................................................................... 111
11.37 Other inquiries ......................................................................................................................... 112
12 Appendix ......................................................................................................................................... 114
12.1 Image Size ................................................................................................................................ 114
12.2 AreaSet ..................................................................................................................................... 117
12.3 FrameRate ................................................................................................................................ 117
12.4 ImageMaxSize .......................................................................................................................... 118
12.5 VidCapSize ............................................................................................................................... 118
12.6 AutoSlowShutterMinSpeed ....................................................................................................... 118
12.7 AgcMaxGain ............................................................................................................................. 119
12.8 Privacy Mask ............................................................................................................................ 119
12.9 WBMode ................................................................................................................................... 120
12.10 Alarm In / Alarm Out ................................................................................................................ 120
12.11 View mode<mode> ................................................................................................................. 121
12.12 The range of axis and the decision size of Object detection and V M F .................................... 121
12.13 Shutter Speed, Iris, Gain, ExpComp ....................................................................................... 122
12.14 PanTilter .................................................................................................................................. 126
12.15 PanMovementRange / TiltMovementRange / ZoomMovementRange .................................... 127
12.16 Zoom ratio and Zoom positionexpected val ue) ................................................................. 127
12.17 Focusexpected value) ....................................................................................................... 130
3
Page 4
CGI Command Manual

1 About this manual

This document describes CGI commands usage of Sony Network Camera and Sony Video Network Station. Applicable models and version are followings.
Sony Network Camera
Model Type SNC-CH110/120/140 SNC-CH210/220/240 SNC-CH160/180 SNC-CH260/280 SNC-DH110/120/140 SNC-DH210/220/240 SNC-DH110T/120T/140T SNC-DH210T/220T/240T SNC-DH160/180 SNC-DH260/280 SNC-RH124/164 SNC-RS44/46 SNC-RS84/86
Box Type, Indoor HD Box Type, Indoor Full HD Box Type, Outdoor HD Bullet Box Type, Outdoor Full HD Mini Dome Type, Indoor HD Mini Dome Type, Indoor Full HD Mini Dome Type, Indoor HD Vandal Mini Dome Type, Indoor Full HD Vandal Mini Dome Type, Outdoor HD Rugged Mini Dome Type, Outdoor Full HD Rapid Dome Camera, Indoor HD/Outdoor HD Rapid Dome Camera, Indoor SD x18/Indoor SD x36 Rapid Dome Camera, Outdoor SD x18/Outdoor SD x36
Sony Video Network Station
Model Type SNT-EX101/101E/104/154 SNT-EP104/154
Full Spec. 1CH Box T ype/4CH Box T y pe/4CH Blade T ype Basic Spec. 4CH Box T ype/4CH Blade T ype
These Sony Network Camera and Sony Video Network Station have the following kinds of CGI commands which are listed below. Network Camera and Video Network Station are called a camera by this manual.
1) Motion video request commands
These are to be used to get motion video (Motion JPEG or MPEG-4 video or H.264) or some of them are to be used for a session initiation for acquiring MPEG-4 or H.264 data.
2) Audio data request commands
These are to be used to get audio data from the camera or some of them are to be used for a session initiation for acquiring audio data.
3) Audio output request co m m ands
These are to be used to upload audio encoded data to the camera so that the camera can output audio
4
Page 5
CGI Command Manual via an equipped line output connector.
4) Still image request commands
These are to be used to get a latest still image from the camera.
5) Setting commands of camer a
These are to be used to set picture quality and so on.
6) Inquiry commands of camera parameters
These are to be used to inquire various settings of camera parameters which can be set by using setting commands (6).
7) Control commands for Panning, Tilting Zooming and Focusing
These are to be used for Panning, Tilting, Zooming and Focusing. Network Camera supports these commands. And, when a connected analog camera has a function, SNT-EX101/101E/104/154 supports some of the commands.
8) Configuration command for motion detect ion
These are to be used for configuring motion detect i on.
9) Information request commands
This is to be used to get information such a result of moti on detection or status of the sensor input.
In this document, the usage of CGI commands such as " m ethod", "syntax", and several examples are explained below. The following model can't acquire audio data. And, audio can't be output, either.
SNC-CH110/120/160/210/220/260 SNC-DH110/110T/120/120T/160/210/210T/220/220T/260 SNT-EP104/154
5
Page 6
CGI Command Manual

2 Motion video request commands

There are four kinds of request to acquire motion video data.
/image /image1
/image2
/image3
/mpeg4
/h264
/mjpeg
You can acquire Bit stream c or responding to the setup of ImageCodec1. If "mpeg4" is set up in ImageCodec1, you can acquire MPEG-4 bit stream.
You can acquire Bit stream cor r esponding to the setup of ImageCodec 2.
You can acquire Bit stream c or responding to the setup of ImageCodec 3. But, this request command can be used only with SNC-RS44/46/84/86.
Indicates that the client application specifies to acquire MPEG-4 bit stream. When the video mode is not set to mpeg4, mpeg4-jpeg or jpeg-mpeg4, the command response will be "400 error".
Indicates that the client application specifies to acquire H.264 bit stream. When the video mode is not set to h264, h264-jpeg or jpeg-h26 4, the command response will be "400 error".
Indicates that the client application specifies to acquire Motion JPEG bit st ream. When the video mode is set to mpeg4 or h264, the command r esponse will be "400 error".

2.1 Acquiring MPEG-4 or H.264 bit stream

In terms of MPEG-4 or H.264 bit stream, the camera can send them in the form of "HTTP bit stream", "RTP (UDP) bit stream (unicast)" or "RTP (UDP) bit stream (multicast)". The following are some explanation how the acquiring sequence wi l l be.
<Method>
GET
<Syntax>
http://ip_adr/image http://ip_adr/mpeg4 http://ip_adr/h264 http://ip_adr/image[?UdpMode=unicast&UdpPort=<UDP port number>] http://ip_adr/mpeg4[?UdpMode=uni c ast&UdpPort=<UDP port number>] http://ip_adr/h264[?UdpMode=unicast&UdpPort=< U DP port num ber >] http://ip_adr/image[?UdpMode=multicast] http://ip_adr/mpeg4 [?UdpMode=mult i cast] http://ip_adr/h264[?UdpMode=multicast]
6
Page 7
CGI Command Manual
[HTTP bit stream]
The following data shows the way to acquire the HTTP. When simply putting "GET /image...", "GET /mpeg4..." or "GET /h264...", the camera will send the MPEG-4 or H.264 raw data as its response.
GET /image HTTP/1.0¥r¥n User-Agent: xxxx¥r¥n Host: 192.168.0.200¥r¥n Accept: */*¥r¥n Connection: Keep-Alive¥r¥n
¥r¥n
HTTP/1.0 200 OK¥r¥n Content-Type: video/mpeg¥r¥n Cache-Control: no-cache¥r¥n Pragma: no-cache¥r¥n ¥r¥n <MPEG-4 data> . . .
MPEG-4 video request from a client application
The response of the camera which includes MPEG-4 bit stream
Content-Type
"Content-Type:" header will be set to "video/mpeg" when the video mode of the camera is MPEG-4 mode. "Content-Type:" header will be set to "video/h264" when the video mode of the camera i s H.264 mode.
<MPEG-4 data>
<MPEG-4 data> is based on the standard of MPEG-4 and is in the form of raw data. And the <MPEG-4 data> includes so-called "user data" in each picture frame so that the receiver can make use of it.
[RTP (UDP) bit stream (unicast)]
You can get MPEG-4 (or H.264) bit stream by using RTP (Real-time transport protocol). HT T P is based on the TCP, which will lead less throughput in several circumstances e.g. RTT (Round trip time) number is rather large for the sake of network congestion. The following figure shows how the RTP bit stream (unicast) will be acquired by a client application.
7
Page 8
CGI Command Manual
Client PC
Camera
In terms of acquiring RTP bit stream (unicast), putting "UdpMode=unicast" and "UdpPort=<UDP port number>" will be required when sending HTTP request.
UdpMode parameter
UdpPort parameter
Specify a mode of transmission which will be either "unicast" or "multicast". The "multicast" can be set only when the multicast streaming in the camera is set to on.
This parameter is effective when the UdpMode is set to "unicast". This parameter specifies the video port number which is the des tination port the camera should send to. Lis tening to this video port will be required by the client application.
RTCP packets
While the camera keeps sending MPEG-4 RTP bit stream, it also sends RTCP report (sender report) to the client side periodically. The client side is required to prepare for receiving the RTCP report and also is required sending RTCP report (receiver report) to the camera periodically. In case of this, the client side should listen to <the video port + 1> as the RTCP port. Note that the camera stops sending the bit stream if it fails to receive RTCP receiver report from the client side for consecuti ve t ime specified by RtpExpire parameter. The default of the RtpExpire is 60000 (milliseconds).
8
Page 9
CGI Command Manual
[RTP (UDP) bit stream (mul t icast)]
In terms of multicast RTP bit stream, acquiring sequence is different from the unicast one. In order to activate multicast bit stream, getting information of the multicast settings in the camera is needed prior to starting the sequence. The information is obtained by using "/com m and/inquiry.cgi?inq=camera" inquiry command.
Multicast McAddress McVideoPort
Shows whether multicast streaming is set to on or off. Shows multicast address which is used for multicast bit stream. Shows multicast video port which is used for multicast bit stream.
The following figure shows how the RTP bit stream (multicast) is acquired by a client application.
Client PC
Camera
[Motion JPEG bit str eam ]
In terms of motion JPEG bit stream, only the HTTP bit stream form is support ed. The motion JPEG bit stream can be acquired by sending "/image" or "/mjpeg" command, only when the video mode of the camera is set to JPEG . The motion JPEG bit stream is retrieved by the first GET command operation and will be sent as the sequential data. Therefore, display application should display the sequential data with dividing the data into an image-unit. In this case, boundary character string "--myboundary" is fixed as an index. 9
Page 10
CGI Command Manual
Value
Details
Also, it is possible adjusting the frame rate by setting the "speed" or "interval" parameter when client application requests bit stream.
<Method>
GET
<Syntax>
http://ip_adr/mjpeg[?speed=<value>] http://ip_adr/mjpeg[?interval=<value>]
<Parameters>
speed=<value> Refer to the following list regarding speed=<value>. The "fastest" frame rate is selected if there is no specification of "speed" or "interval" parameters. Setting both "speed" and "interval" parameters is not allowed.
interval=<value> The range of setting parameter is from 33 to 3600000. The unit of the parameter is "mi llisecond". It is possible to set the motion image interval by setting "interval" parameter. Setting both "speed" and "interval" parameters is not allowed.
The effective value of speed parameter
0 1 2 3 4 5 6 8 10
Fastest 1 frame/sec 2 frame/sec 3 frame/sec 4 frame/sec 5 frame/sec 6 frame/sec 8 frame/sec 10 frame/sec
10
15 20 25 30
15 frame/sec 20 frame/sec 25 frame/sec 30 frame/sec
Page 11
CGI Command Manual
<Example>
Request for motion image by 20 frames per second
GET /mjpeg?speed=20 HTTP/1.0¥r¥n Host: 192.168.1.1
Request from motion image by 1 frame per second by using "interval" parameter
GET /mjpeg?interval=1000 HTTP/1.1¥r¥n Host: 192.168.1.1
Response data
The output format of the motion JPEG data is the "Server-push". Some HTTP headers have possibilities to be inserted between the boundary string and the data chunk (JPEG data) listed below.
Content-Type header
CamTim header DataLen header
Indicates that the data chunk is "image/jpeg" type. Stands for the date and time the JPEG image is taken in the unit.
Stands for the data length of the data chunk. The figure is fixed in the form of 8 digits and will be padded by "0" when the data length is in the r ange of 7 digits or less.
The following example shows the response data to get moti on JPEG bit stream.
HTTP/1.0 200 OK¥r¥n Content-Type: multipart/x-mixed-replace;boundary=--myboundary¥r¥n ¥r¥n
--myboundary¥r¥n Content-Type: image/jpeg¥r¥n CamTim: 2004-05-18 Tue 10:13:05¥r¥n ¥r¥n <JPEG image data>¥r¥n
--myboundary¥r¥n Content-Type: image/jpeg¥r¥n CamTim: 2004-05-18 Tue 10:13:05¥r¥n ¥r¥n <JPEG image data>¥r¥n
--myboundary¥r¥n Content-Type: image/jpeg¥r¥n CamTim: 2004-05-18 Tue 10:13:06¥r¥n ¥r¥n <JPEG image data>¥r¥n
--myboundary¥r¥n .
11
Page 12
CGI Command Manual

2.2 Acquiring multiplexed Audio & Video bit stream

The client application can get audio data as well with the video bit stream. In this case both video bit stream and audio bit stream will be multiplexed in one TCP session.
<Method>
GET
<Syntax>
http://ip_adr/image?audioin=on[&speed=<value>] http://ip_adr/image?audioin=on[&interval=<value>] http://ip_adr/mjpeg?audioin=on[&speed=<value>] http://ip_adr/mjpeg?audioin=on[&interval=<value>] http://ip_adr/mpeg4?audioin=on http://ip_adr/h264?audioin=on
Response data
The output format of this multiplexed bit stream is the "Server-push". The bit stream includes video chunks and audio chunks. The client application can make a di stinction between the video chunk and audio chunk by checking the "Content-Type" head er in the chunk.
Content-Type header
CamTim header
DataLen header
Content-Type: image/jpeg --- Indicates that is the JPEG chunk Content-Type: video/mpeg --- Indicates that is the MPEG-4 chunk Content-Type: video/h264 --- Indicates that is the H.264 chunk Content-Type: audio/PCMU Content-Type: audio/40kadpcm Content-Type: audio/32kadpcm Content-Type: audio/24kadpcm Content-Type: audio/16kadpcm
Stands for the date and time the video image is taken in the unit. This is inserted only in the video chunk. Stands for the data length of the data chunk. In the video chunk the figure is fixed in the
PCMU : G.711 (64kbps) 40kadpcm : G.726 (40kbps) 32kadpcm : G.726 (32kbps) 24kadpcm : G.726(24kbps) 16kadpcm : G.726 (16kbps) Indicates that is the audio chunk.
form of 8 digits and will be padded by "0" when the data lengt h i s i n the range of 7 digits or less.
The following example shows the response data to get motion JPEG bit stream and audio bit stream
HTTP/1.0 200 OK¥r¥n Content-Type: multipart/x-mixed-replace;boundary=--myboundary¥r¥n ¥r¥n
12
Loading...