1) Get SDK session ID (SID) from the server

General form of request:

https://{IP}:{HTTPS port}/login?username={user}&password={pwd}

Where:

{IP} - Server's IP address
{HTTPS port} - Server's HTTPS port
{user} - User's name
{pwd} - User's password

For example:

https://127.0.0.1:8080/login?username=Admin&password=12345


SID's keepalive is 15 seconds and it "deceases" in the absence of constant requests.

2) Get token from the server 

General form of request:

https://{IP}:{HTTPS port}/get_video?channel={channel_guid}&container=mjpeg&stream=archive_main&sid={SID}

Where:

{IP} - Server's IP address
{HTTPS port} - Server's HTTPS port
stream=archive_main - The archive of the main stream
container=rtsp - The RTSP format of ingoing stream (see more in https://trassir.com/software-updates/manual/sdk-examples-video.html)
{channel_sid} - camera's channel GUID

You can get the channel's GUID from the list of server's channels using the request:

https://{IP}:{HTTPS port}/channels?sid={SID}

for example, 

https://127.0.0.1:8080/channels?sid=fJVOJrtW

look for "guid"


For example:
https://127.0.0.1:8080/get_video?channel=wTdjUxrP&container=mjpeg&stream=archive_main&sid=fJVOJrtW


Token's keepalive is 10 seconds and it "deceases" in the absence of constant requests.

To prolong its life span during pause while reviewing an archive or watching videos of high framerate, you should execute the ping query:

http://{IP}:555/{token}?ping

Pay attention, that HTTP is used here
where:
555 - Server's HTTP Video Streaming port
{token} is token received from this step

For example,
http://127.0.0.1:555/UmRKfnTl?ping

3) Set URL on media player (as for testing, for example - VLC)

General form of request:

http://{IP}:555/{token}
Where:
555 - Server's HTTP Video Streaming port
{token} is token received from the previous step

 For example:

http://127.0.0.1:555/UmRKfnTl

4) Set command to play archive

General form of request:

https://{IP}:{HTTPS port}/archive_command?command=play&start={yyyymmddThhmmss}&stop={yyyymmddThhmmss}&speed=1&sid=j8uifwNy&token={token}
Where:
{yyyymmddThhmmss} - time format
{token} is token received from the previous step

 For example:

https://127.0.0.1:8080/archive_command?command=play&start=20260127T120000&stop=20260127T121000&speed=1&sid=j8uifwNy&token=T2GixZRm

More on archive management - https://www.dssl.ru/files/trassir/manual/en/sdk-examples-archive.html


  • Нет меток