You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/2-usage/22-webrtc-specific-features.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
WebRTC is a protocol that can be used for publishing and reading streams. Features in these page are shared among both tasks. Regarding specific tasks, see [Publish](publish) and [Read](read).
4
4
5
-
## Supported browsers
5
+
## Codec support in browsers
6
6
7
7
The server can ingest and broadcast with WebRTC a wide variety of video and audio codecs (that are listed at the beginning of the README), but not all browsers can publish and read all codecs due to internal limitations that cannot be overcome by this or any other server.
Copy file name to clipboardExpand all lines: docs/2-usage/23-rtsp-specific-features.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,32 @@ The RTSP protocol supports several underlying transport protocols, that are chos
10
10
- UDP-multicast: allows to save bandwidth when clients are all in the same LAN, by sending packets once to a fixed multicast IP.
11
11
- TCP: the most versatile.
12
12
13
-
The default transport protocol is UDP. To change the transport protocol, you have to tune the configuration of your client of choice.
13
+
To change the transport protocol, you have to tune the configuration of the client you are using to publish or read streams. In most clients, the default transport protocol is UDP.
14
+
15
+
For instance, FFmpeg allows to change the transport protocol with the `-rtsp_transport` flag:
Copy file name to clipboardExpand all lines: docs/2-usage/3-read.md
+26-42Lines changed: 26 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Replace `mystream` with the path name.
35
35
36
36
If you need to use the standard stream ID syntax instead of the custom one in use by this server, see [Standard stream ID syntax](srt-specific-features#standard-stream-id-syntax).
37
37
38
-
Known clients that can read with SRT are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer) and [VLC](#vlc).
38
+
Some clients that can read with SRT are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer) and [VLC](#vlc).
39
39
40
40
### WebRTC
41
41
@@ -55,7 +55,7 @@ Be aware that not all browsers can read any codec, check [Supported browsers](we
55
55
56
56
Depending on the network it may be difficult to establish a connection between server and clients, read [Solving WebRTC connectivity issues](webrtc-specific-features#solving-webrtc-connectivity-issues).
57
57
58
-
Known clients that can read with WebRTC and WHEP are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer), [Unity](#unity) and [web browsers](#web-browsers).
58
+
Some clients that can read with WebRTC and WHEP are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer), [Unity](#unity) and [web browsers](#web-browsers).
59
59
60
60
### RTSP
61
61
@@ -65,7 +65,7 @@ RTSP is a protocol that allows to publish and read streams. It supports differen
65
65
rtsp://localhost:8554/mystream
66
66
```
67
67
68
-
Known clients that can read with RTSP are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer) and [VLC](#vlc).
68
+
Some clients that can read with RTSP are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer) and [VLC](#vlc).
69
69
70
70
#### Latency
71
71
@@ -83,7 +83,7 @@ RTMP is a protocol that allows to read and publish streams, but is less versatil
83
83
rtmp://localhost/mystream
84
84
```
85
85
86
-
Known clients that can read with RTMP are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer) and [VLC](#vlc).
86
+
Some clients that can read with RTMP are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer) and [VLC](#vlc).
87
87
88
88
### HLS
89
89
@@ -99,7 +99,7 @@ and can also be accessed without using the browsers, by software that supports t
99
99
http://localhost:8888/mystream/index.m3u8
100
100
```
101
101
102
-
Known clients that can read with HLS are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer), [VLC](#vlc) and [web browsers](#web-browsers).
102
+
Some clients that can read with HLS are [FFmpeg](#ffmpeg), [GStreamer](#gstreamer), [VLC](#vlc) and [web browsers](#web-browsers).
103
103
104
104
#### LL-HLS
105
105
@@ -109,7 +109,7 @@ Low-Latency HLS is a recently standardized variant of the protocol that allows t
109
109
hlsPartDuration: 500ms
110
110
```
111
111
112
-
#### Supported browsers
112
+
#### Codec support in browsers
113
113
114
114
The server can produce HLS streams with a variety of video and audio codecs (that are listed at the beginning of the README), but not all browsers can read all codecs due to internal limitations that cannot be overcome by this or any other server.
115
115
@@ -170,19 +170,15 @@ To decrease the latency, you can:
170
170
171
171
### FFmpeg
172
172
173
-
FFmpeg can read a stream from the server in several ways (RTSP, RTMP, HLS, WebRTC with WHEP, SRT). The recommended one consists in reading with [RTSP](#rtsp):
173
+
FFmpeg can read a stream from the server in several ways. The recommended one consists in reading with RTSP.
The RTSP protocol supports several underlying transport protocols, each with its own characteristics (see [RTSP-specific features](rtsp-specific-features)). You can set the transport protocol by using the `rtsp_transport` flag:
GStreamer can read a stream from the server in several ways (RTSP, RTMP, HLS, WebRTC with WHEP, SRT). The recommended one consists in reading with [RTSP](#rtsp):
The RTSP protocol supports several underlying transport protocols, each with its own characteristics (see [RTSP-specific features](rtsp-specific-features)). You can change the transport protocol by using the `protocols` flag:
GStreamer also supports reading streams with WebRTC/WHEP, although track codecs must be specified in advance through the `video-caps` and `audio-caps` parameters. Furthermore, if audio is not present, `audio-caps` must be set anyway and must point to a PCMU codec. For instance, the command for reading a video-only H264 stream is:
The RTSP protocol supports several underlying transport protocols, each with its own characteristics (see [RTSP-specific features](rtsp-specific-features)).
252
-
253
-
In order to use the TCP transport protocol, use the `--rtsp_tcp` flag:
The VLC shipped with Ubuntu 21.10 doesn't support playing RTSP due to a license issue (see [here](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982299) and [here](https://stackoverflow.com/questions/69766748/cvlc-cannot-play-rtsp-omxplayer-instead-can)). To fix the issue, remove the default VLC instance and install the snap version:
268
248
@@ -271,7 +251,7 @@ sudo apt purge -y vlc
271
251
snap install vlc
272
252
```
273
253
274
-
#### Encrypted streams compatibility
254
+
#### Encrypted RTSP compatibility
275
255
276
256
At the moment VLC doesn't support reading encrypted RTSP streams. However, you can use a proxy like [stunnel](https://www.stunnel.org) or [nginx](https://nginx.org/) or a local _MediaMTX_ instance to decrypt streams before reading them.
277
257
@@ -421,7 +401,9 @@ In the _Hierarchy_ window, find or create a scene. Inside the scene, add a _Canv
421
401
422
402
### Web browsers
423
403
424
-
Web browsers can read a stream from the server in several ways (WebRTC or HLS).
404
+
Web browsers can read a stream from the server in several ways.
405
+
406
+
#### Web browsers and WebRTC
425
407
426
408
You can read a stream by using the [WebRTC protocol](#webrtc) by visiting the web page:
427
409
@@ -437,6 +419,8 @@ This web page can be embedded into another web page by using an iframe:
437
419
438
420
For more advanced setups, you can create and serve a custom web page by starting from the [source code of the WebRTC read page](https://github.com/bluenviron/mediamtx/blob/{version_tag}/internal/servers/webrtc/read_index.html). In particular, there's a ready-to-use, standalone JavaScript class for reading streams with WebRTC, available in [reader.js](https://github.com/bluenviron/mediamtx/blob/{version_tag}/internal/servers/webrtc/reader.js).
439
421
422
+
#### Web browsers and HLS
423
+
440
424
Web browsers can also read a stream with the [HLS protocol](#hls). Latency is higher but there are less problems related to connectivity between server and clients, furthermore the server load can be balanced by using a common HTTP CDN (like Cloudflare or CloudFront), and this allows to handle an unlimited amount of readers. Visit the web page:
When using a web browser, a dialog is first shown to users, asking for credentials, and then the header is automatically inserted into every request.
254
254
255
-
If the `Authorization: Basic` header cannot be used (for instance, in software like OBS Studio, which only allows to provide a "Bearer Token"), credentials can be passed through the `Authorization: Bearer` header (i.e. the "Bearer Token" in OBS), where value is the concatenation of username and password, separated by a colon:
255
+
If the `Authorization: Basic` header cannot be used (for instance, in software like OBS Studio, which only allows to provide a "Bearer Token"), credentials can be passed through the `Authorization: Bearer` header (i.e. the "Bearer Token" in OBS), where the value is the concatenation of username and password, separated by a colon:
0 commit comments