General information
GET http://IP-Address:port/prefix/live/media/VIDEOSOURCEID?parameters.
where VIDEOSOURCEID - three-component source endpoint ID (see Get list of video sources (cameras)). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".
Parameters:
format - "rtsp" and "hls".
Video can be received in the original format (without recompression) via RTSP and HLS protocols. HLS protocol supports only H.264 format. In all other cases the server recompresses it to MJPEG format.Important!
If video is requested in the format that differs from the original one, then recompression will be performed, therefore, Server load will increase.
- w – frame width
- h – frame height.
Note
If h and w values are more than size of original video, the video will be received with original size.
Zooming out of width and height is available only discretely - in 2, 4, 8 times, etc. If specified sizes are not corresponding to 1/2, 1/4 etc. of original video size, the video will be received with size divisible by the original video size close to specified values.
Sample request:
GET http://IP-Address:port/prefix/live/media/HOSTNAME/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480
HLS video
HLS protocol video can be received in the original format only. The following parameters are in use when receiving HLS protocol video:
keep_alive – time in seconds in which the stream is to be kept alive.
hls_time - the segment length in seconds.
hls_list_size - the maximum number of playlist entries. If set to 0 the list file will contain all the segments.
hls_wrap - the number after which the segment filename number wraps. If set to 0 the number will be never wrapped.
.
Sample request:
GET http://IP-Address:port/prefix/live/media/HOSTNAME/DeviceIpint.23/SourceEndpoint.video:0:0?format=hls&keep_alive=60
Sample response:
{
"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"
}
where 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.
Important!
To playback video via HLS protocol use the stream_url parameter from the response as follows:
ffplay "http://root:root@10.0.12.65:80/hls/c83b48d5-2ab7-49eb-91ef-593f808d4e51/playout.m3u8"
RTSP video
RTSP protocol video is sent in the original format only.
GET rtsp://login:passowrd@IP-Address:554/hosts/HOSTNAME/DeviceIpint.23/SourceEndpoint.video:0:0
HTTP video
GET ffplay.exe -v debug "http://login:password@IP-адрес:8001/asip-api/live/media/HOSTNAME/DeviceIpint.23/SourceEndpoint.video:0:0?w=1600&h=0"
Important!
HTTP sends video in mjpeg only, w and h parameters are mandatory.
Tunneling RTSP over HTTP
see Configure tunneling RTSP over HTTP in VLC
Video is sent over the tunnel in the original format.
Samples:
GET ffplay -rtsp_transport http "rtsp://login:password@IP-Address:80/rtspproxy/hosts/HOSTNAME/DeviceIpint.23/SourceEndpoint.video:0:0"
GET for VLC: rtsp://login:password@IP-Address:80/rtspproxy/hosts/HOSTNAME/DeviceIpint.23/SourceEndpoint.video:0:0
H.264 video
To get live video in the original H.264 format use RTSP or RTSP tunnel over HTTP.