IP Camera Standard API Interface Specification v3.0 (2013-07-18)
IP Camera Standard API Interface Specification v3.0 (2013-07-18)
Specification
Revision: 3.0
Date: 2013-July-18
TABLE OF CONTENTS
DOCUMENT HISTORY ....................................................................................... 3
1 OVERVIEW ................................................................................................... 5
1.1 Product and firmware versions ........................................................................... 5
2 REFERENCES ................................................................................................ 5
3 DEFINITIONS ............................................................................................... 6
3.1 General notation .................................................................................................. 6
3.1.1 General abbreviations .............................................................................. 6
3.1.2 Style convention....................................................................................... 6
3.1.3 General CGI URL syntax and parameters ............................................... 7
3.1.4 Parameter value convention ..................................................................... 8
4 INTERFACE SPECIFICATION ............................................................................ 9
4.1 Server responses ................................................................................................. 9
4.1.1 HTTP status codes ................................................................................... 9
5 API GROUPS ............................................................................................... 11
5.1 General .............................................................................................................. 11
5.1.1 Update and list parameters and their values .......................................... 11
5.1.2 Add, modify and delete users ................................................................. 14
5.1.3 List users information ............................................................................ 16
5.1.4 Get, modify snapshot path ..................................................................... 17
5.1.5 Local Storage Management ................................................................... 18
5.1.6 Factory default ....................................................................................... 19
5.1.7 Hard factory default ............................................................................... 20
5.1.8 Backup ................................................................................................... 20
5.1.9 Restore ................................................................................................... 21
5.1.10 Firmware upgrade ................................................................................ 22
5.1.11 Restart server........................................................................................ 24
5.1.12 Server report......................................................................................... 24
5.1.13 System logs .......................................................................................... 25
5.1.14 System date and time ........................................................................... 25
1
5.1.15 IEEE 802.1x certificate upload ............................................................ 28
5.2 Image ................................................................................................................ 29
5.2.1 MJPEG images (snapshot) CGI request ................................................ 29
5.3 PTZ ................................................................................................................... 30
5.3.1 PTZ ........................................................................................................ 30
5.4 I/O ..................................................................................................................... 38
5.4.1 I/O control .............................................................................................. 38
5.4.2 Event Data .............................................................................................. 40
5.5 Video and Audio ............................................................................................... 45
5.5.1 Connect video and audio stream ............................................................ 45
5.5.2 Connect video stream by http ................................................................ 46
5.5.3 RTSP ...................................................................................................... 47
2
DOCUMENT HISTORY
Version Date Comment
Center
imagewidth
imageheight
stream
3
3.0 2013-July-18 Remove information regarding N3&A2 devices
5.3.1.1 PTZ:
4
1 OVERVIEW
This document specifies the external HTTP-based application programming interface of the IP camera.
The HTTP-based video interface provides the functionality for requesting images and for getting and
setting internal parameter values. The image and CGI-requests are handled by the built-in Web server in
the camera.
2 REFERENCES
HTTP protocol
RTSP Protocol
SDP Protocol
5
3 DEFINITIONS
RFC 1738 describes the syntax and semantics for a compact string representation for a
resource available via the Internet. These strings are called "Uniform Resource Locators"
URL
(URLs).
In URL syntax and in descriptions of CGI parameters, text in italics within angle brackets denotes content
that should be replaced with either a value or a string. When replacing the text string, the angle brackets
must also be replaced. An example of this is the description of the name for the server, denoted with
<servername> in the URL syntax description below, which is replaced with the string myserver in the
URL syntax is written with the word "Syntax:" shown in bold face, followed by a box with the referred
syntax, as shown below. The name of the server is written as <servername>. This is intended to be
replaced with the name of the actual server. This can either be a name, e.g. "thecam" or
Syntax:
http://<servername>/cgi-bin/admin/userinfo.cgi
6
A description of returned data is written with "Return:" in bold face, followed by the returned data in a
box. All data returned as HTTP-formatted, i.e. starting with the string HTTP, is line-separated with a
Return:
URL syntax examples are written with "Example:" in bold face, followed by a short description and a light
http://myserver/cgi-bin/admin/privacy.cgi
Examples of what can be returned by the server from a request are written with "Example:" in bold face,
followed by a short description and a light grey box with an example of the returned data.
CGI URLs are written in lower-case. CGI parameters are written in lower-case and as one word. When the
CGI request includes internal camera parameters, the internal parameters must be written exactly as
named in the camera or video server. For the POST method, the parameters must be included in the body
of the HTTP request. The CGIs are organized in function related directories under the cgi-bin directory.
Syntax:
http://<servername>/cgi-bin/<subdir>[/<subdir>...]/<cgi>.<ext>
[?<parameter>=<value>[&<parameter>=<value>...]]
7
Example: List the Network parameters.
http://<servername>/cgi-bin/admin/param.cgi?action=list&group=Network
In tables defining CGI parameters and supported parameter values, the default value for optional
8
4 INTERFACE SPECIFICATION
4.1 Server responses
The built-in Web server uses the standard HTTP status codes.
Return:
204 No Content The server has fulfilled the request, but there is
302 Moved Temporarily The server redirects the request to the URI
400 Bad Request The request had bad syntax or was impossible
to fulfill.
404 Not Found The server has not found anything matching the
request.
request.
9
503 Service Unavailable The server is unable to handle the request due
to temporary overload.
10
5 API GROUPS
To make it easier for developers to get an idea of which API requests are supported for different products,
the requests have been grouped together. Information about which groups are supported can be found
5.1 General
The requests specified in the General section are supported by all video products with firmware version
Note:
The URL must follow the standard way of writing a URL, (RFC 2396: Uniform Resource
Identifiers (URI) Generic Syntax); that is, spaces and other reserved characters (";", "/", "?", ":",
"@", "&", "=", "+", "," and "$") within a <parameter> or a <value> must be replaced with
%<ASCII hex>. For example, in the string My camera, the space will have to be replaced with
%20, My%20camera.
Method: GET/POST
Syntax:
http://<servername>/cgi-bin/admin/param.cgi?
<parameter>=<value>[&<parameter>=<value>...]
action=<string> add, remove, update Specifies the action to take. Depending on this
11
5.1.1.1 List parameters
Syntax:
http://<servername>/cgi-bin/admin/param.cgi?action=list
[&<parameter>=<value>...]
<group>.<name>.
http://myserver/cgi-bin/admin/param.cgi?action=list&group=Network
Example: List the names of all Event parameters and Network parameters
http://myserver/cgi-bin/admin/param.cgi?action=list&group=Event&group=Network
Syntax:
http://<servername>/cgi-bin/admin/param.cgi?action=options
12
5.1.1.3 List output format
Content-Type: text/plain\n
\n
<parameter pair>
<parameter>=<value>\n
[ <parameter pair> ]
Content-Type: text/plain\n
\n
root.Network.IPAddress=192.168.0.250\n
root.Network.SubnetMask=255.255.255.0\n
If the CGI request includes an invalid parameter value, the server returns an error message.
Return:
Content-Type: text/plain\n
\n
# Error: <description>\n
Syntax:
http://<servername>/cgi-bin/admin/param.cgi?action=update
[&<parameter>=<value>...]
13
<parameter>=<value> Values Description
<group.name>.
video server.
http://myserver/cgi-bin/admin/param.cgi?
action=update&ImageSource.I0.Sensor.Exposure=auto
http://myserver/cgi-bin/admin/param.cgi?
action=update& Event.E0.Enabled=yes
Add a new user with password and group membership, modify the information and remove a user.
Method: GET/POST
Syntax:
http://<servername>/cgi-bin/admin/pwdgrp.cgi?
<parameter>=<value>[&<parameter>=<value>...]
14
<parameter>=<value> Values Description
get
update = change account information of
exists.
and 0 thru 9.
thru 9.
Ex: dido:camctrl:talk:listen
http://myserver/cgi-bin/admin/pwdgrp.cgi?action=add&user=joe&pwd=foo&sgrp=dido:camctrl:talk:listen
http://myserver/cgi-bin/admin/pwdgrp.cgi?action=update&user=joe&pwd=bar
http://myserver/cgi-bin/admin/pwdgrp.cgi?action=remove&user=joe
15
Example: List groups and users.
http://myserver/cgi-bin/admin/pwdgrp.cgi?action=get
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/privacy.cgi
http://myserver/cgi-bin/admin/privacy.cgi?
Response:
Content-Type: text/plain\n
\n
Username:Dido:Camset:Talk:Listen \n
Admin:1:1:1:1\n
Syntax:
http://<servername>/cgi-bin/admin/userinfo.cgi
http://myserver/cgi-bin/admin/userinfo.cgi?
16
Response:
Content-Type: text/plain\n
\n
Admin:1234\n
Get or modify Admin snapshot path, Admin can capture images by the web page snapshot button, and
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/snapshot.cgi? <parameter>=<value>]
_/\~!@#$%^&+-:
set
Set the Admin snapshot path, with action=set parameter path
is required.
http://myserver/cgi-bin/admin/snapshot.cgi?action=set&path=C%3A%5Ccapture
17
Response:
Content-Type: text/plain\n
\n
OK\n
Manage the local storage, including format storage, list existing file, remove or download an existing file.
Method: GET/POST
Syntax:
http://<servername>/cgi-bin/admin/storagemanagement.cgi?
<parameter>=<value>[&<parameter>=<value>...]
list,
list = get a list of the existing files in the local storage
remove,
download
remove = remove an existing file in local storage
storage .
downloaded.
18
Example: Format the local storage device.
http://myserver/cgi-bin/admin/storagemanagement.cgi?action=format
http://myserver/cgi-bin/admin/storagemanagement.cgi?action=list
http://myserver/cgi-bin/admin/storagemanagement.cgi?action=remove&filename=A_20110101_010101.avi
http://myserver/cgi-bin/admin/storagemanagement.cgi?action=download&filename=A_20110101_010101.avi
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/factorydefault.cgi
19
5.1.7 Hard factory default
Reload factory default. All parameters are set to their factory default value.
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/hardfactorydefault.cgi
5.1.8 Backup
Download a unit specific backup of all files in the folder /etc in tar format.
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/backup.cgi
Response:
Content-Type: application/octet-stream\r\n
Content-length: 15899\r\n
20
5.1.9 Restore
Method: POST
Syntax:
http://<servername>/cgi-bin/admin/restore.cgi
The file is provided in the HTTP body according to the format given in RFC 1867. The body is created
automatically by the browser if using HTML form with input type “file.”
Response: Upload of backup, where “\r\n” has been omitted in the HTTP body.
\r\n
--AaBo3x\r\n
Content-Type: application/octet-stream\r\n
\r\n
\r\n
--AaBo3x--\r\n
21
5.1.10 Firmware upgrade
It will stop some process (like stream server, image transfer .. etc) to prepare firmware upgrade.
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/beforeupgrade.cgi
Method: POST
Syntax:
http://<servername>/cgi-bin/admin/firmwareupgrade.cgi[?<parameter>=<value>]
Streams series:
22
userland.img = UBIFS image binary file
switch.bin, upgrade
main.bin,
module.bin
Full HD WDR IP
Camera:
uImage.img
userland.img
var
uImage_userland
uboot
The file content is provided in the HTTP body according to the format given in RFC 1867. The body is
created automatically by the browser if using HTML form with input type "file".
Example:
\r\n
--AsCg5y\r\n
Content-Type: application/octet-stream\r\n
\r\n
\r\n
--AsCg5y--\r\n
23
5.1.11 Restart server
Restart server.
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/restart.cgi
This CGI request generates and returns a server report. This report is useful as an input when requesting
support. The report includes product information, parameter settings and system logs.
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/serverreport.cgi
24
5.1.13 System logs
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/systemlog.cgi
Return:
Content-Type: text/plain\r\n
\r\n
Method: GET/POST
Syntax:
http://<servername>/cgi-bin/admin/date.cgi?<parameter>=<value>
25
get = get the current date and time.
Syntax:
http://<servername>/cgi-bin/admin/date.cgi?action=get
Return:
Content-Type: text/plain\r\n
\r\n
Example:
Content-Type: text/plain\r\n
\r\n
Syntax:
http://<servername>/cgi-bin/admin/date.cgi?action=set[&<parameter>=<value>...]
26
<parameter>=<value> Values Description
Content-Type: text/plain\r\n
\r\n
OK\r\n
Content-Type: text/plain\r\n
\r\n
http://myserver/cgi-bin/admin/date.cgi?action=set&year=2005&month=4&day=3
Response:
27
Content-Type: text/plain\r\n
\r\n
OK\r\n
Method: POST
Syntax:
http://<servername>/cgi-bin/admin/upload_certificate.cgi[?<parameter>=<value>]
The file content is provided in the HTTP body according to the format given in RFC 1867. The body is
created automatically by the browser if using HTML form with input type "file".
Example:
\r\n
--AsCg5y\r\n
Content-Type: application/octet-stream\r\n
\r\n
28
<firmware file content>
\r\n
--AsCg5y--\r\n
5.2 Image
Method:GET
Syntax:
http://<servername>/cgi-bin/jpg/image.cgi?
When a JPEG image is requested, the server returns either the specified JPEG image file or an error.
Return:
Content-Type: image/jpeg\r\n
\r\n
Content-Type: image/jpeg\r\n
Content-Length: 15656\r\n
\r\n
29
5.3 PTZ
5.3.1 PTZ
To control the Pan, Tilt and Zoom behavior of a PTZ unit, the following PTZ control URL is used. This URL
Important:
Some PTZ units automatically reduce pan and tilt movements as the zoom factor increases. Therefore,
the actual movement may be less than what is requested of these units.
The PTZ control is device-dependent; PTZ control supported camera models are as follows:
Camera-Zoom NH073-18x
X0S6-7
X0S7-7
Camera-Motorized NH323,
NH053,
W2 (NV223),
W3 (NV323),
W5 (NV053)
NH820
Note:
The URL must follow the standard way of writing a URL, (RFC 2396: Uniform Resource Identifiers (URI)
Generic Syntax); that is, spaces and other reserved characters (";", "/", "?", ":", "@", "&", "=", "+", ","
and "$") within a <parameter> or a <value> must be replaced with %<ASCII hex>. For example, in the
string My camera, the space will have to be replaced with %20, My%20camera.
Method: GET/POST
Syntax:
30
http://<servername>/cgi-bin/com/ptz.cgi?<parameter>=<value>[&<parameter>=<value>...]
value
up
down
left
right
upleft
upright
downleft
downright
0 to 9999
0 to 9999
zoom out.
31
rfocus Full HD IP PTZ: Move device n steps relative to
near.
zoom out.
speed.(Motorized models
exclusive)
32
-2, -4, -8, -16, -32, -64, -128
focus far.
speed.(Motorized models
exclusive)
continuously
continuously
support RS485)
1 to 256
function number
33
sequence function number
parameters: imagewidth,
mode.
center mode.
h264_2 rtsp://server_address/h264
mode.
Camera-Zoom:
position
34
http://myserver/cgi-bin/com/ptz.cgi?center=2,4&imageheight=578&imagewidth=722&stream=h264
http://myserver/cgi-bin/com/ptz.cgi?info=1
Camera-Zoom NH073-18x
X0S6-7
X0S7-7
X0S6-6
X0S7-6
NH820
position.
position in seconds.
35
Example: Create a Sequence Line parameter group
http://<servername>/cgi-bin/admin/param.cgi?action=add&group=GuardTour
http://<servername>/cgi-bin/admin/param.cgi?action=add&group=GuardTour.G1.Tour
Note: Preset Points should be available before adding a Sequence Point to the Sequence Line.
http://<servername>/cgi-bin/admin/param.cgi?action=update&GuardTour.G1.Tour.T1.PresetNbr=2
Example: Add another Sequence Point and modify the parameter values in the same request
http://<servername>/cgi-bin/admin/param.cgi?action=add&group=GuardTour.G1.Tour&GuardTour.
G1.Tour.T.PresetNbr=3&GuardTour.G1.Tour.T.WaitTime=5
36
5.3.1.3 PTZ configuration
Method: GET/POST
Syntax:
http://<servername>/cgi-bin/com/ptzconfig.cgi?
<parameter>=<value>[&<parameter>=<value>...]
name>1
Multiple server.
Streams IP
Camera-Zoom:
1 to 256
<preset name>.
1, ... position.
<autopan
line>,<state>
37
setserverautopandirspeed=<int>,<string>,<int> Full HD IP PTZ: Set autopan direction
<direction>, <direction>:left,right
<speed> <speed>:0-3
<cruise <state>
setting
setting
1
<preset name> is a string with a maximum of 31 characters, ~ is not allowed.
5.4 I/O
The requests in the I/O section are supported by the products with Input/Output functions
5.4.1.1 Input
Method: GET
Syntax:
http://<servername>/cgi-bin/io/input.cgi? <parameter>=<value>
38
check=<int>[,<int>,…] <id1>[,<id2>…] Returns the status (1 or 0) of one of more inputs
Number of inputs may be different according to the camera model. Please see the product’s specification
http://myserver/cgi-bin/io/input.cgi?check=1
Response:
Content-Type: text/plain\r\n
\r\n
Input1=0
5.4.1.2 Output
Method: GET
Syntax:
http://<servername>/cgi-bin/io/output.cgi? <parameter>=<value>
39
selected.
/=active, \=inactive
Number of outputs may be different according to the camera model. Please see the product’s
specification
http://myserver/cgi-bin/io/output.cgi?action=1:/
Response:
Content-Type: text/plain\r\n
\r\n
OK
Note: This section explains the commands related to eventdata.cgi. This command could deliver setting
Method: GET
Syntax:
http://<servername>/cgi-bin/admin/eventdata.cgi?<parameter>=<value>[&<parameter>=<value>...]
data.
40
group=<string> Motion, Motion1, Motion2, Motion3, Motion: Motion detection
IO, T0 (event.E1)
(event.E10)
(event.E11)
(event.E12)
Information
concatenated by “,”
enable)
(0…100)
triggered)
41
TamperingParam Enable, Triggered Get interested value of tampering
event(T0)
disabled, 1: enabled)
triggered, 1: triggered)
Syntax:
http://<servername>/cgi-bin/admin/eventdata.cgi?action=get[&<parameter>=<value>...]
http://myserver/cgi-bin/admin/eventdata.cgi?action=get&group=Motion
Content-type: text/plain\r\n
Content-length: 20\r\n
\r\n
Motion:Enabled=0;\r\n
http://myserver/cgi-bin/admin/eventdata.cgi?action=get&group=Motion,Motion2
Content-type: text/plain\r\n
Content-length: 77\r\n
42
\r\n
Motion:Enabled=0;\r\n
Motion2:Enabled=1;Level=15;Sensitivity=80;Triggered=0;\r\n
http://myserver/cgi-bin/admin/eventdata.cgi?action=get&group=Motion,Motion1,IO
Content-type: text/plain\r\n
Content-length: 101\r\n
\r\n
Motion:Enabled=1;Level=0;Sensitivity=80;Triggered=0;\r\n
Motion1:Enabled=0; \r\n
IO:Status=00000100000000;\r\n
\r\n
<XX0><XX1><XX2><XX3><XX4><XX5><XX6>
0: open / 1: closed
0: open / 1: closed
43
<XX4> 00 ~ ff Output1~Output8 setting (active
0: inactive/ 1: active
0: inactive/ 1: active
http://myserver/cgi-bin/admin/eventdata.cgi?action=get&group=Motion,Motion1&
MotionParam=Enabled,Triggered
Content-type: text/plain\r\n
Content-length: 51\r\n
\r\n
Motion:Enabled=1;Triggered=0; \r\n
Motion1:Enabled=0; \r\n
\r\n
Syntax:
http://<servername>/cgi-bin/admin/eventdata.cgi?action=monitor[&<parameter>=<value>...]
Example: Get information of first and second motion window event data continuously.
http://myserver/cgi-bin/admin/eventdata.cgi?action=monitor&group=Motion,Motion1
44
HTTP/1.0 200 OK\r\n
Content-type: multipart/x-mixed-replace;boundary=<boundary>\r\n
\r\n
--<boundary>\r\n
Content-Type: text/plain\r\n
Content-Length: 74\r\n
\r\n
Motion:Enabled=1;Level=0;Sensitivity=80;Triggered=0; \r\n
Motion1:Enabled=0; \r\n
\r\n
--<boundary>\r\n
Content-Type: text/plain\r\n
Content-Length: 75\r\n
\r\n
Motion:Enabled=1;Level=15;Sensitivity=80;Triggered=0; \r\n
Motion1:Enabled=0; \r\n
\r\n
……
Connect a video and audio stream by UDP or TCP with default resolution and compression as defined in
rtsp://<servername>/h264
rtsp://<servername>/h264_2
45
rtsp://<servername>/h264_3
rtsp://<servername>/h264_4
rtsp://<servername>/jpeg
Connect a video stream by HTTP with default resolution and compression as defined in the system
configuration.
http://<servername>:8008
46
5.5.3 RTSP
This document specifies the external RTSP-based application programming interface of the camera and
video servers.
The RTSP URL is rtsp://<server name>/h264 where <server name> is the host name or IP address of
the server. The DESCRIBE, SETUP, OPTIONS, PLAY, PAUSE and TEARDOWN methods are supported. The
Request syntax:
Headerfield1: val1<CRLF>
Headerfield2: val2<CRLF>
...
<CRLF>
Response syntax:
Headerfield3: val3<CRLF>
Headerfield4: val4<CRLF>
...
<CRLF>
The following header fields are accepted by all commands. Other header fields are silently ignored
Field Description
The following header fields can be generated for all responses by the RTSP server:
47
Field Description
request).
The DESCRIBE command returns the SDP (RFC 2327) description for the URI. The DESCRIBE command
Accept List of content types that client supports (application/sdp is the only
supported type).
Content-Base If relative URLs are used in the SDP description, then this is the base URL.
Example:
CSeq: 0
Accept: application/sdp
Response example:
RTSP/1.0 200 OK
CSeq: 0
Content-Base: rtsp://192.168.0.200/h264/
Content-Type: application/sdp
48
Content-Length: 641
v=0
i=h264
t=0 0
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-inf:h264m=video 0 RTP/AVP 99
a=rtpmap:99 H264/90000
a=fmtp:99 packetization-mode=28;profile-level-id=4D0029;
sprop-parameter-sets=Z00AKZpigPAET8uAtQEBAUAAAPoAADqYOhgAQAAABAAG7y40MACAAAAIAA3
eXCgA,aO48gA==
a=control:track1
a=cliprect:0,0,1920,1080
a=framerate:30.000000
a=rtpmap:0 PCMU/8000/1
a=control:track2
49
5.5.3.2 RTSP OPTIONS
Example:
OPTIONS * RTSP/1.0
CSeq: 1
Response example:
RTSP/1.0 200 OK
CSeq: 1
The SETUP command configures the delivery method for the data. The SETUP command requires and
RTP/AVP;unicast;client_port=port1-port2
RTP/AVP;multicast;client_port=port1-port2
RTP/AVP/TCP;unicast
The response returns a session identifier that should be used with stream control commands to the server
(PLAY, PAUSE, TEARDOWN). If the Session header includes a timeout parameter, then the session needs
to be kept alive. This can be done by sending RTSP requests to the server containing the session identifier
(e.g. OPTIONS) within the specified timeout time or through the use of RTCP. The RTSP server does not
Example:
CSeq: 1
50
Transport: RTP/AVP;unicast;client_port=6300-6301
Response example:
RTSP/1.0 200 OK
CSeq: 1
Transport:
RTP/AVP;unicast;destination=192.168.0.102;source=192.168.0.200;client_port=6300-6301;server
_port=6970-6971
Session: 1
Example:
CSeq: 2
Transport: RTP/AVP;unicast;client_port=6302-6303
Response example:
RTSP/1.0 200 OK
CSeq: 2
Cache-Control: must-revalidate
Transport:
RTP/AVP;unicast;destination=192.168.0.102;source=192.168.0.200;client_port=6302-6303;server
_port=6972-6973
Session: 1
51
5.5.3.4 RTSP PLAY
The PLAY command starts (or restarts if paused) the data delivery to the client. The PLAY command
Range Specifies the range of time being played. Since only live streams are used,
the specified time will always begin now and have no stop time.
RTP-Info Information about the RTP stream. More specifically, it includes the next
Example:
CSeq: 3
Session: 1
Range: npt=0.000-
Response example:
RTSP/1.0 200 OK
CSeq: 3
Range: npt=0.000-
Session: 1
RTP-Info:
url=rtsp://192.168.0.200/h264/track1;seq=41182;rtptime=1985344790,url=rtsp://192.168.0.200
/h264/track2;seq=55405;rtptime=3572879460
52
5.5.3.5 RTSP PAUSE
The PAUSE command pauses the data delivery from the server.
Example:
CSeq: 5
Session: 1
Response example:
RTSP/1.0 200 OK
CSeq: 5
Session: 1
The TEARDOWN command terminates the data delivery from the server.
Example:
CSeq: 6
Session: 1
Response example:
RTSP/1.0 200 OK
CSeq: 6
Session: 1
53