diff --git a/docs/2-publish/01-overview.md b/docs/2-publish/01-overview.md
index 6c8961ad..1982e07b 100644
--- a/docs/2-publish/01-overview.md
+++ b/docs/2-publish/01-overview.md
@@ -9,7 +9,7 @@ Live streams can be published to the server with the following protocols and cod
| [WebRTC clients](04-webrtc-clients.md) | WHIP | **Video**: AV1, VP9, VP8, H265, H264
**Audio**: Opus, G722, G711 (PCMA, PCMU) |
| [WebRTC servers](05-webrtc-servers.md) | WHEP | **Video**: AV1, VP9, VP8, H265, H264
**Audio**: Opus, G722, G711 (PCMA, PCMU) |
| [RTSP clients](06-rtsp-clients.md) | UDP, TCP, RTSPS | **Video**: AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video, MJPEG
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G726, G722, G711 (PCMA, PCMU), LPCM
**Other**: KLV, MPEG-TS, any RTP-compatible codec |
-| [RTSP cameras and servers](07-rtsp-cameras-and-servers) | UDP, UDP-Multicast, TCP, RTSPS | **Video**: AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video, MJPEG
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G726, G722, G711 (PCMA, PCMU), LPCM
**Other**: KLV, MPEG-TS, any RTP-compatible codec |
+| [RTSP cameras and servers](07-rtsp-cameras-and-servers.md) | UDP, UDP-Multicast, TCP, RTSPS | **Video**: AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video, MJPEG
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G726, G722, G711 (PCMA, PCMU), LPCM
**Other**: KLV, MPEG-TS, any RTP-compatible codec |
| [RTMP clients](08-rtmp-clients.md) | RTMP, RTMPS, Enhanced RTMP | **Video**: AV1, VP9, H265, H264
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G711 (PCMA, PCMU), LPCM |
| [RTMP cameras and servers](09-rtmp-cameras-and-servers.md) | RTMP, RTMPS, Enhanced RTMP | **Video**: AV1, VP9, H265, H264
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G711 (PCMA, PCMU), LPCM |
| [HLS cameras and servers](10-hls-cameras-and-servers.md) | Low-Latency HLS, MP4-based HLS, legacy HLS | **Video**: AV1, VP9, H265, H264
**Audio**: Opus, MPEG-4 Audio (AAC) |
diff --git a/docs/2-publish/12-rtp.md b/docs/2-publish/12-rtp.md
index c7d6bb04..cb3c2a4c 100644
--- a/docs/2-publish/12-rtp.md
+++ b/docs/2-publish/12-rtp.md
@@ -22,5 +22,3 @@ paths:
`rtpSDP` must contain a valid SDP, that is a description of the RTP session.
Some clients that can publish with UDP and MPEG-TS are [FFmpeg](15-ffmpeg.md) and [GStreamer](16-gstreamer.md).
-
-## Devices
diff --git a/docs/2-publish/17-obs-studio.md b/docs/2-publish/17-obs-studio.md
index dcbeb99c..f485adae 100644
--- a/docs/2-publish/17-obs-studio.md
+++ b/docs/2-publish/17-obs-studio.md
@@ -1,6 +1,6 @@
# OBS Studio
-OBS Studio can publish to the server in several ways. The recommended one consists in publishing with RTMP.
+OBS Studio can publish streams to the server in several ways. The recommended one consists in publishing with RTMP.
## OBS Studio and RTMP
@@ -107,7 +107,7 @@ OBS Studio can publish multiple video tracks or renditions at once. Make sure th
## OBS Studio and WebRTC
-Recent versions of OBS Studio can also publish to the server with the [WebRTC / WHIP protocol](21-webrtc-clients.md) Use the following parameters:
+Recent versions of OBS Studio can also publish streams to the server with the [WebRTC / WHIP protocol](04-webrtc-clients.md) Use the following parameters:
- Service: `WHIP`
- Server: `http://localhost:8889/mystream/whip`
diff --git a/docs/2-publish/18-python-opencv.md b/docs/2-publish/18-python-opencv.md
index d6afa49e..bb5f2b5e 100644
--- a/docs/2-publish/18-python-opencv.md
+++ b/docs/2-publish/18-python-opencv.md
@@ -1,6 +1,6 @@
# Python and OpenCV
-Python-based software can publish to the server with the OpenCV library and its GStreamer plugin, acting as a [RTSP client](06-rtsp-clients.md). OpenCV must be compiled with support for GStreamer, by following this procedure:
+Python-based software can publish streams to the server with the OpenCV library and its GStreamer plugin, acting as a [RTSP client](06-rtsp-clients.md). OpenCV must be compiled with support for GStreamer, by following this procedure:
```sh
sudo apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-ugly gstreamer1.0-rtsp python3-dev python3-numpy
diff --git a/docs/2-publish/19-golang.md b/docs/2-publish/19-golang.md
index fa345b67..36ed3504 100644
--- a/docs/2-publish/19-golang.md
+++ b/docs/2-publish/19-golang.md
@@ -1,3 +1,8 @@
# Golang
-You can publish to the server from the Go programming language by using [gortsplib](https://github.com/bluenviron/gortsplib), a RTSP client/server library, and [gortmplib](https://github.com/bluenviron/gortmplib), a RTMP client/server library. Both powers _MediaMTX_ itself. In the repositories of these projects there are several examples on how to connect to a server and push data.
+You can publish a stream to the server by using the Go programming language and the following libraries:
+
+- [gortsplib](https://github.com/bluenviron/gortsplib) to publish with RTSP.
+- [gortmplib](https://github.com/bluenviron/gortmplib) to publish with RTMP.
+
+Both powers _MediaMTX_ itself. In the repositories of these projects there are several examples on how to connect to a server and push data.
diff --git a/docs/3-read/01-overview.md b/docs/3-read/01-overview.md
index 526f232d..30563fce 100644
--- a/docs/3-read/01-overview.md
+++ b/docs/3-read/01-overview.md
@@ -2,13 +2,13 @@
Live streams can be read from the server with the following protocols and codecs:
-| protocol | variants | codecs |
-| ---------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| [SRT](02-srt.md) | | **Video**: H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3
**Other**: KLV |
-| [WebRTC](03-webrtc.md) | WHEP | **Video**: AV1, VP9, VP8, H265, H264
**Audio**: Opus, G722, G711 (PCMA, PCMU)
**Other**: KLV |
-| [RTSP](04-rtsp.md) | UDP, UDP-Multicast, TCP, RTSPS | **Video**: AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video, M-JPEG
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G726, G722, G711 (PCMA, PCMU), LPCM
**Other**: KLV, MPEG-TS, any RTP-compatible codec |
-| [RTMP](05-rtmp.md) | RTMP, RTMPS, Enhanced RTMP | **Video**: AV1, VP9, H265, H264
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G711 (PCMA, PCMU), LPCM |
-| [HLS](06-hls.md) | Low-Latency HLS, MP4-based HLS, legacy HLS | **Video**: AV1, VP9, H265, H264
**Audio**: Opus, MPEG-4 Audio (AAC) |
+| protocol | variants | codecs |
+| ------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| [SRT clients](02-srt.md) | | **Video**: H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3
**Other**: KLV |
+| [WebRTC clients](03-webrtc.md) | WHEP | **Video**: AV1, VP9, VP8, H265, H264
**Audio**: Opus, G722, G711 (PCMA, PCMU)
**Other**: KLV |
+| [RTSP clients](04-rtsp.md) | UDP, UDP-Multicast, TCP, RTSPS | **Video**: AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video, M-JPEG
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G726, G722, G711 (PCMA, PCMU), LPCM
**Other**: KLV, MPEG-TS, any RTP-compatible codec |
+| [RTMP clients](05-rtmp.md) | RTMP, RTMPS, Enhanced RTMP | **Video**: AV1, VP9, H265, H264
**Audio**: Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G711 (PCMA, PCMU), LPCM |
+| [HLS](06-hls.md) | Low-Latency HLS, MP4-based HLS, legacy HLS | **Video**: AV1, VP9, H265, H264
**Audio**: Opus, MPEG-4 Audio (AAC) |
We provide instructions for reading with the following software:
@@ -16,5 +16,7 @@ We provide instructions for reading with the following software:
- [GStreamer](08-gstreamer.md)
- [VLC](09-vlc.md)
- [OBS Studio](10-obs-studio.md)
-- [Unity](11-unity.md)
-- [Web browsers](12-web-browsers.md)
+- [Python and OpenCV](11-python-opencv.md)
+- [Golang](12-golang.md)
+- [Unity](13-unity.md)
+- [Web browsers](14-web-browsers.md)
diff --git a/docs/3-read/02-srt.md b/docs/3-read/02-srt.md
index e3ac9121..2603b27b 100644
--- a/docs/3-read/02-srt.md
+++ b/docs/3-read/02-srt.md
@@ -1,4 +1,4 @@
-# SRT
+# SRT clients
SRT is a protocol that allows to publish and read live data stream, providing encryption, integrity and a retransmission mechanism. It is usually used to transfer media streams encoded with MPEG-TS. In order to read a stream from the server with the SRT protocol, use this URL:
diff --git a/docs/3-read/03-webrtc.md b/docs/3-read/03-webrtc.md
index dd424281..e5045780 100644
--- a/docs/3-read/03-webrtc.md
+++ b/docs/3-read/03-webrtc.md
@@ -1,4 +1,4 @@
-# WebRTC
+# WebRTC clients
WebRTC is an API that makes use of a set of protocols and methods to connect two clients together and allow them to exchange live media or data streams. You can read a stream with WebRTC and a web browser by visiting:
@@ -16,4 +16,4 @@ Be aware that not all browsers can read any codec, check [Supported browsers](..
Depending on the network it may be difficult to establish a connection between server and clients, read [Solving WebRTC connectivity issues](../4-other/22-webrtc-specific-features.md#solving-webrtc-connectivity-issues).
-Some clients that can read with WebRTC and WHEP are [FFmpeg](07-ffmpeg.md), [GStreamer](08-gstreamer.md), [Unity](11-unity.md) and [web browsers](12-web-browsers.md).
+Some clients that can read with WebRTC and WHEP are [FFmpeg](07-ffmpeg.md), [GStreamer](08-gstreamer.md), [Unity](13-unity.md) and [web browsers](14-web-browsers.md).
diff --git a/docs/3-read/04-rtsp.md b/docs/3-read/04-rtsp.md
index 01bee5e2..7afb8c1d 100644
--- a/docs/3-read/04-rtsp.md
+++ b/docs/3-read/04-rtsp.md
@@ -1,4 +1,4 @@
-# RTSP
+# RTSP clients
RTSP is a protocol that allows to publish and read streams. It supports several underlying transport protocols and encryption (see [RTSP-specific features](../4-other/23-rtsp-specific-features.md)). In order to read a stream with the RTSP protocol, use this URL:
diff --git a/docs/3-read/05-rtmp.md b/docs/3-read/05-rtmp.md
index 143dead0..fb957f27 100644
--- a/docs/3-read/05-rtmp.md
+++ b/docs/3-read/05-rtmp.md
@@ -1,4 +1,4 @@
-# RTMP
+# RTMP clients
RTMP is a protocol that allows to read and publish streams. It supports encryption, see [RTMP-specific features](../4-other/24-rtmp-specific-features.md). Streams can be read from the server by using the URL:
diff --git a/docs/3-read/06-hls.md b/docs/3-read/06-hls.md
index 5b7b9a85..444faf06 100644
--- a/docs/3-read/06-hls.md
+++ b/docs/3-read/06-hls.md
@@ -12,4 +12,4 @@ and can also be accessed without using the browsers, by software that supports t
http://localhost:8888/mystream/index.m3u8
```
-Some clients that can read with HLS are [FFmpeg](07-ffmpeg.md), [GStreamer](08-gstreamer.md), [VLC](09-vlc.md) and [web browsers](12-web-browsers.md).
+Some clients that can read with HLS are [FFmpeg](07-ffmpeg.md), [GStreamer](08-gstreamer.md), [VLC](09-vlc.md) and [web browsers](14-web-browsers.md).
diff --git a/docs/3-read/11-python-opencv.md b/docs/3-read/11-python-opencv.md
new file mode 100644
index 00000000..e397efd3
--- /dev/null
+++ b/docs/3-read/11-python-opencv.md
@@ -0,0 +1,24 @@
+# Python and OpenCV
+
+Python-based software can read streams from the server with the OpenCV library, acting as a [RTSP client](04-rtsp.md).
+
+```python
+import cv2
+
+cap = cv2.VideoCapture('rtsp://localhost:8554/mystream')
+if not cap.isOpened():
+ raise Exception("can't open video capture")
+
+while True:
+ ret, frame = cap.read()
+ if not ret:
+ raise Exception("can't receive frame")
+
+ cv2.imshow('frame', frame)
+
+ if cv2.waitKey(1) == ord('q'):
+ break
+
+cap.release()
+cv2.destroyAllWindows()
+```
diff --git a/docs/3-read/12-golang.md b/docs/3-read/12-golang.md
new file mode 100644
index 00000000..fbdbaaec
--- /dev/null
+++ b/docs/3-read/12-golang.md
@@ -0,0 +1,8 @@
+# Golang
+
+You can read a stream from the server by using the Go programming language and the following libraries:
+
+- [gortsplib](https://github.com/bluenviron/gortsplib) to read with RTSP.
+- [gortmplib](https://github.com/bluenviron/gortmplib) to read with RTMP.
+
+Both powers _MediaMTX_ itself. In the repositories of these projects there are several examples on how to connect to a server and read data.
diff --git a/docs/3-read/11-unity.md b/docs/3-read/13-unity.md
similarity index 100%
rename from docs/3-read/11-unity.md
rename to docs/3-read/13-unity.md
diff --git a/docs/3-read/12-web-browsers.md b/docs/3-read/14-web-browsers.md
similarity index 100%
rename from docs/3-read/12-web-browsers.md
rename to docs/3-read/14-web-browsers.md
diff --git a/docs/4-other/03-authentication.md b/docs/4-other/03-authentication.md
index a44b1ddc..ae53b74e 100644
--- a/docs/4-other/03-authentication.md
+++ b/docs/4-other/03-authentication.md
@@ -313,7 +313,7 @@ Pass the token as a query parameter:
rtmp://localhost/mystream?jwt=jwt
```
-WARNING: FFmpeg implementation of RTMP does not support query parameters that are longer than 1024 characters, therefore you have to configure your identity server in order to produce JWTs that are shorter than this threshold.
+WARNING: FFmpeg implementation of RTMP does not support URLs that are longer than 1024 characters (this is the [TCURL_MAX_LENGTH constant](https://github.com/FFmpeg/FFmpeg/blob/f951aa9ef382d6bb517e05d04d52710f751de427/libavformat/rtmpproto.c#L55)), therefore you have to configure your identity server in order to produce JWTs that are shorter than this threshold.
### SRT