Go to documentation repository
Page History
...
Tip |
---|
{VIDEOSOURCEID} - three-component source endpoint ID (see Get list of video sources (cameras)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. In all other cases the server recompresses it to MJPEG format.
| ||||||||||
w, h | No | w – frame width, h – frame height.
| ||||||||||
fr | No | fps.
| ||||||||||
enable_token_auth | No | enable_token_auth - enable authorization by token =1. valid_token_hours - signature validation time (in hours). The maximum value is a week. The default value is 12 hours. | ||||||||||
valid_token_hours | No | |||||||||||
key_frames | No | 1 - playback only by key frames; 0 - original frame rate (default). |
Sample request:
GET http://IP-Address:port/prefix/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480&enable_token_auth=1&valid_token_hours=1
...
HLS protocol video can be received in the original format only. The following parameters are in use 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
...
Code Block |
---|
{ "keep_alive_seconds": 60, "keep_alive_url": "/live/media/hls/keep?stream_id=7e9d8c93-80e2-4521-9a54-cb854fe3cd2d", "stop_url": "/live/media/hls/stop?stream_id=7e9d8c93-80e2-4521-9a54-cb854fe3cd2d", "stream_url": "/hls/7e9d8c93-80e2-4521-9a54-cb854fe3cd2d/playout.m3u8" } |
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 in several seconds after getting the response. |
...