From f5bbf2bd8ec6049bb572ddcf1b12763cb31dcd61 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Tue, 18 Aug 2026 11:33:32 +0200 Subject: [PATCH] docs: prevent gaps in numbering (#6109) --- docs/1-kickoff/1-introduction.md | 8 ++-- docs/2-features/03-publish.md | 38 +++++++++---------- docs/2-features/05-configuration.md | 2 +- docs/2-features/11-forward.md | 2 +- .../{20-scalability.md => 19-scalability.md} | 2 +- docs/2-features/{21-hooks.md => 20-hooks.md} | 0 .../{22-control-api.md => 21-control-api.md} | 0 .../{23-metrics.md => 22-metrics.md} | 0 .../{24-performance.md => 23-performance.md} | 0 ...eatures.md => 24-srt-specific-features.md} | 0 ...ures.md => 25-webrtc-specific-features.md} | 2 +- ...atures.md => 26-rtsp-specific-features.md} | 4 +- ...atures.md => 27-rtmp-specific-features.md} | 2 +- ...ket-loss.md => 28-decrease-packet-loss.md} | 0 docs/3-publish/02-srt-clients.md | 4 +- ...rvers.md => 03-srt-cameras-and-servers.md} | 0 ...webrtc-clients.md => 04-webrtc-clients.md} | 6 +-- ...webrtc-servers.md => 05-webrtc-servers.md} | 0 ...{07-rtsp-clients.md => 06-rtsp-clients.md} | 4 +- ...vers.md => 07-rtsp-cameras-and-servers.md} | 2 +- ...{09-rtmp-clients.md => 08-rtmp-clients.md} | 4 +- ...vers.md => 09-rtmp-cameras-and-servers.md} | 0 ...rvers.md => 10-hls-cameras-and-servers.md} | 0 .../{12-mpeg-ts.md => 11-mpeg-ts.md} | 2 +- docs/3-publish/{13-rtp.md => 12-rtp.md} | 2 +- ...-cameras.md => 13-raspberry-pi-cameras.md} | 0 ...neric-webcams.md => 14-generic-webcams.md} | 0 ...{16-web-browsers.md => 15-web-browsers.md} | 4 +- docs/3-publish/{17-ffmpeg.md => 16-ffmpeg.md} | 4 +- .../{18-gstreamer.md => 17-gstreamer.md} | 4 +- .../{19-obs-studio.md => 18-obs-studio.md} | 4 +- ...0-python-opencv.md => 19-python-opencv.md} | 2 +- docs/3-publish/{21-golang.md => 20-golang.md} | 0 docs/3-publish/{22-unity.md => 21-unity.md} | 2 +- docs/4-read/02-srt.md | 2 +- docs/4-read/03-webrtc.md | 4 +- docs/4-read/04-rtsp.md | 2 +- docs/4-read/05-rtmp.md | 2 +- docs/4-read/06-hls.md | 2 +- docs/4-read/07-web-browsers.md | 2 +- docs/5-references/2-control-api.md | 2 +- internal/linters/docsorder/docsorder_test.go | 8 +++- 42 files changed, 67 insertions(+), 61 deletions(-) rename docs/2-features/{20-scalability.md => 19-scalability.md} (99%) rename docs/2-features/{21-hooks.md => 20-hooks.md} (100%) rename docs/2-features/{22-control-api.md => 21-control-api.md} (100%) rename docs/2-features/{23-metrics.md => 22-metrics.md} (100%) rename docs/2-features/{24-performance.md => 23-performance.md} (100%) rename docs/2-features/{25-srt-specific-features.md => 24-srt-specific-features.md} (100%) rename docs/2-features/{26-webrtc-specific-features.md => 25-webrtc-specific-features.md} (99%) rename docs/2-features/{27-rtsp-specific-features.md => 26-rtsp-specific-features.md} (97%) rename docs/2-features/{28-rtmp-specific-features.md => 27-rtmp-specific-features.md} (95%) rename docs/2-features/{29-decrease-packet-loss.md => 28-decrease-packet-loss.md} (100%) rename docs/3-publish/{04-srt-cameras-and-servers.md => 03-srt-cameras-and-servers.md} (100%) rename docs/3-publish/{05-webrtc-clients.md => 04-webrtc-clients.md} (83%) rename docs/3-publish/{06-webrtc-servers.md => 05-webrtc-servers.md} (100%) rename docs/3-publish/{07-rtsp-clients.md => 06-rtsp-clients.md} (87%) rename docs/3-publish/{08-rtsp-cameras-and-servers.md => 07-rtsp-cameras-and-servers.md} (96%) rename docs/3-publish/{09-rtmp-clients.md => 08-rtmp-clients.md} (79%) rename docs/3-publish/{10-rtmp-cameras-and-servers.md => 09-rtmp-cameras-and-servers.md} (100%) rename docs/3-publish/{11-hls-cameras-and-servers.md => 10-hls-cameras-and-servers.md} (100%) rename docs/3-publish/{12-mpeg-ts.md => 11-mpeg-ts.md} (96%) rename docs/3-publish/{13-rtp.md => 12-rtp.md} (97%) rename docs/3-publish/{14-raspberry-pi-cameras.md => 13-raspberry-pi-cameras.md} (100%) rename docs/3-publish/{15-generic-webcams.md => 14-generic-webcams.md} (100%) rename docs/3-publish/{16-web-browsers.md => 15-web-browsers.md} (94%) rename docs/3-publish/{17-ffmpeg.md => 16-ffmpeg.md} (83%) rename docs/3-publish/{18-gstreamer.md => 17-gstreamer.md} (88%) rename docs/3-publish/{19-obs-studio.md => 18-obs-studio.md} (98%) rename docs/3-publish/{20-python-opencv.md => 19-python-opencv.md} (96%) rename docs/3-publish/{21-golang.md => 20-golang.md} (100%) rename docs/3-publish/{22-unity.md => 21-unity.md} (98%) diff --git a/docs/1-kickoff/1-introduction.md b/docs/1-kickoff/1-introduction.md index 0eb23ec9..ba854809 100644 --- a/docs/1-kickoff/1-introduction.md +++ b/docs/1-kickoff/1-introduction.md @@ -17,10 +17,10 @@ Main features: - [Authenticate](../2-features/06-authentication.md) users with internal, HTTP or JWT authentication - [Forward streams](../2-features/11-forward.md) to other servers - [Proxy requests](../2-features/12-proxy.md) to other servers -- [Control](../2-features/22-control-api.md) the server through the Control API -- [Extract metrics](../2-features/23-metrics.md) from the server in a Prometheus-compatible format -- [Monitor performance](../2-features/24-performance.md) to investigate CPU and RAM consumption -- [Run hooks](../2-features/21-hooks.md) (external commands) when clients connect, disconnect, read or publish streams +- [Control](../2-features/21-control-api.md) the server through the Control API +- [Extract metrics](../2-features/22-metrics.md) from the server in a Prometheus-compatible format +- [Monitor performance](../2-features/23-performance.md) to investigate CPU and RAM consumption +- [Run hooks](../2-features/20-hooks.md) (external commands) when clients connect, disconnect, read or publish streams - Compatible with Linux, Windows and macOS, does not require any dependency or interpreter, it's a single executable Use the menu to navigate through the documentation. diff --git a/docs/2-features/03-publish.md b/docs/2-features/03-publish.md index ba5ed900..32ca5aca 100644 --- a/docs/2-features/03-publish.md +++ b/docs/2-features/03-publish.md @@ -4,28 +4,28 @@ Live streams can be published to the server with the following protocols: - [Media-over-QUIC clients](../3-publish/01-moq-clients.md) - [SRT clients](../3-publish/02-srt-clients.md) -- [SRT cameras and servers](../3-publish/04-srt-cameras-and-servers.md) -- [WebRTC clients](../3-publish/05-webrtc-clients.md) -- [WebRTC servers](../3-publish/06-webrtc-servers.md) -- [RTSP clients](../3-publish/07-rtsp-clients.md) -- [RTSP cameras and servers](../3-publish/08-rtsp-cameras-and-servers.md) -- [RTMP clients](../3-publish/09-rtmp-clients.md) -- [RTMP cameras and servers](../3-publish/10-rtmp-cameras-and-servers.md) -- [HLS cameras and servers](../3-publish/11-hls-cameras-and-servers.md) -- [MPEG-TS](../3-publish/12-mpeg-ts.md) -- [RTP](../3-publish/13-rtp.md) +- [SRT cameras and servers](../3-publish/03-srt-cameras-and-servers.md) +- [WebRTC clients](../3-publish/04-webrtc-clients.md) +- [WebRTC servers](../3-publish/05-webrtc-servers.md) +- [RTSP clients](../3-publish/06-rtsp-clients.md) +- [RTSP cameras and servers](../3-publish/07-rtsp-cameras-and-servers.md) +- [RTMP clients](../3-publish/08-rtmp-clients.md) +- [RTMP cameras and servers](../3-publish/09-rtmp-cameras-and-servers.md) +- [HLS cameras and servers](../3-publish/10-hls-cameras-and-servers.md) +- [MPEG-TS](../3-publish/11-mpeg-ts.md) +- [RTP](../3-publish/12-rtp.md) We provide instructions for publishing with the following devices: -- [Raspberry Pi Cameras](../3-publish/14-raspberry-pi-cameras.md) -- [Generic webcams](../3-publish/15-generic-webcams.md) +- [Raspberry Pi Cameras](../3-publish/13-raspberry-pi-cameras.md) +- [Generic webcams](../3-publish/14-generic-webcams.md) We provide instructions for publishing with the following software: -- [Web browsers](../3-publish/16-web-browsers.md) -- [FFmpeg](../3-publish/17-ffmpeg.md) -- [GStreamer](../3-publish/18-gstreamer.md) -- [OBS Studio](../3-publish/19-obs-studio.md) -- [Python and OpenCV](../3-publish/20-python-opencv.md) -- [Golang](../3-publish/21-golang.md) -- [Unity](../3-publish/22-unity.md) +- [Web browsers](../3-publish/15-web-browsers.md) +- [FFmpeg](../3-publish/16-ffmpeg.md) +- [GStreamer](../3-publish/17-gstreamer.md) +- [OBS Studio](../3-publish/18-obs-studio.md) +- [Python and OpenCV](../3-publish/19-python-opencv.md) +- [Golang](../3-publish/20-golang.md) +- [Unity](../3-publish/21-unity.md) diff --git a/docs/2-features/05-configuration.md b/docs/2-features/05-configuration.md index 3a036b07..aa84ef19 100644 --- a/docs/2-features/05-configuration.md +++ b/docs/2-features/05-configuration.md @@ -47,7 +47,7 @@ There are several ways to change configuration parameters: docker run --rm -it --network=host -e MTX_PATHS_TEST_SOURCE=rtsp://myurl bluenviron/mediamtx:1 ``` -3. Use the [Control API](22-control-api.md). +3. Use the [Control API](21-control-api.md). ## Encrypt the configuration diff --git a/docs/2-features/11-forward.md b/docs/2-features/11-forward.md index 92d41a54..c70938c8 100644 --- a/docs/2-features/11-forward.md +++ b/docs/2-features/11-forward.md @@ -40,7 +40,7 @@ paths: whipBearerToken: "" ``` -If the remote server is a _MediaMTX_ instance, remember to add a `/whip` suffix after the stream name, since in _MediaMTX_ [it's part of the WHIP URL](../3-publish/05-webrtc-clients.md). +If the remote server is a _MediaMTX_ instance, remember to add a `/whip` suffix after the stream name, since in _MediaMTX_ [it's part of the WHIP URL](../3-publish/04-webrtc-clients.md). ## RTSP diff --git a/docs/2-features/20-scalability.md b/docs/2-features/19-scalability.md similarity index 99% rename from docs/2-features/20-scalability.md rename to docs/2-features/19-scalability.md index 3b72cac8..ced02aa8 100644 --- a/docs/2-features/20-scalability.md +++ b/docs/2-features/19-scalability.md @@ -15,7 +15,7 @@ Publishers are meant to publish to the origin instance. Read replicas must be configured in this way: - Add one or more proxy paths, pointing to the MediaMTX origin instance, as described in [Proxy](12-proxy.md). -- If the protocol used by readers is WebRTC, disable `webrtcLocalUDPAddress` and `webrtcLocalTCPAddress` and enable a STUN server, as described in [Solving WebRTC connectivity issues](26-webrtc-specific-features.md#solving-webrtc-connectivity-issues). +- If the protocol used by readers is WebRTC, disable `webrtcLocalUDPAddress` and `webrtcLocalTCPAddress` and enable a STUN server, as described in [Solving WebRTC connectivity issues](25-webrtc-specific-features.md#solving-webrtc-connectivity-issues). The load balancer has to behave differently depending on the protocol(s) readers are gonna use to read the stream: diff --git a/docs/2-features/21-hooks.md b/docs/2-features/20-hooks.md similarity index 100% rename from docs/2-features/21-hooks.md rename to docs/2-features/20-hooks.md diff --git a/docs/2-features/22-control-api.md b/docs/2-features/21-control-api.md similarity index 100% rename from docs/2-features/22-control-api.md rename to docs/2-features/21-control-api.md diff --git a/docs/2-features/23-metrics.md b/docs/2-features/22-metrics.md similarity index 100% rename from docs/2-features/23-metrics.md rename to docs/2-features/22-metrics.md diff --git a/docs/2-features/24-performance.md b/docs/2-features/23-performance.md similarity index 100% rename from docs/2-features/24-performance.md rename to docs/2-features/23-performance.md diff --git a/docs/2-features/25-srt-specific-features.md b/docs/2-features/24-srt-specific-features.md similarity index 100% rename from docs/2-features/25-srt-specific-features.md rename to docs/2-features/24-srt-specific-features.md diff --git a/docs/2-features/26-webrtc-specific-features.md b/docs/2-features/25-webrtc-specific-features.md similarity index 99% rename from docs/2-features/26-webrtc-specific-features.md rename to docs/2-features/25-webrtc-specific-features.md index ab8c86ec..093338c2 100644 --- a/docs/2-features/26-webrtc-specific-features.md +++ b/docs/2-features/25-webrtc-specific-features.md @@ -1,6 +1,6 @@ # WebRTC-specific features -WebRTC is a protocol that can be used for publishing and reading streams. Regarding specific tasks, check out [Publish with WebRTC clients](../3-publish/05-webrtc-clients.md) and [Read with WebRTC clients](../4-read/03-webrtc.md). Features in this page are shared among both tasks. +WebRTC is a protocol that can be used for publishing and reading streams. Regarding specific tasks, check out [Publish with WebRTC clients](../3-publish/04-webrtc-clients.md) and [Read with WebRTC clients](../4-read/03-webrtc.md). Features in this page are shared among both tasks. ## Codec support in browsers diff --git a/docs/2-features/27-rtsp-specific-features.md b/docs/2-features/26-rtsp-specific-features.md similarity index 97% rename from docs/2-features/27-rtsp-specific-features.md rename to docs/2-features/26-rtsp-specific-features.md index ee766f0d..48ba2968 100644 --- a/docs/2-features/27-rtsp-specific-features.md +++ b/docs/2-features/26-rtsp-specific-features.md @@ -1,6 +1,6 @@ # RTSP-specific features -RTSP is a protocol that can be used for publishing and reading streams. Regarding specific tasks, check out [Publish with RTSP clients](../3-publish/07-rtsp-clients.md) and [Read with RTSP clients](../4-read/04-rtsp.md). Features in this page are shared among both tasks. +RTSP is a protocol that can be used for publishing and reading streams. Regarding specific tasks, check out [Publish with RTSP clients](../3-publish/06-rtsp-clients.md) and [Read with RTSP clients](../4-read/04-rtsp.md). Features in this page are shared among both tasks. ## Transport protocols @@ -107,4 +107,4 @@ There are also the `rtsps+http`, `rtsp+ws`, `rtsps+ws` schemes to handle any var ## MPEG-TS inside RTSP -read [MPEG-TS inside RTSP](../3-publish/07-rtsp-clients.md#mpeg-ts-inside-rtsp) in the "Publish with RTSP clients" page. +read [MPEG-TS inside RTSP](../3-publish/06-rtsp-clients.md#mpeg-ts-inside-rtsp) in the "Publish with RTSP clients" page. diff --git a/docs/2-features/28-rtmp-specific-features.md b/docs/2-features/27-rtmp-specific-features.md similarity index 95% rename from docs/2-features/28-rtmp-specific-features.md rename to docs/2-features/27-rtmp-specific-features.md index da913720..b641b373 100644 --- a/docs/2-features/28-rtmp-specific-features.md +++ b/docs/2-features/27-rtmp-specific-features.md @@ -1,6 +1,6 @@ # RTMP-specific features -RTMP is a protocol that can be used for publishing and reading streams. Regarding specific tasks, check out [Publish with RTMP clients](../3-publish/09-rtmp-clients.md) and [Read with RTMP clients](../4-read/05-rtmp.md). Features in this page are shared among both tasks. +RTMP is a protocol that can be used for publishing and reading streams. Regarding specific tasks, check out [Publish with RTMP clients](../3-publish/08-rtmp-clients.md) and [Read with RTMP clients](../4-read/05-rtmp.md). Features in this page are shared among both tasks. ## Encryption diff --git a/docs/2-features/29-decrease-packet-loss.md b/docs/2-features/28-decrease-packet-loss.md similarity index 100% rename from docs/2-features/29-decrease-packet-loss.md rename to docs/2-features/28-decrease-packet-loss.md diff --git a/docs/3-publish/02-srt-clients.md b/docs/3-publish/02-srt-clients.md index 3a936259..5e415a07 100644 --- a/docs/3-publish/02-srt-clients.md +++ b/docs/3-publish/02-srt-clients.md @@ -14,8 +14,8 @@ srt://localhost:8890?streamid=publish:mystream&pkt_size=1316 Replace `mystream` with any name you want. The resulting stream will be available on path `/mystream`. -If you need to use the standard stream ID syntax instead of the custom one in use by this server, read [Standard stream ID syntax](../2-features/25-srt-specific-features.md#standard-stream-id-syntax). +If you need to use the standard stream ID syntax instead of the custom one in use by this server, read [Standard stream ID syntax](../2-features/24-srt-specific-features.md#standard-stream-id-syntax). If you want to publish a stream by using a client in listening mode (i.e. with `mode=listener` appended to the URL), read the next section. -Some clients that can publish with SRT are [FFmpeg](17-ffmpeg.md), [GStreamer](18-gstreamer.md), [OBS Studio](19-obs-studio.md). +Some clients that can publish with SRT are [FFmpeg](16-ffmpeg.md), [GStreamer](17-gstreamer.md), [OBS Studio](18-obs-studio.md). diff --git a/docs/3-publish/04-srt-cameras-and-servers.md b/docs/3-publish/03-srt-cameras-and-servers.md similarity index 100% rename from docs/3-publish/04-srt-cameras-and-servers.md rename to docs/3-publish/03-srt-cameras-and-servers.md diff --git a/docs/3-publish/05-webrtc-clients.md b/docs/3-publish/04-webrtc-clients.md similarity index 83% rename from docs/3-publish/05-webrtc-clients.md rename to docs/3-publish/04-webrtc-clients.md index 298ca3c2..bb26e23d 100644 --- a/docs/3-publish/05-webrtc-clients.md +++ b/docs/3-publish/04-webrtc-clients.md @@ -19,8 +19,8 @@ WHIP is a WebRTC extension that allows to publish streams by using a URL, withou http://localhost:8889/mystream/whip ``` -Be aware that not all browsers can publish tracks with any codec, check [Codec support in browsers](../2-features/26-webrtc-specific-features.md#codec-support-in-browsers). +Be aware that not all browsers can publish tracks with any codec, check [Codec support in browsers](../2-features/25-webrtc-specific-features.md#codec-support-in-browsers). -Depending on the network it might be difficult to establish a connection between server and clients, read [Solving WebRTC connectivity issues](../2-features/26-webrtc-specific-features.md#solving-webrtc-connectivity-issues). +Depending on the network it might be difficult to establish a connection between server and clients, read [Solving WebRTC connectivity issues](../2-features/25-webrtc-specific-features.md#solving-webrtc-connectivity-issues). -Some clients that can publish with WebRTC and WHIP are [FFmpeg](17-ffmpeg.md), [GStreamer](18-gstreamer.md), [OBS Studio](19-obs-studio.md), [Unity](22-unity.md) and [Web browsers](16-web-browsers.md). +Some clients that can publish with WebRTC and WHIP are [FFmpeg](16-ffmpeg.md), [GStreamer](17-gstreamer.md), [OBS Studio](18-obs-studio.md), [Unity](21-unity.md) and [Web browsers](15-web-browsers.md). diff --git a/docs/3-publish/06-webrtc-servers.md b/docs/3-publish/05-webrtc-servers.md similarity index 100% rename from docs/3-publish/06-webrtc-servers.md rename to docs/3-publish/05-webrtc-servers.md diff --git a/docs/3-publish/07-rtsp-clients.md b/docs/3-publish/06-rtsp-clients.md similarity index 87% rename from docs/3-publish/07-rtsp-clients.md rename to docs/3-publish/06-rtsp-clients.md index 1344645e..70fc426b 100644 --- a/docs/3-publish/07-rtsp-clients.md +++ b/docs/3-publish/06-rtsp-clients.md @@ -14,9 +14,9 @@ rtsp://localhost:8554/mystream The resulting stream will be available on path `/mystream`. -Some clients that can publish with RTSP are [FFmpeg](17-ffmpeg.md), [GStreamer](18-gstreamer.md), [OBS Studio](19-obs-studio.md), [Python and OpenCV](20-python-opencv.md). +Some clients that can publish with RTSP are [FFmpeg](16-ffmpeg.md), [GStreamer](17-gstreamer.md), [OBS Studio](18-obs-studio.md), [Python and OpenCV](19-python-opencv.md). -Advanced RTSP features and settings are described in [RTSP-specific features](../2-features/27-rtsp-specific-features.md). +Advanced RTSP features and settings are described in [RTSP-specific features](../2-features/26-rtsp-specific-features.md). ## MPEG-TS inside RTSP diff --git a/docs/3-publish/08-rtsp-cameras-and-servers.md b/docs/3-publish/07-rtsp-cameras-and-servers.md similarity index 96% rename from docs/3-publish/08-rtsp-cameras-and-servers.md rename to docs/3-publish/07-rtsp-cameras-and-servers.md index 1beb620e..cee642b4 100644 --- a/docs/3-publish/08-rtsp-cameras-and-servers.md +++ b/docs/3-publish/07-rtsp-cameras-and-servers.md @@ -27,4 +27,4 @@ The resulting stream will be available on path `/proxied`. It is possible to tune the connection by using several additional parameters, that are listed in the [configuration file](../5-references/1-configuration-file.md). -Advanced RTSP features and settings are described in [RTSP-specific features](../2-features/27-rtsp-specific-features.md). +Advanced RTSP features and settings are described in [RTSP-specific features](../2-features/26-rtsp-specific-features.md). diff --git a/docs/3-publish/09-rtmp-clients.md b/docs/3-publish/08-rtmp-clients.md similarity index 79% rename from docs/3-publish/09-rtmp-clients.md rename to docs/3-publish/08-rtmp-clients.md index d8db32b6..7b2359da 100644 --- a/docs/3-publish/09-rtmp-clients.md +++ b/docs/3-publish/08-rtmp-clients.md @@ -5,7 +5,7 @@ | **video** | AV1, VP9, H265, H264 | | **audio** | Opus, FLAC, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G711 (PCMA, PCMU), LPCM | -RTMP is a protocol that allows to read and publish streams. It has been expanded to support modern codecs (Enhanced RTMP) and it supports encryption, read [RTMP-specific features](../2-features/28-rtmp-specific-features.md). Streams can be published to the server by using the URL: +RTMP is a protocol that allows to read and publish streams. It has been expanded to support modern codecs (Enhanced RTMP) and it supports encryption, read [RTMP-specific features](../2-features/27-rtmp-specific-features.md). Streams can be published to the server by using the URL: ``` rtmp://localhost/mystream @@ -13,4 +13,4 @@ rtmp://localhost/mystream The resulting stream will be available on path `/mystream`. -Some clients that can publish with RTMP are [FFmpeg](17-ffmpeg.md), [GStreamer](18-gstreamer.md) and [OBS Studio](19-obs-studio.md). +Some clients that can publish with RTMP are [FFmpeg](16-ffmpeg.md), [GStreamer](17-gstreamer.md) and [OBS Studio](18-obs-studio.md). diff --git a/docs/3-publish/10-rtmp-cameras-and-servers.md b/docs/3-publish/09-rtmp-cameras-and-servers.md similarity index 100% rename from docs/3-publish/10-rtmp-cameras-and-servers.md rename to docs/3-publish/09-rtmp-cameras-and-servers.md diff --git a/docs/3-publish/11-hls-cameras-and-servers.md b/docs/3-publish/10-hls-cameras-and-servers.md similarity index 100% rename from docs/3-publish/11-hls-cameras-and-servers.md rename to docs/3-publish/10-hls-cameras-and-servers.md diff --git a/docs/3-publish/12-mpeg-ts.md b/docs/3-publish/11-mpeg-ts.md similarity index 96% rename from docs/3-publish/12-mpeg-ts.md rename to docs/3-publish/11-mpeg-ts.md index 2aa7b3a5..0bf64b17 100644 --- a/docs/3-publish/12-mpeg-ts.md +++ b/docs/3-publish/11-mpeg-ts.md @@ -40,7 +40,7 @@ paths: source: udp+mpegts://0.0.0.0:1234?source=192.168.3.5 ``` -Some clients that can publish with UDP and MPEG-TS are [FFmpeg](17-ffmpeg.md) and [GStreamer](18-gstreamer.md). +Some clients that can publish with UDP and MPEG-TS are [FFmpeg](16-ffmpeg.md) and [GStreamer](17-gstreamer.md). Unix sockets are more efficient than UDP packets and can be used as transport by specifying the `unix+mpegts` scheme: diff --git a/docs/3-publish/13-rtp.md b/docs/3-publish/12-rtp.md similarity index 97% rename from docs/3-publish/13-rtp.md rename to docs/3-publish/12-rtp.md index 0556ea36..cbd3cde7 100644 --- a/docs/3-publish/13-rtp.md +++ b/docs/3-publish/12-rtp.md @@ -58,4 +58,4 @@ paths: a=rtpmap:96 H264/90000 ``` -Some clients that can publish with UDP and MPEG-TS are [FFmpeg](17-ffmpeg.md) and [GStreamer](18-gstreamer.md). +Some clients that can publish with UDP and MPEG-TS are [FFmpeg](16-ffmpeg.md) and [GStreamer](17-gstreamer.md). diff --git a/docs/3-publish/14-raspberry-pi-cameras.md b/docs/3-publish/13-raspberry-pi-cameras.md similarity index 100% rename from docs/3-publish/14-raspberry-pi-cameras.md rename to docs/3-publish/13-raspberry-pi-cameras.md diff --git a/docs/3-publish/15-generic-webcams.md b/docs/3-publish/14-generic-webcams.md similarity index 100% rename from docs/3-publish/15-generic-webcams.md rename to docs/3-publish/14-generic-webcams.md diff --git a/docs/3-publish/16-web-browsers.md b/docs/3-publish/15-web-browsers.md similarity index 94% rename from docs/3-publish/16-web-browsers.md rename to docs/3-publish/15-web-browsers.md index 6f0047d2..b4a18602 100644 --- a/docs/3-publish/16-web-browsers.md +++ b/docs/3-publish/15-web-browsers.md @@ -1,6 +1,6 @@ # Web browsers -Web browsers can publish a stream to the server by acting as a [Media-over-QUIC client](01-moq-clients.md) or a [WebRTC client](05-webrtc-clients.md). +Web browsers can publish a stream to the server by acting as a [Media-over-QUIC client](01-moq-clients.md) or a [WebRTC client](04-webrtc-clients.md). ## Media-over-QUIC @@ -28,7 +28,7 @@ http://localhost:8889/mystream/publish The resulting stream will be available on path `/mystream`. -Be aware that not all browsers can publish tracks with any codec, check [Codec support in browsers](../2-features/26-webrtc-specific-features.md#codec-support-in-browsers). +Be aware that not all browsers can publish tracks with any codec, check [Codec support in browsers](../2-features/25-webrtc-specific-features.md#codec-support-in-browsers). This web page can be embedded into another web page by using an iframe: diff --git a/docs/3-publish/17-ffmpeg.md b/docs/3-publish/16-ffmpeg.md similarity index 83% rename from docs/3-publish/17-ffmpeg.md rename to docs/3-publish/16-ffmpeg.md index 14b76f4b..7e2411b2 100644 --- a/docs/3-publish/17-ffmpeg.md +++ b/docs/3-publish/16-ffmpeg.md @@ -1,6 +1,6 @@ # FFmpeg -FFmpeg can publish a stream to the server by acting as a [RTSP client](07-rtsp-clients.md), [RTMP client](09-rtmp-clients.md), [SRT client](02-srt-clients.md), [WebRTC client](05-webrtc-clients.md) or by sending [MPEG-TS packets](12-mpeg-ts.md) or [RTP packets](13-rtp.md). The recommended way is acting as a RTSP client. +FFmpeg can publish a stream to the server by acting as a [RTSP client](06-rtsp-clients.md), [RTMP client](08-rtmp-clients.md), [SRT client](02-srt-clients.md), [WebRTC client](04-webrtc-clients.md) or by sending [MPEG-TS packets](11-mpeg-ts.md) or [RTP packets](12-rtp.md). The recommended way is acting as a RTSP client. ## FFmpeg as a RTSP client @@ -52,7 +52,7 @@ ffmpeg -re -f lavfi -i testsrc=size=1280x720:rate=30 \ ## FFmpeg and RTP over UDP -In _MediaMTX_ configuration, add a path with `source: udp+rtp://238.0.0.1:1234` and a valid `rtpSDP` (read [RTP](13-rtp.md)). Then: +In _MediaMTX_ configuration, add a path with `source: udp+rtp://238.0.0.1:1234` and a valid `rtpSDP` (read [RTP](12-rtp.md)). Then: ```sh ffmpeg -re -f lavfi -i testsrc=size=1280x720:rate=30 \ diff --git a/docs/3-publish/18-gstreamer.md b/docs/3-publish/17-gstreamer.md similarity index 88% rename from docs/3-publish/18-gstreamer.md rename to docs/3-publish/17-gstreamer.md index 1b8a2292..ae4726d4 100644 --- a/docs/3-publish/18-gstreamer.md +++ b/docs/3-publish/17-gstreamer.md @@ -1,6 +1,6 @@ # GStreamer -GStreamer can publish a stream to the server by acting as a [RTSP client](07-rtsp-clients.md), [RTMP client](09-rtmp-clients.md), [SRT client](02-srt-clients.md), [WebRTC client](05-webrtc-clients.md) or by sending [MPEG-TS packets](12-mpeg-ts.md) or [RTP packets](13-rtp.md). The recommended way is acting as a RTSP client. +GStreamer can publish a stream to the server by acting as a [RTSP client](06-rtsp-clients.md), [RTMP client](08-rtmp-clients.md), [SRT client](02-srt-clients.md), [WebRTC client](04-webrtc-clients.md) or by sending [MPEG-TS packets](11-mpeg-ts.md) or [RTP packets](12-rtp.md). The recommended way is acting as a RTSP client. ## GStreamer as a RTSP client @@ -58,7 +58,7 @@ audiotestsrc ! audioconvert ! avenc_aac ! mux. ## GStreamer and RTP over UDP -In _MediaMTX_ configuration, add a path with `source: udp+rtp://238.0.0.1:1234` and a valid `rtpSDP` (read [RTP](13-rtp.md)). Then: +In _MediaMTX_ configuration, add a path with `source: udp+rtp://238.0.0.1:1234` and a valid `rtpSDP` (read [RTP](12-rtp.md)). Then: ```sh gst-launch-1.0 -v \ diff --git a/docs/3-publish/19-obs-studio.md b/docs/3-publish/18-obs-studio.md similarity index 98% rename from docs/3-publish/19-obs-studio.md rename to docs/3-publish/18-obs-studio.md index 4cd0a14d..be39c835 100644 --- a/docs/3-publish/19-obs-studio.md +++ b/docs/3-publish/18-obs-studio.md @@ -1,6 +1,6 @@ # OBS Studio -OBS Studio can publish streams to the server by acting as a [RTMP client](09-rtmp-clients.md) or a [WebRTC client](05-webrtc-clients.md) protocols. The recommended way is acting as a RTMP client. +OBS Studio can publish streams to the server by acting as a [RTMP client](08-rtmp-clients.md) or a [WebRTC client](04-webrtc-clients.md) protocols. The recommended way is acting as a RTMP client. ## OBS Studio as a RTMP client @@ -177,7 +177,7 @@ OBS Studio requires _MediaMTX_ to use a TLS certificate signed by a public certi ### Standard -Recent versions of OBS Studio can also publish streams to the server with the [WebRTC / WHIP protocol](05-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/3-publish/20-python-opencv.md b/docs/3-publish/19-python-opencv.md similarity index 96% rename from docs/3-publish/20-python-opencv.md rename to docs/3-publish/19-python-opencv.md index e04adc0d..bb5f2b5e 100644 --- a/docs/3-publish/20-python-opencv.md +++ b/docs/3-publish/19-python-opencv.md @@ -1,6 +1,6 @@ # Python and OpenCV -Python-based software can publish streams to the server with the OpenCV library and its GStreamer plugin, acting as a [RTSP client](07-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/3-publish/21-golang.md b/docs/3-publish/20-golang.md similarity index 100% rename from docs/3-publish/21-golang.md rename to docs/3-publish/20-golang.md diff --git a/docs/3-publish/22-unity.md b/docs/3-publish/21-unity.md similarity index 98% rename from docs/3-publish/22-unity.md rename to docs/3-publish/21-unity.md index 45f32f60..43bb77ce 100644 --- a/docs/3-publish/22-unity.md +++ b/docs/3-publish/21-unity.md @@ -1,6 +1,6 @@ # Unity -Software written with the Unity Engine can publish a stream to the server by acting as a [WebRTC client](05-webrtc-clients.md). +Software written with the Unity Engine can publish a stream to the server by acting as a [WebRTC client](04-webrtc-clients.md). Create a new Unity project or open an existing one. diff --git a/docs/4-read/02-srt.md b/docs/4-read/02-srt.md index 2fba8bc5..0c6626b6 100644 --- a/docs/4-read/02-srt.md +++ b/docs/4-read/02-srt.md @@ -14,6 +14,6 @@ srt://localhost:8890?streamid=read:mystream Replace `mystream` with the path name. -If you need to use the standard stream ID syntax instead of the custom one in use by this server, read [Standard stream ID syntax](../2-features/25-srt-specific-features.md#standard-stream-id-syntax). +If you need to use the standard stream ID syntax instead of the custom one in use by this server, read [Standard stream ID syntax](../2-features/24-srt-specific-features.md#standard-stream-id-syntax). Some clients that can read with SRT are [FFmpeg](08-ffmpeg.md), [GStreamer](09-gstreamer.md) and [VLC](10-vlc.md). diff --git a/docs/4-read/03-webrtc.md b/docs/4-read/03-webrtc.md index 9a2a3a28..afd76a5b 100644 --- a/docs/4-read/03-webrtc.md +++ b/docs/4-read/03-webrtc.md @@ -18,8 +18,8 @@ WHEP is a WebRTC extension that allows to read streams by using a URL, without p http://localhost:8889/mystream/whep ``` -Be aware that not all browsers can read tracks with any codec, check [Codec support in browsers](../2-features/26-webrtc-specific-features.md#codec-support-in-browsers). +Be aware that not all browsers can read tracks with any codec, check [Codec support in browsers](../2-features/25-webrtc-specific-features.md#codec-support-in-browsers). -Depending on the network it may be difficult to establish a connection between server and clients, read [Solving WebRTC connectivity issues](../2-features/26-webrtc-specific-features.md#solving-webrtc-connectivity-issues). +Depending on the network it may be difficult to establish a connection between server and clients, read [Solving WebRTC connectivity issues](../2-features/25-webrtc-specific-features.md#solving-webrtc-connectivity-issues). Some clients that can read with WebRTC and WHEP are [web browsers](07-web-browsers.md), [GStreamer](09-gstreamer.md) and [Unity](14-unity.md). diff --git a/docs/4-read/04-rtsp.md b/docs/4-read/04-rtsp.md index 46debc73..9724f975 100644 --- a/docs/4-read/04-rtsp.md +++ b/docs/4-read/04-rtsp.md @@ -6,7 +6,7 @@ | **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 is a protocol that allows to publish and read streams. It supports several underlying transport protocols and encryption (read [RTSP-specific features](../2-features/27-rtsp-specific-features.md)). In order to read a stream with the RTSP protocol, use this URL: +RTSP is a protocol that allows to publish and read streams. It supports several underlying transport protocols and encryption (read [RTSP-specific features](../2-features/26-rtsp-specific-features.md)). In order to read a stream with the RTSP protocol, use this URL: ``` rtsp://localhost:8554/mystream diff --git a/docs/4-read/05-rtmp.md b/docs/4-read/05-rtmp.md index c35b7916..0ecdcf58 100644 --- a/docs/4-read/05-rtmp.md +++ b/docs/4-read/05-rtmp.md @@ -5,7 +5,7 @@ | **video** | AV1, VP9, H265, H264 | | **audio** | Opus, FLAC, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G711 (PCMA, PCMU), LPCM | -RTMP is a protocol that allows to read and publish streams. It has been expanded to support modern codecs (Enhanced RTMP) and it supports encryption, read [RTMP-specific features](../2-features/28-rtmp-specific-features.md). Streams can be read from the server by using the URL: +RTMP is a protocol that allows to read and publish streams. It has been expanded to support modern codecs (Enhanced RTMP) and it supports encryption, read [RTMP-specific features](../2-features/27-rtmp-specific-features.md). Streams can be read from the server by using the URL: ``` rtmp://localhost/mystream diff --git a/docs/4-read/06-hls.md b/docs/4-read/06-hls.md index 4ce2fed2..118fa94c 100644 --- a/docs/4-read/06-hls.md +++ b/docs/4-read/06-hls.md @@ -22,4 +22,4 @@ Some clients that can read with HLS are [web browsers](07-web-browsers.md), [FFm _MediaMTX_ supports generating HLS in several variants (including Low-Latency mode), and provides various parameters to tune HLS generation. These are listed in the [configuration file](../5-references/1-configuration-file.md). -HLS can also be used to [scale the server](../2-features/20-scalability.md) through a CDN. +HLS can also be used to [scale the server](../2-features/19-scalability.md) through a CDN. diff --git a/docs/4-read/07-web-browsers.md b/docs/4-read/07-web-browsers.md index 1439ec37..9fa699e5 100644 --- a/docs/4-read/07-web-browsers.md +++ b/docs/4-read/07-web-browsers.md @@ -24,7 +24,7 @@ http://localhost:8889/mystream Replace `mystream` with the path name. -Be aware that not all browsers can read tracks with any codec, check [Codec support in browsers](../2-features/26-webrtc-specific-features.md#codec-support-in-browsers). +Be aware that not all browsers can read tracks with any codec, check [Codec support in browsers](../2-features/25-webrtc-specific-features.md#codec-support-in-browsers). ### HLS diff --git a/docs/5-references/2-control-api.md b/docs/5-references/2-control-api.md index 1e9a760b..d8b64690 100644 --- a/docs/5-references/2-control-api.md +++ b/docs/5-references/2-control-api.md @@ -1,3 +1,3 @@ # Control API reference -This is the reference of the Control API of the latest _MediaMTX_ release ({version_tag}), generated automatically from the [OpenAPI / Swagger file](https://github.com/bluenviron/mediamtx/blob/{version_tag}/api/openapi.yaml) available in the repository. Check the [Control API usage page](../2-features/22-control-api.md) for instructions on how to use the API. +This is the reference of the Control API of the latest _MediaMTX_ release ({version_tag}), generated automatically from the [OpenAPI / Swagger file](https://github.com/bluenviron/mediamtx/blob/{version_tag}/api/openapi.yaml) available in the repository. Check the [Control API usage page](../2-features/21-control-api.md) for instructions on how to use the API. diff --git a/internal/linters/docsorder/docsorder_test.go b/internal/linters/docsorder/docsorder_test.go index 5dd6bbc5..0992ac94 100644 --- a/internal/linters/docsorder/docsorder_test.go +++ b/internal/linters/docsorder/docsorder_test.go @@ -69,7 +69,13 @@ func TestDocsOrder(t *testing.T) { usesPadding := len(numbered) >= 10 - for _, nf := range numbered { + for i, nf := range numbered { + // Check for gaps. Expected number matches 1-based index (1, 2, 3...) + expectedNum := i + 1 + if nf.num != expectedNum { + t.Errorf("docs/%s/%s: gap detected in sequence, expected number %d but got %d", entry.Name(), nf.name, expectedNum, nf.num) + } + if usesPadding { if len(nf.numStr) != 2 { t.Errorf("docs/%s/%s: expected zero-padded prefix, got %q", entry.Name(), nf.name, nf.numStr)