Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

GET http://IP-Address:port/prefix/live/media/{VIDEOSOURCEID}

Tip

{VIDEOSOURCEID} - — a three-component source endpoint ID (see see Get list of video sources (cameras)).  For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".

...

ParameterRequiredDescription
formatNo

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. 

Note
titleImportant!

If video is requested in the format that differs from the original one, then recompression will be performed, therefore, Server load will increase.


w, hNo

w – frame width, h – frame height.

Info
titleNote

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.


Note
titleImportant!

The mp4 video is transferred without scaling.


frNo

fps.

Note
titleImportant!

This parameter is relevant only for MJPEG video.


enable_token_auth No

Get signed links to video streams.

enable_token_auth - auth — enable authorization by token token =1.

valid_token_hours - hours — signature validation time (in hours). The maximum value is a week. The default value is 12 hours.

valid_token_hoursNo

...

HLS protocol video can be received in the original format only. The following parameters are in use when receiving HLS protocol video:

ParameterRequiredDescription
keep_aliveNoTime in seconds in which the stream is to be kept alive. 
hls_timeNoThe segment length in seconds. 
hls_list_sizeNoThe maximum number of playlist entries. If set to 0 the list file will contain all the segments.
hls_wrapNoThe 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"
}


ParameterDescription
keep_alive_secondsTime in seconds in which the stream is to be kept alive. 
keep_alive_url The url to keep the stream alive.
stop_urlThe url to stop the stream.
stream_urlThe url to access the list of segments.


Note
titleImportant!

HLS protocol video becomes available

in several seconds after getting the response

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:

...

Note
titleImportant!

HTTP sends video in mjpeg only, w and h parameters are mandatory.

Tunneling RTSP over HTTP

see See Configure tunneling RTSP over HTTP in VLC.

Video is sent over the tunnel in the original format.

...