Skip to main content
Skip table of contents

GetBroadcastUrls

Returns a list of streams with URLs for playing the stream in different formats. Depending on the playback parameters and protocols set, it may contain either all URLs or a part of them.

GET /api/streams/broadcast/
Body
tokenrequired
string
Authorization token for API requests. See Mediaserver/Web API/Authorization/CreateApiToken.
Response
200
JSON array with a list of streams with available playback URLs. To play a URL, depending on the type of stream, a token with private authorization type or a login and password for protected is required.
JSON
{
                "stream-uid-1": {
                    "access": "private",
                    "entry": "stream",
                    "urls": {
                        "export": {
                            "url": "https://hostname:8443/dvr/stream-uid-1/record.mp4",
                            "args": [
                                "timestamp",
                                "duration",
                                "time"
                            ],
                            "name": "DVR export (mp4)"
                        },
                        "hls_dvr": {
                            "url": "https://hostname:8443/dvr/stream-uid-1/playlist_ios.m3u8",
                            "args": [
                                "timestamp",
                                "duration",
                                "time"
                            ],
                            "name": "DVR HLS"
                        },
                        "hls_live_ios": {
                            "url": "https://hostname:8443/live/stream-uid-1/playlist_ios.m3u8",
                            "args": {},
                            "name": "Live HLS (iOS)"
                        },
                        "rtsp_dvr": {
                            "url": "rtsp://hostname:5554/dvr/stream-uid-1/",
                            "args": [
                                "timestamp",
                                "duration",
                                "time",
                                "speed"
                            ],
                            "name": "DVR RTSP"
                        },
                        "preview": {
                            "url": "https://hostname:8443/live/stream-uid-1/preview.mp4",
                            "args": {},
                            "name": "Preview (mp4)"
                        },
                        "hls_dvr_ios": {
                            "url": "https://hostname:8443/dvr/stream-uid-1/playlist_ios.m3u8",
                            "args": [
                                "timestamp",
                                "duration",
                                "time"
                            ],
                            "name": "DVR HLS (iOS)"
                        },
                        "rtsp_live": {
                            "url": "rtsp://hostname:5554/live/stream-uid-1/",
                            "args": {},
                            "name": "Live RTSP"
                        },
                        "screenshot": {
                            "url": "https://hostname:8443/dvr/stream-uid-1/screenshot.mp4",
                            "args": [
                                "timestamp",
                                "time"
                            ],
                            "name": "Screenshot (mp4)"
                        },
                        "hls_live": {
                            "url": "https://hostname:8443/live/stream-uid-1/playlist.m3u8",
                            "args": {},
                            "name": "Live HLS"
                        }
                    },
                    "enabled": true,
                    "status": "active",
                    "uid": "stream-uid-1",
                    "type": "primary"
                },
                "stream-uid-2": {
                    "access": "private",
                    "entry": "stream",
                    "urls": {
                        "hls_live": {
                            "url": "https://hostname:8443/live/stream-uid-2/playlist.m3u8",
                            "args": {},
                            "name": "Live HLS"
                        },
                        "rtsp_live": {
                            "url": "rtsp://hostname:5554/live/stream-uid-2/",
                            "args": {},
                            "name": "Live RTSP"
                        },
                        "hls_live_ios": {
                            "url": "https://hostname:8443/live/stream-uid-2/playlist_ios.m3u8",
                            "args": {},
                            "name": "Live HLS (iOS)"
                        },
                        "preview": {
                            "url": "https://hostname:8443/live/stream-uid-2/preview.mp4",
                            "args": {},
                            "name": "Preview (mp4)"
                        }
                    },
                    "enabled": true,
                    "status": "suspend",
                    "uid": "stream-uid-2",
                    "type": "secondary"
                }
            }
url
stream-uid.urls.rtsp_live.urlURL for playing live stream via RTSP protocol.
url
stream-uid.urls.rtsp_dvr.urlURL for playing DVR stream via RTSP protocol. In the subsequent request, it is necessary to specify the timestamp of the start of playback.
url
stream-uid.urls.hls_live.urlURL for playing live stream via HLS.
url
stream-uid.urls.hls_dvr.urlURL for playing DVR stream via HLS. In the subsequent request, it is necessary to specify the timestamp of the start of playback.
url
stream-uid.urls.hls_live_ios.urlURL for playing live stream via HLS and WebSocket protocol.
url
stream-uid.urls.hls_dvr_io.urlURL for playing DVR stream via HLS and WebSocket protocol.
url
stream-uid.urls.export.urlURL for requesting export of DVR archive to MP4 file.
url
stream-uid.urls.preview.urlURL for requesting the last frame of Live (preview stream). The frame is provided in MP4 format.
url
stream-uid.urls.screenshot.urlURL for requesting an arbitrary frame of DVR archive. The frame is provided in MP4 format.
403
Authorization error. Invalid or missing access token for API. See Mediaserver/Web API/Authorization/CreateApiToken for details.
Example
JSON
curl -k --location --request GET 'https://localhost:8080/api/streams/broadcast/?token=string'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.