Go to documentation repository
Page History
...
| Section | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Note | ||
|---|---|---|
| ||
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 | ||
|---|---|---|
| ||
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. |
| Parametr | Wymagany | Opis | Parameter | Required | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| format | No | 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.
| ||||||||||
| w, h | No | w – frame widthszerokość klatki, h – frame heightwysokość klatki.
| ||||||||||
| fr | No | fpsFPS.
| ||||||||||
| enable_token_auth | No | 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_hours | No |
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:
| Parametr | Wymagany | Opis |
|---|
| keep_alive |
| Nie | Czas w sekundach, przez który strumień ma pozostać aktywny. |
| hls_time |
| Nie | Długość segmentu w sekundach. |
| hls_list_size |
| Nie | Maksymalna ilość wpisów listy odtwarzania. Jeśli wartość to 0, plik listy będzie zawierać wszystkie segmenty. |
| hls_wrap |
| Nie | The 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"
} |
| Parametr |
|---|
| Opis |
|---|
| keep_alive_seconds |
| Czas w sekundach, przez który strumień ma pozostać aktywny. |
| keep_alive_url |
| URL służący do przedłużenia czasu aktywności strumienia. |
| stop_url |
| URL służący do zatrzymania strumienia |
| stream_url |
| URL zapewniający dostęp do listy segmentów. |
| Note | ||
|---|---|---|
| ||
| 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 link: http://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 | ||
|---|---|---|
| ||
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 | ||
|---|---|---|
| ||
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"
...