Versions Compared

Key

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

...

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".

...

No
ParameterRequiredDescription
speed NoPlayback speed, values can be negative.
formatNoParameter values are 'mjpeg', 'rtsp', 'mp4', 'hls'. If the format is not specified, 'rtsp' is selected or it is not recognized, then the native format is selected by server to prevent additional encoding. If the native format is not supported by client, server selects WebM.
idNoUnique identifier of archive stream (optional). It is used to get stream info or control the stream.

w

h

No

w – frame width, h – frame height.

frNo

fps.

Note
titleImportant!

This parameter is relevant only for MJPEG video.

archive


The archive name from the Get list of archives request (see Get archive contents). If not specified, the default archive is used.

enable_token_auth No

Get signed links to video streams.

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_hoursNo

...

GET http://127.0.0.1:80/archive/media/Server1/DeviceIpint.1/SourceEndpoint.video:0:0/20110608T060141.375?format=rtsp&speed=1&w=640&h=480&enable_token_auth=1&valid_token_hours=1


Note
titleImportant!

HLS archive video becomes available in 30 seconds after getting the response

Sample response:

Code Block
{
    "http": {
        "description": "RTP/RTSP/HTTP/TCP",
        "path": "archive/hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0/20110608T060141.375000?speed=1&id=a865fcea-cfe6-44a1-bf7b-9e6a94c44a53&exp=20200525T171234&nonce=1&hmac=wVlyHvZkB2TnqftTfYugtwmZ7g8=",
        "port": "8554"
    },
    "httpproxy": {
        "description": "RTP/RTSP/HTTP/TCP Current Http Port",
        "path": "rtspproxy/archive/hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0/20110608T060141.375000?speed=1&id=a865fcea-cfe6-44a1-bf7b-9e6a94c44a53&exp=20200525T171234&nonce=2&hmac=BVICx8NVV4yijwqc0Q6Xzji41Rg="
    },
    "rtsp": {
        "description": "RTP/UDP or RTP/RTSP/TCP",
        "path": "archive/hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0/20110608T060141.375000?speed=1&id=a865fcea-cfe6-44a1-bf7b-9e6a94c44a53&exp=20200525T171234&nonce=1&hmac=wVlyHvZkB2TnqftTfYugtwmZ7g8=",
        "port": "554"
    }
}

...

It is possible to use other values consisting of latin letters and digits. It is recommended to use the UUID function (see Get unique identifier).

RTSP archive video

GET rtsp://login:password@IP-Address:554/archive/hosts/SERVER1/DeviceIpint.0/SourceEndpoint.video:0:0/20160907T050548.723000Z?speed=1

Speed parametr is mandatory: playback speed.

Examples:

  • speed=1 - forward playback, normal speed;
  • speed=-1 - back playback, normal speed;
  • speed=4 - fast playback, speed 4х;
  • speed=-8 - fast-rewind playback, speed 8x.

HTTP archive video

GET ffplay.exe -v debug "http://login:password@IP-Address:80/asip-api/archive/media/SERVER1/DeviceIpint.4/SourceEndpoint.video:0:0/20170112T113526?w=1600&h=0&speed=1"

...

see Configure tunneling RTSP over HTTP in VLC.

GET ffplay ffplay -rtsp_transport http "rtsp://login:password@IP-Address:8554/rtspproxy/archive/hosts/SERVER1/DeviceIpint.4/SourceEndpoint.video:0:0/20170115T113526"

...