Skip to main content

Video streaming

Video streaming over HTTP

The HTTP-based video interface provides the functionality for requesting single and multipart images and for getting and setting internal parameter values. The image and CGI requests are handled by the built-in web server.

Identification

  • Property: Properties.API.HTTP.Version=3
  • Firmware: 5.00 and later.

Common examples

Check supported VAPIX® version.

http://myserver/axis-cgi/param.cgi?action=list&group=Properties.API.HTTP.Version

Check supported resolutions.

http://myserver/axis-cgi/param.cgi?action=list&group=Properties.Image.Resolution

Check supported image formats.

http://myserver/axis-cgi/param.cgi?action=list&group=Properties.Image.Format

Check the default resolution of video source 1.

http://myserver/axis-cgi/imagesize.cgi?camera=1

Request a Motion JPEG video stream.

http://myserver/axis-cgi/mjpg/video.cgi

Image resolution

Use imagesize.cgi to retrieve the real image resolution. The request can be used to verify that the image has the desired resolution and to check the resolution after rotation.

Retrieve the default resolution for video source 1.

Request:

http://myserver/axis-cgi/imagesize.cgi?camera=1

Response:

image width = 720
image height = 576

Request a specific resolution with supplied parameters for video source 1.

Request:

http://myserver/axis-cgi/imagesize.cgi?resolution=QCIF&rotation=180&squarepixel=1&camera=1

Response:

image width = 192
image height = 144

Request

  • Access control: viewer
  • Method: GET/POST

Syntax:

http://<servername>/axis-cgi/imagesize.cgi?camera=<value>[&<argument>=<value>...]

With the following arguments and values:

ArgumentDescription
Supported arguments are listed in Image request arguments.

Response

Responses to imagesize.cgi.

Success

A successful request returns image height and width in pixels.

  • HTTP Code: 200 OK
  • Content-Type: text/plain

Body:

image width=<value>
image height=<value>

Error

If the Axis product does not support the requested resolution, an error message is returned.

  • HTTP Code: 200 OK
  • Content-Type: text/plain

Body (if argument "camera" is specified):

<!-- [error message] -->

Body (if argument "camera" is not specified):

[error message]

Example: <!-- Camera 1 not available. -->

Video status

Use videostatus.cgi to retrieve information about a video encoder’s video sources. The response shows if there is a video signal from a connected analog camera.

Request video status from video source 1, 2, 3 and 4.

http://myserver/axis-cgi/videostatus.cgi?status=1,2,3,4

Response:

HTTP 200 OK
Content-Type: text/plain

Video 1 = video
Video 2 = no video
Video 3 = no video
Video 4 = video

The response no video means that there is no analog video signal.

Request

Request the status information for the video sources. The number of video sources in an Axis product is defined by the parameter ImageSource.NbrOfSources.

  • Access control: viewer
  • Method: GET

Syntax:

http://<servername>/axis-cgi/videostatus.cgi?<argument>=<value>

With the following argument and values:

ArgumentValid valuesDescription
status=<int>[[,<int>],...]1 ... Product-dependent.Check status of the listed video sources.

Response

Responses to videostatus.cgi

Success

  • HTTP Code: 200 OK
  • Content-Type: text/plain

Body:

Video 1 = <information>
...

<information> could be either video or no video.

Bitmap

note

This method has been deprecated and will no longer receive any updates, nor be supported by devices running firmware version 11.0 and beyond.

Use bitmap/image.bmp to request a bitmap image.

To check if the Axis product supports bitmap images, use

Request:

http://myserver/axis-cgi/param.cgi?action=list&group=Properties.Image.Format

Response:

Properties.Image.Format=jpeg,mjpeg,h264,h265,bitmap

Request a bitmap image from the default video source using default settings:

http://myserver/axis-cgi/bitmap/image.bmp

Request a bitmap image from video source 1 with resolution 320x240:

http://myserver/axis-cgi/bitmap/image.bmp?resolution=320x240&camera=1 

Request

  • Access control: viewer
  • Method: GET

Syntax:

http://<servername>/axis-cgi/bitmap/image.bmp[?<argument>=<value<[&<argument>=<value>...]]

With the following arguments and values:

ArgumentDescription
Supported arguments are listed in Image request arguments.

Response

Responses to bitmap/image.bmp.

Success

A successful request returns a bitmap image.

  • HTTP Code: 200 OK

  • Content-type

    image/bitmap

  • Content-length

    <image size in bytes>

Body:

<bitmap image data>

JPEG image (snapshot)

Use jpg/image.cgi to retrieve a JPEG image (a snapshot).

Please note that extensive usage of this feature can affect product performance.

Request a JPEG image from video source 1 with resolution 320x240 and compression 25:

http://myserver/axis-cgi/jpg/image.cgi?resolution=320x240&compression=25&camera=1

Request a JPEG image from video source 2 with the text "My Camera" displayed:

http://myserver/axis-cgi/jpg/image.cgi?text=1&textstring=My%20Camera&camera=2

Request

  • Access control: viewer
  • Method: GET

Syntax:

http://<servername>/axis-cgi/jpg/image.cgi[?<argument>=<value>[&<argument>=<value>...]]

With the following arguments and values:

ArgumentDescription
Supported arguments are listed in Image request arguments,

Response

Responses to jpg/image.cgi

Success

A successful request returns a JPEG image.

  • HTTP Code: 200 OK

  • Content-type

    image/jpeg

  • Content-length

    <image size in bytes>

Body:

<JPEG image data>

Motion JPEG video

Use mjpg/video.cgi to retrieve Motion JPEG video. Arguments such as resolution and compression can be specified directly in the request, but it is also possible to use image settings saved in a stream profile. A setting saved in a stream profile can be overridden by specifying a new value after the stream profile argument.

See also Stream profiles.

Request a Motion JPEG video stream from video source 1 with resolution 320x240 and compression 25:

http://myserver/axis-cgi/mjpg/video.cgi?resolution=320x240&compression=25&camera=1

Request a Motion JPEG video stream from the default video source with frame rate 5:

http://myserver/axis-cgi/mjpg/video.cgi?fps=5

Request a Motion JPEG video stream using the ‘myprofile’ stream profile but with a lower resolution:

http://myserver/axis-cgi/mjpg/video.cgi?streamprofile=myprofile&resolution=CIF

Request

  • Access control: viewer
  • Method: GET

Syntax:

http://<servername>/axis-cgi/mjpg/video.cgi[?<argument>=<value>[&<argument>=<value>...]]

With the following arguments and values.

ArgumentValid valuesDescription
streamprofile=<string><stream profile name>Use a predefined stream profile. Supported stream profile names are stored in the StreamProfile.S#.Name parameters.
duration=<int>An unsigned integerSpecifies for how many seconds the video will be generated and pushed to the client.0= unlimited.
nbrofframes=<int>An unsigned integerSpecifies how many frames the Axis product will generate and push.0= unlimited.
fps=<int>An unsigned integerUsing fps it is possible to specify the frame rate from the Axis product.0=unlimited.
The arguments listed in Image request arguments.

Response

Responses to mjpg/video.cgi

Success

A successful request returns a continuous flow of JPEG images. The content type is multipart/x-mixed-replace and each image ends with a boundary string <boundary>.

  • HTTP Code: 200 OK
  • Content-Type: multipart/x-mixed-replace; boundary=<boundary>

Body:

--<boundary>
<image>

--<boundary>
<image>

Where the returned <image> field is:

Content-Type: image/jpeg
Content-Length: <image size in bytes>

<JPEG image data>

Image request arguments

The following arguments and values can be used in JPEG, motion JPEG or bitmap CGI (deprecated as of firmware version 11.0) requests. Unless overridden by an argument it is the default values as configured via the GUI (or param.cgi) that decides the characteristics of the image or video.

ArgumentValid valuesDescription
resolution=<string>A string Product/release-dependent.Resolution of the returned image. For supported resolutions, check in parameter Properties.Image.Resolution.
camera=<string>1 ... quadSelects the video source. If omitted the default value camera=1 is used. This argument is only valid for Axis products with more than one video source. That is cameras with multiple view areas and video encoders with multiple video channels.
compression=<int>0 ... 100 (Product/release-dependent.)Adjusts the compression level of the image. Higher values correspond to higher compression, that is lower quality and smaller image size. Note: This value is internally mapped and is therefore product-dependent.
rotation=<int>0 90 Product/release-dependent. 180 Product/release-dependent. 270 Product/release-dependent.Rotate the image clockwise. The number of rotation alternatives in an Axis product is defined by the parameter Properties.Image.Rotation.
paletteProduct dependentApplies to thermal cameras. The color palette to use.Applicable if Properties.Image.Palette.StreamPalette=yes or does not exist.See Color palettes.
squarepixel=<int>0 1Enable/disable square pixel (aspect ratio) correction. If the parameter is set to 1 the Axis product will adjusts the aspect ratio to make it appear as intended.
note

For information about overlay arguments, see in Text overlay API. For image overlays, see Image overlay API (Old version).

Video streaming over RTSP

RTSP (Real Time Streaming Protocol) is a control protocol for media streams delivered by a media server. RTSP can be considered a "remote control" providing commands such as play and pause. In addition, RTSP API provides parameters controlling media stream properties such as resolution, compression, video bit rate and audio as well as parameters controlling the image settings.

Please refer to the release notes for the actual product for compliance information.

The RTSP server in the Axis products is based on RFC 2326 Real Time Streaming Protocol (RTSP), RFC 4566 SDP: Session Description Protocol and RFC 3550 RTP: A Transport Protocol for Real-Time Applications.

When streaming both video and audio the audio and video can be synchronized by using RTP timestamps as described in RFC 3550.

Identification

  • Property: Properties.API.RTSP.Version=2.01 and later
  • Property: Properties.API.RTSP.RTSPAuth=yes

RTSP commands

The RTSP API provides several commands for media stream control.

Request syntax

To send a RTPS request use the following example.

Syntax

COMMAND rtsp://<servername>/axis-media/media.amp[?<parameter>=<value>[&<parameter>=<value>...]] RTSP/1.0<CRLF>
Headerfield1: val1<CRLF>
Headerfield2: val2<CRLF>
...
<CRLF>

[Body]

COMMAND is any of DESCRIBE, SETUP, OPTIONS, PLAY, PAUSE, TEARDOWN, SET_PARAMETER or GET_PARAMETER. Lines are separated with Carriage Return and Line Feed (CRLF).

Supported RTSP URL parameters and their values are listed in sectionParameter specification RTSP URL.

note

RTSP requests always contain the absolute URL.

The following header fields are accepted by all commands. Some commands accept or require additional header fields:

Header fieldDescription
AuthorizationAuthorization information from the client.
CSeqRequest sequence number.
SessionSession identifier (returned by the Axis product in SETUP response).
Content-LengthLength of content.
Content-TypeThe media type of the content.
User-AgentInformation about the client that initiates the request.
RequireQuery whether an option is supported. Unsupported features are listed in the Unsupported header field.

Response syntax

RTSP/1.0 <Status Code> <Reason Phrase> <CRLF>
Headerfield1: val3<CRLF>
Headerfield2: val4<CRLF>
...

[Body]

The first response line contains a status code and a reason phrase indicating the success or failure of the request. The status codes are described in RFC 2326.

The following header fields can be included in all RTSP response messages:

Header fieldDescription
CSeqResponse sequence number (matches the sequence number of the request).
SessionSession identifier.
WWW-AuthenticateAuthentication from client requested.
DateDate and time of the response.
UnsupportedFeatures not supported by the Axis product.

RTSP DESCRIBE

The DESCRIBE command is used to request an SDP description of the media stream(s). The Session Description Protocol (SDP) is described in RFC 2327.

The DESCRIBE request accepts the additional header field:

Header fieldDescription
AcceptList of content types that client supports (application/sdp is the only supported type).

The response to the DESCRIBE command contains the additional header fields:

Header fieldDescription
Content-TypeType of content (application/sdp).
Content-LengthLength of SDP description.
Content-BaseIf relative URLs are used in the SDP description, this is the base URL.

Example 1:

Request

DESCRIBE rtsp://myserver/axis-media/media.amp?videocodec=h264&resolution=640x480  RTSP/1.0
CSeq: 0
User-Agent: Axis AMC
Accept: application/sdp

Response

RTSP/1.0 200 OK
CSeq: 0
Content-Type: application/sdp
Content-Base: rtsp://myserver/axis-media/media.amp/
Date: Wed, 16 Jul 2008 12:48:47 GMT
Content-Length: 847

v=0
o=- 1216212527554872 1216212527554872 IN IP4 myserver
s=Media Presentation
e=NONE
c=IN IP4 0.0.0.0
b=AS:50064
t=0 0
a=control:rtsp://myserver/axis-media/media.amp?videocodec=h264&resolution=640x480
a=range:npt=0.000000-
m=video 0 RTP/AVP 96
b=AS:50000
a=framerate:30.0
a=transform:1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000
a=control:rtsp://myserver/axis-media/media.amp/trackID=1?videocodec=h264&resolution=640x480
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; profile-level-id=420029;
sprop-parameter-sets=Z0IAKeKQFAe2AtwEBAaQeJEV,aM48gA==
m=audio 0 RTP/AVP 97
b=AS:64
a=control:rtsp://myserver/axis-media/media.amp/trackID=2?videocodec=h264&resolution=640x480
a=rtpmap:97 mpeg4-generic/16000/1
a=fmtp:97 profile-level-id=15; mode=AAC-hbr;config=1408; SizeLength=13; IndexLength=3;IndexDeltaLength=3; Profile=1; bitrate=64000;

SDP media attribute transform

Depending on product model, the SDP file may contain a video media attribute transform. If the streamed video is rotated, mirrored or cropped from the image source configuration, this video media attribute shows how the video stream is orientated in relation to the image source configuration. The orientation is described by a transformation matrix consisting of homogeneous coordinates for two-dimensional operations (a 3x3 matrix).

Syntax

a=transform:<MATRIX>

The matrix is formatted using commas to separate columns and semicolons to separate rows. Decimal representations of fractional values using the notation "<integer>.<fraction>" are allowed.

Example 2:

A video stream which is rotated 90 degrees is described by:

a=transform:0,-1,0;1,0,0;0,0,1

RTSP OPTIONS

The OPTIONS request returns a list of supported RTSP commands. The command can be used to keep RTSP sessions alive by repeating the OPTIONS request at regular intervals. The session timeout time is specified by the timeout parameter returned from the SETUP command.

The response to the OPTIONS command contains the additional header field:

Header fieldDescription
PublicSpecify the supported RTSP commands.

Example 3:

List supported commands. The asterisk (*) makes the request apply to the server and not to a particular URL.

Request

OPTIONS * RTSP/1.0
CSeq: 1
User-Agent: Axis AMC
Session: 12345678

Response

RTSP/1.0 200 OK
CSeq: 1
Session: 12345678
Public: DESCRIBE, GET_PARAMETER, PAUSE, PLAY, SETUP, SET_PARAMETER, TEARDOWN
Date: Wed, 16 Jul 2008 12:48:48 GMT
note

As indicated in the response, the GET_PARAMETER command is supported; there are however no parameters to retrieve.

RTSP SETUP

The SETUP command is used to configure the data delivery method.

The SETUP request requires an additional header field which is also included in the response:

Header fieldDescription
TransportSpecify how the data stream is transported. Supported variants are: RTP/AVP;unicast;client_port=port1-port2 RTP/AVP;multicast;port=port1-port2 RTP/AVP/TCP;unicast

If using unicast in combination with TCP, it is recommended to increase the size of the RTP packets to 64 000 bytes (from the standard 1500 bytes), provided that the client can accept larger packets. Also for unicast streaming over RTP/UDP it might be beneficial to increase the packet size if no packets are dropped. The packet size is changed using the following header field in the SETUP request:

Header fieldDescription
BlocksizeRequest a specific media packet size. The packet size should be a positive decimal number measured in octets.

The response returns a session identifier that should be used together with the stream control commands (for example PLAY, PAUSE and TEARDOWN). If the session header includes the timeout parameter, the session will close after the timeout time unless explicitly kept alive. Session can be kept alive by sending RTSP requests to the Axis product containing the session identifier (for example OPTIONS) within the timeout time or by using RTCP messages. Reconfiguration of transport parameters is not supported.

Example 4:

The response to the first SETUP request returns the session identifier (Session) which is used in subsequent requests. The control URL should be read from DESCRIBE and used in SETUP.

Request

SETUP rtsp://myserver/axis-media/media.amp/trackID=1?videocodec=h264&resolution=640x480  RTSP/1.0
CSeq: 2
User-Agent: Axis AMC
Transport: RTP/AVP;unicast;client_port=20000-20001

Response

RTSP/1.0 200 OK
CSeq: 2
Session: 12345678; timeout=60
Transport: RTP/AVP;unicast;client_port=20000-20001;
server_port=50000-50001;ssrc=B0BA7855;mode="PLAY"
Date: Wed, 16 Jul 2008 12:48:47 GMT

Example 5:

Request

SETUP rtsp:///myserver//axis-media/media.amp/trackID=2?videocodec=h264&resolution=640x480  RTSP/1.0
CSeq: 3
User-Agent: Axis AMC
Transport: RTP/AVP;unicast;client_port=20002-20003
Session: 12345678

Response

RTSP/1.0 200 OK
CSeq: 3
Session: 12345678; timeout=60
Transport: RTP/AVP;unicast;client_port=20002-20003;
server_port=50002-50003;ssrc=D7EB59C0;mode="PLAY"
Date: Wed, 16 Jul 2008 12:48:48 GMT

RTSP PLAY

The PLAY request starts (or restarts if paused) the data delivery to the client.

note

When playing a motion JPEG via RTSP there is a resolution limit of 2040x2040 pixels.

The response to the PLAY command contains the additional header fields:

Header fieldDescription
RangeThe play time period.
RTP-InfoInformation about the RTP stream, including the sequence number of the first packet of the stream.

Example 6:

Request

PLAY rtsp://myserver/axis-media/media.amp?videocodec=h264&resolution=640x480 RTSP/1.0
CSeq: 4
User-Agent: Axis AMC
Session: 12345678

Response

RTSP/1.0 200 OK
CSeq: 4
Session: 12345678
Range: npt=0.645272-
RTP-Info: url=rtsp://myserver/axis-media/media.amp/
trackID=1?videocodec=h264&resolution=640x480;seq=46932;
rtptime=1027887748, url=rtsp://myserver/axis-media/media.amp/trackID=2?videocodec=h264&resolution=640x480;seq=3322;rtptime=611053482
Date: Wed, 16 Jul 2008 12:48:48 GMT

Example 7:

Play the recording "myrecording".

Request

PLAY rtsp://myserver/axis-media/media.amp?recordingid="myrecording"  RTSP/1.0
CSeq: 4
User-Agent: Axis AMC
Session: 12345678

RTSP PAUSE

The PAUSE request is used to temporarily stop data delivery from the Axis product. Use PLAY to restart data delivery.

Example 8:

Request

PAUSE rtsp://myserver/axis-media/media.amp?videocodec=h264&resolution=640x480 RTSP/1.0
CSeq: 5
User-Agent: Axis AMC
Session: 12345678

Response

RTSP/1.0 200 OK
CSeq: 5
Session: 12345678
Date: Wed, 16 Jul 2008 12:48:49 GMT

RTSP PAUSE on live stream

If PAUSE is requested during live streaming the data transmission will stop immediately. If PLAY later is requested the live steam starts on the latest sampled frame. That means that the client will lose the video during the time that the stream has been paused. The client is notified in the Range header which interval that will be streamed.

RTSP TEARDOWN

The TEARDOWN request is used to close the data delivery from the Axis product.

Example 9:

Request

TEARDOWN rtsp://myserver/axis-media/media.amp?videocodec=h264&resolution=640x480 RTSP/1.0
CSeq: 6
User-Agent: Axis AMC
Session: 12345678

Response

RTSP/1.0 200 OK
CSeq: 6
Session: 12345678
Date: Wed, 16 Jul 2008 12:49:01 GMT

RTSP SET_PARAMETER

The SET_PARAMETER command is used to change session parameters, currently only I-frame request is supported. The command sets the Renew-Stream parameter to yes.

note

Renew-Stream must be sent in the body. The corresponding Renew-Stream parameter in some firmware 4.xx products had to be sent in the header. See example 2 below.

Example 10:

Use of SET_PARAMETER in firmware 5.xx products. Renew-Stream is sent in the body.

Request

SET_PARAMETER rtsp://myserver/axis-media/media.amp RTSP/1.0
CSeq: 7
Session: 12345678
Content-Type: text/parameters
Content-Length: 19

Renew-Stream: yes

Response

RTSP/1.0 200 OK
CSeq: 7
Session: 12345678
Date: Wed, 16 Jul 2008 13:01:25 GMT

Example 11:

In some older Axis products, I-frames were requested using RenewStream:yes in the header. To find out whether Renew-Stream should be sent in the header or the body, the following method is recommended.

Send a request with Require and RenewStream:yes in the header.

Request

SET_PARAMETER rtsp://myserver/axis-media/media.amp RTSP/1.0
CSeq: 7
Session: 12345678
Require: com.axis.parameters-in-header
RenewStream: yes

If the request is successful (response 200 OK), the stream is renewed. Else, the Axis product responds with 551 Option not supported (below) and RenewStream should be sent in the body.

Response:

RTSP/1.0 551 Option not supported
CSeq: 7
Session: 12345678
Unsupported: com.axis.parameters-in-header
Date: Wed, 16 Jul 2008 13:01:24 GMT

Send a second request with RenewStream:yes in the body.

Request

SET_PARAMETER rtsp://myserver/axis-media/media.amp RTSP/1.0
CSeq: 8
Session: 12345678
Content-Type: text/parameters
Content-Length: 19

Renew-Stream: yes

Successful response

RTSP/1.0 200 OK
CSeq: 8
Session: 12345678
Date: Wed, 16 Jul 2008 13:01:25 GMT

RTSP over HTTP

RTSP can be tunnelled over HTTP. This might prove necessary in order to pass firewalls etc. To tunnel RTSP over HTTP, two sessions are set up; one GET (for command replies and stream data) and one POST (for commands). RTSP commands sent on the POST connection are base64 encoded, but the replies on the GET connection are in plain text. To bind the two sessions together the Axis product needs a unique ID (conveyed in the x-sessioncookie header). The GET and POST requests are accepted on both the HTTP port (default 80) and the RTSP server port (default 554).

note

Syntax

http://<servername>/axis-media/media.amp

Supported methods are GET and POST.

Example 1:

GET request.

Request

GET axis-media/media.amp?videocodec=h264&audio=0  HTTP/1.0
x-sessioncookie: 123456789

Response

HTTP/1.0 200 OK
Content-Type: application/x-rtsp-tunnelled

Example 2:

POST request. There is no response from the Axis product.

Request

POST axis-media/media.amp?videocodec=h264&audio=0  HTTP/1.0
x-sessioncookie: 123456789
Content-Length: 32767
Content-Type: application/x-rtsp-tunnelled

After this request has been sent it is possible to send RTSP requests like below.

DESCRIBE rtsp://myserver/axis-media/media.amp?videocodec=h264 RTSP/1.0
CSeq: 14
User-Agent: Axis AMC
Accept: application/sdp

Network Parameters

The following parameters in the Network.RTSP group control RTSP authentication.

Network.RTSP

ParameterDefault valuesValid valuesAccess controlDescription
AuthenticateOverHTTPno Even if the current default behavior is not to require RTSP authentication when tunnelling through HTTP, this will probably change in the future. It is therefore strongly recommended to implement RTSP digest authentication for all clients that use RTSP over HTTP.yes noadmin: readPerform a RTSP authentication when tunneling RTSP over HTTP. yes = The RTSP server requests authentication. This is made regardless if the HTTP-connection is authenticated or not. no = The RTSP server will not request authentication. It is assumed that the HTTP-connection already is authenticated.

Parameter specification RTSP URL

RTSP API provides parameters for requesting media streams with specific properties and for image settings. The parameters should be included in the RTSP URL.

Syntax

rtsp://<servername>/axis-media/media.amp[?<parameter>=<value>[&<parameter>=<value>...]]

The following parameters are supported for H.264, H.265, MPEG-4 Part 2 and Motion JPEG streams:

ParameterValid valuesDescription
videocodech264 Product/release-dependent. h265 Product/release-dependent. mpeg4 Product/release-dependent. jpegThe selected video codec.Default: Product dependent; in order of priority: h264, h265, mpeg4, jpeg.Available values are defined by parameter Properties.Image.Format
streamprofileA stringName of a saved stream profile. A stream profile is a set of video stream parameters (including videocodec) and is defined in the HTTP API or the web GUI. Supported stream profile names are stored in the StreamProfile.S#.Name parameters. It is possible override parameter values saved in a stream profile by specifying new values after the stream profile. See Stream profiles section for details.
recordingidA stringName of a saved recording.
resolutionProduct dependentSpecify the resolution of the returned image. Available values are defined by parameter Properties.Image.Resolution
audio0 1Specify whether audio shall be available in the stream (for compatibility with applications without audio control). 0 = No audio. 1 = Audio. Default: 1
camera1 ... quad Product/release-dependent.Select the video source or the quad stream.
compression0 … 100 Product/release-dependent.Adjust the compression level of the image. Higher values correspond to higher compression, that is lower image quality and smaller image size.Note: This value is internally mapped and therefore product-dependent.
colorlevel Product/release-dependent.0 … 100 Product/release-dependent.Set the level of color or grey scale.0 = Grey scale. 100 = Full color.Note: This value is internally mapped and therefore product-dependent.
color0 1Enable/disable color.0 = Black and white. 1 = Color.
paletteProduct dependentApplies to thermal cameras. The color palette to use.Applicable if Properties.Image.Palette.StreamPalette=yes or does not exist.See Color palettes.
clockNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.0 1Show/hide the time stamp.0 = Hide. 1 = Show.
dateNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.0 1Show/hide the date.0 = Hide. 1 = Show.
textNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.0 1Show/hide the text.0 = Hide. 1 = Show.
textstringNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.A percent-encoded stringSet the text shown in the image.
textcolorNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.black whiteSet the color of the text shown in the image.
textbackgroundcolorNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.black white transparent semitransparentSet the color of the text background shown in the image.
rotation0 90 Product/release-dependent. 180 Product/release-dependent. 270 Product/release-dependent.Rotate the image clockwise. Available values are defined by parameter Properties.Image.Rotation
textposNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.0 1The position of the string shown in the image.0 = Top. 1 = Bottom.
overlayimageNote> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.0 1Enable/disable overlay image.0 = Disable. 1 = Enable.
overlaypos=<int>,<int> overlaypos=<int>x<int>Note> This parameter has been deprecated. As of firmware 10.6 it will not be possible to use it to create, remove or manipulate overlays using the URL.Two unsigned integersSet the x and y coordinates defining the position of the overlay image.
nbrofframesNote> This parameter has been deprecated and will no longer receive any updates.An unsigned integerSet the number of frames the Axis product will generate and push. 0 = Unlimited.
fpsAn unsigned integerSet the frame rate from the Axis product. 0 = Unlimited.
pull=<bool>0 1Optional parameter for use with the PLAY request when downloading a recording.1 = Stream as fast as possible. Should only be used when downloading a recording. Because the receiving part determines the transfer rate, this is only useful when tunneling RTSP over HTTP. 0 = Default. Pull disabled. Use this for real-time playback.
overlaysall text image application offParameter that makes it possible to show specific overlays.all: All configured overlays are visible. text: Only text overlays are visible. image: Only image overlays are visible. application: Only overlays created by an application are visible. off: No overlays are visible.

H.264, H.265 and MPEG-4 Part 2 streams support the following additional parameters:

ParameterValid valuesDescription
videokeyframeintervalAn integerKey frame interval. Please note that when using dynamic GOP mode, this value will correspond to the minimum GOP length, while videozmaxgoplength will be the maximum GOP length.Default: 32, which contains 1 I-frame and 31 P-frames.
videoframeskipmodedrop, emptyDetermines what to do when either the rate controller or zipstream skips a frame.Set to drop means that the frame won’t be transmitted at all.Set to empty means that an empty frame will be sent in place of the actual frame.
videozprofileclassic storageThe Zipstream profile. Default value is classic. classic: All parameters has to be setup manually. storage: Setup parameters to optimize for storage. See setprofile.cgi for additional information. Please note that using any other profile than classic will result in dynamic GOP being handled automatically.
videozprofilelevel0...The Zipstream profile level. See setprofile.cgi.
videozstrength Product/release-dependent.See Zipstream strength.Zipstream strength.Default: The current strength set by zipstream/setstrength.cgi. See Zipstream API.
videozgopmode Product/release-dependent.fixed dynamicZipstream GOP mode.Default: The current GOP mode set by zipstream/setgop.cgi. See Zipstream API.
videozmaxgoplength Product/release-dependent.1 ... 1200Maximum GOP length for dynamic Zipstream GOP mode.Default: The current maximum GOP length set by zipstream/setgop.cgi. See Zipstream API.
videozfpsmode Product/release-dependent.fixed dynamicZipstream FPS mode.Default: The current option to allow a dynamic fps decoding set by zipstream/setfpsmode.cgi. See Zipstream API.
videozminfps Product/release-dependent.0 ...Minimum frame rate.Default: The current minimum frame rate set by zipstream/setminfps.cgi Zipstream API.This parameter can use either integers or fractions. Using integers means that the value can be anything between 0 and the number of fps of the stream. Fractions will equalize any negative number to 1.

You can also use the following parameters from the Rate control API:

  • videobitratemode
  • videobitratepriority
  • videobitrate
  • videomaxbitrate
  • videoabrtargetbitrate
  • videoabrmaxbitrate
  • videoabrretentiontime
  • maxframesize

H.264 streams support the following additional parameter:

ParameterValid valuesDescription
h264profile Product/release-dependent.high Product/release-dependent. main Product/release-dependent. baselineThe H.264 profile to use. Available values are defined by parameter Properties.Image.H264.Profiles

Motion JPEG streams support the following additional parameter:

ParameterValid valuesDescription
squarepixel0 1Enable/disable square pixel (aspect ratio) correction. If the parameter is set to 1 the Axis product will adjusts the aspect ratio to make it appear as intended.

For parameters used to control the bit rate of a video stream, see Rate control.

Public parameter description

Metadata

ArgumentValid valuesDescription
audio0 1Specifies if the audio should be made available in the stream. 0 = no audio 1 = audio Default value: Configurable, see Audio.A0.Enabled in the Audio API for additional information.
video0 1Specifies if the video should be made available in the stream. 0 = no video 1 = video Default value: 1
eventoff onSpecifies if the event metadata should be made available in the stream. off = no event metadata on = event metadata Default value: off
eventtopicStringA string containing the event topics filter. An empty string means that all events will be used. See the eventtopic section in Event filter parameters for the syntax. Only useful when the parameter event = on.
eventcontentStringA string containing the event content filter. See the eventcontent section in Event filter parameters for the syntax. Only useful when the parameter event = on.
ptznone all status positionnone: No PTZ status or position information. all: Returns both PTZ status and position information. status: Returns PTZ status information. position: Returns PTZ position information.
analyticsoff box polygonoff: No scene data in the stream. box: Scene objects is represented with a bounding box and object classification data (if the camera support or has been configured to use it). polygon: Scene objects is represented with both a polygon and a bounding box and object classification data (if the camera support or has been configured to use it).
ptz_pantilt_coordinate_spacegeneric degrees digitalSets the coordinate space for the pan/tilt positions. Does not have any effect unless PTZ is set to either all or position. generic: Use http://www.onvif.org/ver10/tptz/PantiltSpaces/PositionGenericSpace degrees: Use http://www.onvif.org/ver10/tptz/PantiltSpaces/SphericalPositionSpaceDegrees digital: Use http://www.onvif.org/ver10/tptz/PantiltSpaces/DigitalPositionSpace
ptz_zoom_coordinate_spacegeneric digitalSets the coordinate space for the zoom positions. Does not have any effect unless PTZ is set to either all or position. generic: Use http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace digital: Use http://www.onvif.org/ver10/tptz/ZoomSpaces/NormalizedDigitalPosition
streamtypeunicast multicast bothSpecifies the method that should be used for the media or metadata streams, be it in multi- or unicast. Using both indicates that the cast method should be negotiated in the RTSP setup.

Event filter parameters

The event filter parameters eventtopic and eventcontent allows you to specify the events that should be included in the metadata stream. The parameters are combined into a single filter expression and any event that matches the filter will be included into the stream. The syntax for parameters is based on the ONVIF specification, but will not be not identical.

eventtopic

Using eventtopic allows you to filter events by topics with the following syntax:

  • Syntax: eventtopic=<filter1>[,<filter2>[...<filterN>]]

In this case <filter?> is a Topic Expression filter of the ConcreteSet dialect with predefined topic prefixes. Allowed topic prefixes are:

PrefixNamespace url
onvifhttp://www.onvif.org/ver10/topics
axishttp://www.axis.com/2009/event/topics

Multiple <filter?> can be combined into a single Topic Expression filter. A special case with an empty filter expression is allowed and will watch any event.

eventcontent

Using eventcontent allows you to filter event messages by the content with the following syntax:

  • Syntax: eventcontent=<filter>

In this case <filter> is a MessageContent filter expression in the ItemFilter dialect, as defined in the ONVIF specification. The filter expression can be URL encoded in cases where special characters must be included.

Error messages RTSP

The error messages for RTSP are described in RFC 2326.

RTCP

RTP Control Protocol (RTCP) is implemented according to the standard in RFC 3550.

Always multicast

Always multicast means starting a multicast stream and letting it run continuously. Enabling always multicast reduces the latency when connecting to an Axis product. The always multicast streams enabled on the Axis product are presented by a Session Description Protocol (SDP). Using this information the client can choose to connect to the service.

Identification

  • Property: Properties.API.HTTP.Version=3
  • Firmware: 5.40 and later.

SDP

The client makes a request according to the example below. The camera parameter specifies the desired video source on the Axis product.

To make a SDP request it is required that Network.RTP.R0.AlwaysMulticastVideo=yes.

Request SDP URL

http://myserver/axis-cgi/alwaysmulti.sdp?camera=1

Response SDP URL

The Axis product responds the request with a SDP. The SDP is protected by the HTTP authentication of the Axis product. Viewer, operator, and admin can make SDP requests.

v=0
o=- 1284464363092904 1284464363092904 IN IP4 axis
s=Multicast presentation
e=NONE
t=0 0
a=range:npt=0.000000-
m=video 50000 RTP/AVP 96
c=IN IP4 239.225.149.138/0
b=AS:50000
a=framerate:25.0
a=transform:1,0,0;0,1,0;0,0,1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; profile-level-id=420029;
sprop-parameter-sets=Z0IAKeKQFgJNgScFAQXh4kRU,aM48gA==

Scene profile API

Description

The scene profile functionality gives the user the ability to quickly change between pre-defined sets of image settings such as shutter and gain for example. All streams are affected by the Scene Profile setting, that is, it is not possible to have different scene profile settings for different streams. The scene profile parameter is accessed through the Parameter Management API, described in section Parameter management.

Supported functionality:

ParameterDescription
GetGet the current scene profile settings.
SetSet the scene profile settings.

Identification

VAPIX® Scene Profile API is available if:

  • Property: Properties.API.HTTP.Version=3 and later.
  • Property: ImageSource.I#.SceneProfile exists
  • Firmware: 6.25 and later.
  • Product category: Camera

Obsoletes

ProfileReplacement
profile0forensic
profile1vivid
profile2traffic_overview

Common examples

List supported scene profiles

Use this example to retrieve a list of the supported Scene Profile settings.

1. To list the supported Scene profiles:

http://<servername>/axis-cgi/param.cgi?action=listdefinitions&listformat=xmlschema&responseformat=rfc&responsecharset=utrf&group=ImageSource.I0.SceneProfile

2. Parse the XML response.

The response gives information about the supported Scene profile values and names.

<entry value="forensic" niceValue="Forensic" />
<entry value="vivid" niceValue="Vivid" />
<entry value="traffic_overview" niceValue="Traffic Overview" />
<entry value="license_plate" niceValue="License Plate" />

Response

  • HTTP: 200 OK

The camera will be the same regardless if an invalid value is passed to the API. No changes will be made unless a valid value is received by the API.

Change scene profiles

1. Switch to the Vivid scene profile (see the previous section).

http://<servername>/axis-cgi/param.cgi?action=update&ImageSource.I0.SceneProfile=vivid

Response

  • HTTP: 200 OK

The response will be the same even if an invalid value is passed to the API. No changes will be made unless a valid value is received by the API.

API specification

Valid scene profiles

note

Valid profiles are product dependent and the default profile may vary between cameras.

Valid valuesDescription
forensicProfile with optimized image settings recommended for surveillance purposes.
vividProfile that add colors and produces an image with a higher contrast between dark and light areas.
traffic_overviewProfile that optimizes image settings for vehicle traffic monitoring.
indoorProfile with optimized image settings for indoor monitoring.
outdoorProfile with optimized image settings for outdoor monitoring.
license_plateProfile with optimized image settings for detecting vehicle number plates.

Access control

UserAccess control
adminread, write
operatorread, write
viewer

For more information, see Parameter management

Stream profiles

A stream profile is a set of video stream parameters, for example video codec, resolution, frame rate and compression, and can be used when retrieving a video stream from the Axis product. All parameters that can be used in a video stream request (HTTP or RTSP) can be saved in a stream profile. One can for example create stream profiles suitable for different applications, devices or situations and then use the stream profiles when recording video or requesting live video.

Most Axis products have a number of predefined stream profiles. The predefined stream profiles are designed according to basic requirements and can be customized as needed. It is also possible to create new stream profiles. User-created profiles can also be removed. Predefined stream profiles cannot be removed.

Stream profile parameters are listed, updated, added and removed using the Parameter Management API, see Parameter management.

Identification

  • Property: Properties.API.HTTP.Version=3
  • Firmware: 5.00 and later.

Common examples

Add a new stream profile. In this example the new profile is the 5th stream profile so it will be referred to as StreamProfile.S4.

Request:

http://myserver/axis-cgi/param.cgi?action=add
&template=streamprofile
&group=StreamProfile

Response:

S4 OK

Add and configure a stream profile in one request. Here the profile is named myprofile2 and the Parameters string is videocodec=h264&resolution=4CIF&text=1&textstring=4CIF%20profile. SeeImage request arguments what arguments that could be used in the Parameters string.

note

Characters in the Parameters string must be percent-encoded, so resolution=CIF&text=1&textstring=CIF%20profile becomes resolution%3dCIF%26text%3d1%26textstring%3dCIF%2520profile\

The blank space is encoded as %20, the equal sign (=) as %3d, the ampersand (&) as %26 and the percent sign is encoded as %25.

Request:

http://myserver/axis-cgi/param.cgi?action=add
&template=streamprofile
&group=StreamProfile
&StreamProfile.S.Name=myprofile2
StreamProfile.S.Description=My%204CIF%20profile
&StreamProfile.S.Parameters=videocodec%3dh264
%26resolution%3d4CIF%26text%3d1%26textstring%3d4CIF%2520profile

Response:

S5 OK

Configure a stream profile. In this example the profile is named myprofile and the Parameters string contains the following arguments: resolution=CIF, text=1 and textstring=CIF profile. SeeImage request arguments what arguments that could be used in the Parameters string.

note

Characters in the Parameters string must be percent-encoded, so resolution=CIF&text=1&textstring=CIF%20profile becomes resolution%3dCIF%26text%3d1%26textstring%3dCIF%2520profile.\


The blank space is encoded as %20, the equal sign (=) as %3d, the ampersand (&) as %26 and the percent sign is encoded as %25.

Request:

http://myserver/axis-cgi/param.cgi?action=update
&StreamProfile.S4.Name=myprofile
&StreamProfile.S4.Description=My%20CIF%20profile
&StreamProfile.S4.Parameters=resolution%3dCIF%26text%3d1%26textstring%3dCIF%2520 profile

Response:

OK

List the parameters of a stream profile.

Request:

http://myserver/axis-cgi/param.cgi?action=list&group=StreamProfile.S5

Response:

root.StreamProfile.S5.Name=myprofile2
root.StreamProfile.S5.Description=My%204CIF%20profile
root.StreamProfile.S5.Parameters=videocodec%3dh264
%26resolution%3d4CIF%26text%3d1
%26textstring%3d4CIF%2520profile

Stream profile parameters

The parameters in the StreamProfile group control stream profile settings.

note

In order to create a new dynamic parameter admin or operator access control is needed.

[StreamProfile.S#]

  • Template: streamprofile
ParameterValid valuesAccess controlDescription
NameA-Z a-z 0-9 -, _admin: read, write operator: read, write viewer: readThe name of the stream profile used in the requests.Note: Each profile must have a unique name.
DescriptionA string.admin: read, write operator: read, write viewer: readUser-friendly description of the profile.
Parameters<argument1>=<value1> &<argument2>=<value2> ...admin: read, write operator: read, write viewer: readList of arguments. See Image request arguments for a complete list.Note: The characters must be percent-encoded.
note

The # is replaced by a group number, for example StreamProfile.S5. The first group numbers are reserved for stream profiles included in the product

Motion JPEG video request

Saved stream profiles are convenient when retrieving Motion JPEG video streams through video.cgi. The value of a parameter saved in a stream profile can be overridden by specifying a new parameter value after the streamprofile argument.

  • Method: GET

Syntax:

http://<servername>/axis-cgi/mjpg/video.cgi
?<argument>=<value>[&<argument>=<value>...]

With the following arguments:

ArgumentValid valuesDescription
streamprofile=<string>Name of stream profileThe name of the stream profile. Supported stream profile names are stored in the StreamProfile.S#.Name parameters.
Additional argumentsSee Image request arguments for a complete list.

Request, over HTTP, a Motion JPEG video stream configured according to the stream profile myprofile.

Request:

http://myserver/axis-cgi/mjpg/video.cgi?&streamprofile=myprofile

RTSP request

Saved stream profiles are also convenient when requesting video streams using RTSP. The value of a parameter saved in the stream profile can be overridden in the RTSP request by specifying a new value after the streamprofile argument.

Syntax:

COMMAND rtsp://<servername>/axis-media/media.amp
?<argument>=<value>[&<argument>=<value>...] RTSP/1.0
Headerfield1: val1<CRLF>
Headerfield2: val1<CRLF>
...
<CRLF>

[Body]

With the following arguments:

ArgumentValid valuesDescription
streamprofile=<string>Name of stream profileThe name of the stream profile. Supported stream profile names are stored in the StreamProfile.S#.Name parameters.
Additional argumentsSee Parameter specification RTSP URL for a complete list.

Stream profiles in RTSP requests. The value of a parameter saved in the stream profile can be overridden by specifying a new parameter value after streamprofile. Here, myprofile2 (defined above) is used but the resolution is changed to 640x480.

Request:

DESCRIBE rtsp://myserver/axis-media/media.amp?
streamprofile=myprofile2&resolution=640x480 RTSP/1.0
CSeq: 0
User-Agent: Axis AMC
Accept: application/sdp

Source-specific multicast

Description

Source-specific multicast, or SSM for short, is a method that makes it possible to receive multicast packets from specific sources. This makes SSM different from a normal multicast, where a user receives all multicast packets independent of their origin.

An Axis camera can be configured to include all information required for SSM through the Session description protocol (SDP) generated by RTSP DESCRIBE.

The following parameters must be set prior to using SSM:

Network.RTP.R0.VideoAddress="239.194.168.96"
Network.RTP.R0.VideoPort="0"
Network.RTP.R0.TTl="5"

SSM itself is available through the following URL:

rtsp://192.168.0.30/axis-media/ssm/media.amp

Please note that the current implementation of SSM doesn’t support the benefits from the RTCP receiver feedback, which notifies the multicast senders via a unicast transmission.

Terminology

TermDescription
RTCPRTP Control Protocol
RTPReal-Time Transport Protocol
SDPSession Description Protocol
SSMSource-specific Multicast

Common examples

One media session and RTP ports

Use this example to request a video stream by using multicast with a dynamically allocated RTP port configuration.

Start with the following command:

Network.RTP.R0.VideoPort=0

Camera configuration

Network.RTP.R0.VideoAddress="239.194.168.96"
Network.RTP.R0.VideoPort="0"
Network.RTP.R0.TTL="5"

The purpose of Network.RTP.R0.VideoPort=0 is to make the RTSP server dynamically allocate the ports used during the session.

Example 1

Request

DESCRIBE rtsp://192.168.0.30:554/axis-media/ssm/media.amp RTSP/1.0
CSeq: 2

Response

CSeq: 2
Content-Length: 705
v=0
o=- 2271184509297762952 1 IN IP4 192.168.0.30
s=Session streamed with GStreamer
i=rtsp-server
c=IN IP4 239.194.168.96/5
t=0 0
a=tool:GStreamer
a=type:broadcast
a=range:npt=now-a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp
a=source-filter: incl IN IP4 239.194.168.96 192.168.0.30
m=video 0 RTP/AVP 96
b=AS:50000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d0029;sprop-parameter-sets=Z00AKeKQDwBE/LgLcBAQGkHiRFQ=,aO48gA==a=ts-refclk:local
a=mediaclk:sender
a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0
a=framerate:30.000000
a=transform:1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000

Example 2

Request

SETUP rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;multicast

Response

CSeq: 3
Transport: RTP/AVP;multicast;destination=239.194.168.96;ttl=5;port=50000-50001;mode="PLAY"
Server: GStreamer RTSP server

One media session and static assigned RTP ports

Use this example to request a video stream by using a multicast that has been pre-defined with an RTP port configuration that uses the 40000 port on the product.

Start with the following command:

Network.RTP.R0.VideoPort=40000

Camera configuration

Network.RTP.R0.VideoAddress="239.194.168.96"
Network.RTP.R0.VideoPort="40000"
Network.RTP.R0.TTL="5"

The purpose of Network.RTP.R0.VideoPort=40000 is to make sure that the RTSP server always use the 40000 port.

Example 1

Request

DESCRIBE rtsp://192.168.0.30:554/axis-media/ssm/media.amp RTSP/1.0
CSeq: 2

Response

CSeq: 2
Content-Type: application/sdp
Content-Length: 705
v=0
o=- 2271184509297762952 1 IN IP4 192.168.0.30
s=Session streamed with GStreamer
i=rtsp-server
c=IN IP4 239.194.168.96/5
t=0 0
a=tool:GStreamer
a=type:broadcast
a=range:npt=now-a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp
a=source-filter: incl IN IP4 239.194.168.96 192.168.0.30
m=video 40000 RTP/AVP 96
b=AS:50000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d0029;sprop-parameter-sets=Z00AKeKQDwBE/LgLcBAQGkHiRFQ=,aO48gA==
a=ts-refclk:local
a=mediaclk:sender
a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0
a=framerate:30.000000
a=transform:1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000

Example 2

Request

SETUP rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;multicast

Response

CSeq: 3
Transport: RTP/AVP;multicast;destination=239.194.168.96;ttl=5;port=40000-40001;mode="PLAY"
Server: GStreamer RTSP server

Multiple media sessions and RTP ports

Use this example to request a video and audio stream by using a multicast containing a dynamically allocated RTP port configuration.

Start with the following commands:

Network.RTP.R0.VideoPort=0
Network.RTP.R0.AudioPort=0

Camera configuration

Network.RTP.R0.VideoAddress="239.194.168.96"
Network.RTP.R0.VideoPort="0"
Network.RTP.R0.AudioAddress="239.194.168.224"
Network.RTP.R0.AudioPort="0"
Network.RTP.R0.TTL="5"

The purpose of Network.RTP.R0.VideoPort=0 and Network.RTP.R0.AudioPort=0 is to make the RTSP server dynamically allocate the ports used during the session.

Example 1

Request

DESCRIBE rtsp://192.168.0.30:554/axis-media/ssm/media.amp?audio=1 RTSP/1.0
CSeq: 2

Response

CSeq: 2
Content-Length: 1047
v=0
o=- 17865963052783635533 1 IN IP4 192.168.0.30
s=Session streamed with GStreamer
i=rtsp-server
t=0 0
a=tool:GStreamer
a=type:broadcast
a=range:npt=now-a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp?audio=1
a=source-filter: incl IN IP4 * 192.168.0.30
m=video 0 RTP/AVP 96
c=IN IP4 239.194.168.96/5
b=AS:50000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d0029;sprop-parameter-sets=Z00AKeKQDwBE/LgLcBAQGkHiRFQ=,aO48gA==
a=ts-refclk:local
a=mediaclk:sender
a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0?audio=1
a=framerate:30.000000
a=transform:1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000
m=audio 0 RTP/AVP 97
c=IN IP4 239.194.168.224/5
b=AS:32
a=rtpmap:97 MPEG4-GENERIC/48000/1
a=fmtp:97 streamtype=5;profile-level-id=2;mode=AAC-hbr;config=1188;sizelength=13;indexlength=3;indexdeltalength=3;bitrate=32000
a=ts-refclk:local
a=mediaclk:sender
a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=1?audio=1

Example 2

Request

SETUP rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0?audio=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;multicast

Response

CSeq: 3
Transport: RTP/AVP;multicast;destination=239.194.168.96;ttl=5;port=50000-50001;mode="PLAY"

Example 3

Request

SETUP rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=1?audio=1 RTSP/1.0
CSeq: 4
Session: cFRDAXAYAqIYifvc
Transport: RTP/AVP;multicast

Response

CSeq: 4
Transport: RTP/AVP;multicast;destination=239.194.168.224;ttl=5;port=50000-50001;mode="PLAY"

Multiple media sessions and static allocated RTP ports

Use this example to request a video and audio stream by using a multicast with a pre-defined RTP port configuration on a product by using the 40000 port for video and 45000 port for audio.

Start with the following commands:

Network.RTP.R0.VideoPort=40000
Network.RTP.R0.AudioPort=45000

Camera configuration

Network.RTP.R0.VideoAddress="239.194.168.96"
Network.RTP.R0.VideoPort="40000"
Network.RTP.R0.AudioAddress="239.194.168.224"
Network.RTP.R0.AudioPort="45000"
Network.RTP.R0.TTL="5"

The purpose of Network.RTP.RO.VideoPort=40000 and Network.RTP.R0.AudioPort=45000 is to make sure that the RTSP server uses the 40000 port for video and the 45000 port for audio.

Example 1

Request

DESCRIBE rtsp://192.168.0.30:554/axis-media/ssm/media.amp?audio=1 RTSP/1.0
CSeq: 2

Response

CSeq: 2
Content-Length: 1047
v=0
o=- 17865963052783635533 1 IN IP4 192.168.0.30
s=Session streamed with GStreamer
i=rtsp-server
t=0 0
a=tool:GStreamer
a=type:broadcast
a=range:npt=now-a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp?audio=1
a=source-filter: incl IN IP4 * 192.168.0.30
m=video 40000 RTP/AVP 96
c=IN IP4 239.194.168.96/5
b=AS:50000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d0029;sprop-parameter-sets=Z00AKeKQDwBE/LgLcBAQGkHiRFQ=,aO48gA==
a=ts-refclk:local
a=mediaclk:sender
a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0?audio=1
a=framerate:30.000000
a=transform:1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000
m=audio 45000 RTP/AVP 97
c=IN IP4 239.194.168.224/5
b=AS:32
a=rtpmap:97 MPEG4-GENERIC/48000/1
a=fmtp:97 streamtype=5;profile-level-id=2;mode=AAC-hbr;config=1188;sizelength=13;indexlength=3;indexdeltalength=3;bitrate=32000
a=ts-refclk:local
a=mediaclk:sender
a=control:rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=1?audio=1

Example 2

Request

SETUP rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=0?audio=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;multicast

Response

CSeq: 3
Transport: RTP/AVP;multicast;destination=239.194.168.96;ttl=5;port=40000-40001;mode="PLAY"

Example 3

Request

SETUP rtsp://192.168.0.30:554/axis-media/ssm/media.amp/stream=1?audio=1 RTSP/1.0
CSeq: 4
Session: cFRDAXAYAqIYifvc
Transport: RTP/AVP;multicast

Response

CSeq: 4
Transport: RTP/AVP;multicast;destination=239.194.168.224;ttl=5;port=45000-45001;mode="PLAY"