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
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.8 Sense up ..................................................................................................................................... 64
11.9 Serial ........................................................................................................................................... 67
11.18 User .......................................................................................................................................... 78
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.
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.
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.
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.
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.
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.
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