Go to documentation repository
Page History
Section | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Note | ||
---|---|---|
| ||
|
General information
GET httpGET http://IP- Address:port/prefix/live/media/{VIDEOSOURCEID}
Tip |
---|
{VIDEOSOURCEID}—a three-component source endpoint ID (see Get list of video cameras and information about them). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0". |
Note | ||
---|---|---|
| ||
If no parameters are specified in the request, then the video will be received in the MJPEG format. |
...
Parameter | Required | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
format | No | Parameter values are "mp4", "hls". Video can be received in the original format (without recompression) via HLS protocols. HLS protocol supports only H.264 format. The "mp4" player allows to receive the original video in H.264 and H.265 formats. In all other cases the server Server recompresses it to MJPEG format.
| ||||||||||
w, h | No | w – —frame width, h – —frame height.
| ||||||||||
fr | No | fpsThe FPS value.
| ||||||||||
enable_token_auth | No |
| ||||||||||
valid_token_hours | No | |||||||||||
key_frames | No | 1—playback only by key frames; 0—original frame rate (default) | ||||||||||
authToken | No | Starting with Axxon Next 4.6.3 Connecting via AxxonNet. For example, https://axxonnet.com/arpserver/25455_0/webclient/live/media/SERVER/DeviceIpint.1/SourceEndpoint.video:0:1?authToken=... | ||||||||||
auth_token | No | Starting with Axxon Next 4.6.3 Authorizing when connecting directly to the Server and authorizing by token. For example, http://127.0.0.1:80/live/media/SERVER/DeviceIpint.1/SourceEndpoint.video:0:0?format=mp4&auth_token=... |
Sample request:
GET http://IP-Address:port/prefix/127.0.0.1:80/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480&enable_token_auth=1&valid_token_hours=1
HTML |
---|
<script type="text/javascript" src="https://asciinema.org/a/98881.js" id="asciicast-98881" async></script> |
...
HLS protocol video can be received in the original format only. The following parameters are in use used when receiving HLS protocol video:
Parameter | Required | Description |
---|---|---|
keep_alive | No | Time in seconds in which the stream is to be kept alive. |
hls_time | No | The segment length in seconds. |
hls_list_size | No | The maximum number of playlist entries. If set to 0, the list file will contain all the segments. |
hls_wrap | No | The number after which the segment filename number wraps. If set to 0, the number will be never wrapped. |
Sample request:
GET http://127.0.0.1:80/live/media/SERVER1/DeviceIpint.23/SourceEndpoint.video:0:0?format=hls&keep_alive=60
...
Parameter | Description |
---|---|
keep_alive_seconds | Time in seconds in which the stream is to be kept alive. |
keep_alive_url | The url to keep the stream alive. |
stop_url | The url to stop the stream. |
stream_url | The url to access the list of segments. |
Note | ||
---|---|---|
| ||
HLS protocol video becomes available with some delay (about 20 seconds). This is due to a feature of the HLS protocol: after receiving the link, it forms a cache of several video segments, and only after that the video starts playing. |
To playback video via HLS protocol, use the stream_url parameter from the response as follows:
...
Request to get the structure of the RTSP link: http://login:password@IP-address Address:Port/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?format=rtsp
Sample response:
Code Block |
---|
{ "http": { "description": "RTP/RTSP/HTTP/TCP", "path": "hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0", "port": "8554" }, "rtsp": { "description": "RTP/UDP or RTP/RTSP/TCP", "path": "hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0", "port": "554" } } |
Request to get video: GET rtsp://login:password@IP -addressAddress:554/hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0
Note | ||
---|---|---|
| ||
In some cases, the RTSP video can be streamed with artifacts. To fix this, change the TCP/IP settings using this reg file. |
RTSP stream information:
GET GET http://IP-Address Address:port/prefix/rtsp/stat
HTTP video
ffplay.exe -v debug "http://login:password@IP-address Address:8001/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=1600&h=0"
Note | ||
---|---|---|
| ||
HTTP sends video in mjpeg only, the w and h parameters are mandatory. |
...
ffplay -rtsp_transport http "rtsp://login:password@IP - Address:80/rtspproxy/hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0"
GET for VLC: rtsp://login:password@IP - Address:80/rtspproxy/hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0
...
To get live video in the original H.264 /and H.265 format formats, use mp4 format.
Sample request:
...