Skip to content

Commit 0ede14d

Browse files
authored
docs: update (#4995)
1 parent 0b63561 commit 0ede14d

5 files changed

Lines changed: 24 additions & 6 deletions

File tree

docs/1-kickoff/2-installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are several installation methods available: standalone binary, Docker imag
1616

1717
Download and launch the image:
1818

19-
```
19+
```sh
2020
docker run --rm -it --network=host bluenviron/mediamtx:latest
2121
```
2222

@@ -33,7 +33,7 @@ The `--network=host` flag is mandatory for RTSP to work, since Docker can change
3333

3434
If the `--network=host` cannot be used (for instance, it is not compatible with Windows or Kubernetes), you can disable the RTSP UDP transport protocol, add the server IP to `MTX_WEBRTCADDITIONALHOSTS` and expose ports manually:
3535

36-
```
36+
```sh
3737
docker run --rm -it \
3838
-e MTX_RTSPTRANSPORTS=tcp \
3939
-e MTX_WEBRTCADDITIONALHOSTS=192.168.x.x \
@@ -60,7 +60,7 @@ makepkg -si
6060

6161
Available via ports tree or using packages (2025Q2 and later) as listed below:
6262

63-
```
63+
```sh
6464
cd /usr/ports/multimedia/mediamtx && make install clean
6565
pkg install mediamtx
6666
```

docs/2-usage/2-publish.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ audiotestsrc ! audioconvert ! avenc_aac ! mux.
524524

525525
Make sure that GStreamer version is at least 1.22, and that if the codec is H264, the profile is baseline. Use the `whipclientsink` element:
526526

527-
```
527+
```sh
528528
gst-launch-1.0 videotestsrc \
529529
! video/x-raw,width=1920,height=1080,format=I420 \
530530
! x264enc speed-preset=ultrafast bitrate=2000 \

docs/2-usage/23-rtsp-specific-features.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ gst-launch-1.0 filesrc location=file.mp4 ! qtdemux name=d \
7575
d.video_0 ! rtspclientsink location=rtsp://localhost:8554/mystream tls-validation-flags=0 profiles=GST_RTSP_PROFILE_SAVP
7676
```
7777

78+
## Tunneling
79+
80+
In environments where HTTP is the only protocol available for exposing services (for instance, when there are mandatory API gateways or strict firewalls), the RTSP protocol can be tunneled inside HTTP. There are two standardized HTTP tunneling variants:
81+
82+
- RTSP over WebSocket: more efficient, requires WebSocket support from the gateway / firewall
83+
- RTSP over HTTP: older variant, should work even in extreme cases
84+
85+
_MediaMTX_ is automatically able to handle incoming HTTP tunneled connections, without any configuration required.
86+
87+
In order to read a RTSP from an external server using HTTP tunneling, you can use the `rtsp+http` scheme:
88+
89+
```yml
90+
paths:
91+
source: rtsp+http://standard-rtsp-url
92+
```
93+
94+
There are also the `rtsp+https`, `rtsp+ws`, `rtsp+wss` schemes to handle any variant.
95+
7896
## Decreasing corrupted frames
7997

8098
In some scenarios, when publishing or reading from the server with RTSP, frames can get corrupted. This can be caused by several reasons:

docs/2-usage/3-read.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ vlc --network-caching=50 rtsp://localhost:8554/mystream
246246

247247
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:
248248

249-
```
249+
```sh
250250
sudo apt purge -y vlc
251251
snap install vlc
252252
```

docs/2-usage/4-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ There are several ways to change the configuration:
88
- included into the release bundle
99
- available in the root folder of the Docker image (`/mediamtx.yml`); it can be overridden in this way:
1010

11-
```
11+
```sh
1212
docker run --rm -it --network=host -v "$PWD/mediamtx.yml:/mediamtx.yml:ro" bluenviron/mediamtx
1313
```
1414

0 commit comments

Comments
 (0)