Versions Compared

Key

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

...

Section


Column
width35%


Panel
borderColor#CCCCCC
bgColor#FFFFFF
titleBGColor#F0F0F0
borderStylesolid
titleOn page:
Table of Contents



Column



Note
titleImportant!

You can get audio from x64 Server only.

You can't get audio in MJPEG format.

...

Pozyskać audio można jedynie z Serwera x64.

Nie można pozyskać audio w formacie MJPEG.

Informacje ogólne

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

Tip

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


Note
titleImportant!

If no parameters are specified in the request, then the video will be received in the MJPEG format.

Jeśli żaden z parametrów nie jest sprecyzowany, wideo będzie pozyskane w formacie MJPEG.


ParametrWymaganyOpisParameterRequiredDescription
formatNo

Parameter values are Dostępne wartości parametru: "mp4", "hls".

Video can be received in the original format (without recompression) via HLS protocols. HLS protocol supports only H.264 format.

Wideo może być pozyskane w pierwotnym formacie (bez kompresji) poprzez protokoły HLS. Protokół HLS wspiera jedynie format H.264.

Odtwarzacz "mp4" pozwala na pozyskiwanie oryginalnego wideo w formatach H.264 oraz H.265. We wszystkich innych przypadkach Serwer automatycznie poddaje pliki rekompresji do formatu MJPEG.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 increaseJeśli w zapytaniu widnieje inny format wideo niż oryginalny, nagrania będą musiały ulec rekompresji, co zwiększy obciążenie Serwera.


w, hNo

wframe widthszerokość klatkih – frame heightwysokość klatki.

Info
titleNote

If Jeśli wartości h oraz w są większe niż oryginalnego materiału wideo, będzie ono dostarczone w oryginalnej rozdzielczości.

Rozdzielczość oryginalnego wideo jest dzielona przez 2 dopóki nie osiągnie ona wartości równej bądź niższej od podanej w parametrach hw 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 scalingWideo w formacie mp4 są przekazywane bez przeskalowywania.


frNo

fpsFPS.

Note
titleImportant!

This parameter is relevant only for MJPEG videoTen parametr jest brany pod uwagę tylko dla wideo w formacie MJPEG.


enable_token_auth No

Get signed links to video streamsUzyskaj sygnowane łącza do strumieni wideo.

enable_token_auth - enable authorization by token włącz autoryzację poprzez token =1.

valid_token_hours - signature validation time (in hours). The maximum value is a week. The default value is 12 hoursczas walidacji tokenu (w godzinach). Maksymalny okres to tydzień. Domyślna wartość to 12 godzin.

valid_token_hoursNo


Sample requestPrzykładowe zapytanie
:

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

HTML
<script type="text/javascript" src="https://asciinema.org/a/98881.js" id="asciicast-98881" async></script>

HLS video

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

Wideo korzystające z protokołu HLS może być pozyskane jedynie w oryginalnym formacie. Następujące parametry mogą być użyte przy pozyskiwaniu wideo korzystającego z protokołu HLS:

ParametrWymaganyOpis
ParameterRequiredDescription
keep_alive
NoTime in seconds in which the stream is to be kept alive
NieCzas w sekundach, przez który strumień ma pozostać aktywny
hls_time
NoThe segment length in seconds. 
NieDługość segmentu w sekundach.
hls_list_size
NoThe maximum number of playlist entries. If set to 0 the list file will contain all the segments
NieMaksymalna ilość wpisów listy odtwarzania. Jeśli wartość to 0, plik listy będzie zawierać wszystkie segmenty.
hls_wrap
No
NieThe number after which the segment filename number wraps. If set to 0 the number will be never wrapped.

Sample requestPrzykładowe zapytanie:

GET http://127.0.0.1:80/live/media/SERVER1/DeviceIpint.23/SourceEndpoint.video:0:0?format=hls&keep_alive=60

Sample responsePrzykładowa odpowiedź:

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
Parametr
Description
Opis
keep_alive_seconds
Time in seconds in which the stream is to be kept alive
Czas w sekundach, przez który strumień ma pozostać aktywny
keep_alive_url 
The url to keep the stream alive
URL służący do przedłużenia czasu aktywności strumienia.
stop_url
The url to stop the stream.
URL służący do zatrzymania strumienia
stream_url
The url to access the list of segments
URL zapewniający dostęp do listy segmentów.


Note
titleImportant!
HLS protocol video becomes available in several seconds after getting the response.
Wideo korzystające z protokołu HLS staje się dostępne kilka sekund po otrzymaniu odpowiedzi.

Aby odtwarzać wideo poprzez protokół HLS, użyj parametru stream_url z odpowiedzi w następujący sposóbTo 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"

Wideo RTSP

...

RTSP protocol video is sent in the original format only.

Strumieniowanie wideo za pośrednictwem protokołu RTSP wyświetla wideo jedynie w jego pierwotnym formacie.

Zapytanie o strukturę linku RTSPRequest to get the structure of the RTSP linkhttp://login:password@IP-address:Port/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?format=rtsp

Sample responsePrzykładowa odpowiedź:

Code Block
{
    "http": {
        "description": "RTP/RTSP/HTTP/TCP",
        "path": "hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0",
        "port": "8554"
    },
    "rtsp": {
        "description": "RTP/UDP or RTP/RTSP/TCP",
        "path": "hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0",
        "port": "554"
    }
}

Request to get videoZapytanie w celu pozyskania wideo: GET rtsp://login:password@IP-address:554/hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0

Note
titleImportant!

In some cases, the RTSP video can be streamed with artifacts. To fix this, change the TCP/IP settings using this reg file.

W niektórych przypadkach wideo poprzez RTSP może być strumieniowane z artefaktami. Aby to naprawić, zmień ustawienia TCP/IP korzystając z następującego pliku reg.

Informacje o strumieniu RTSPRTSP stream information:

GET http://IP-Address:port/prefix/rtsp/stat

Wideo HTTP

...

ffplay.exe -v debug "http://login:password@IP-address:8001/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=1600&h=0"

Note
titleImportant!

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

Tunneling RTSP over HTTP

wysyła wideo jedynie w formacie mjpeg; parametry w oraz h są wymagane.

Tunelowanie RTSP nad HTTP

Zobacz: see Configure tunneling RTSP over HTTP in VLC

Video is sent over the tunnel in the original format.

Wideo jest wysyłane poprzez tunel, w pierwotnym formacie wideo.

Przykładowe zapytanieSample request:

ffplay -rtsp_transport http "rtsp://login:password@IP-Address:80/rtspproxy/hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0"

GET for dla VLC: rtsp://login:password@IP-Address:80/rtspproxy/hosts/Server1/DeviceIpint.23/SourceEndpoint.video:0:0

Wideo w formatach H.264

...

oraz H.

...

265

Aby pozyskać wideo na żywo oryginalnie w formacie

...

To get live video in the original H.264/H.265 format use mp4 format, skorzystaj z formatu mp4.

Sample requestPrzykładowe zapytanie:

ffplay.exe "http://root:root@192.168.25.112:8001/live/media/Server1/DeviceIpint.61/SourceEndpoint.video:0:0?format=mp4"

...