Back to Mediamtx

VLC

docs/4-read/10-vlc.md

1.19.01.3 KB
Original Source

VLC

VLC can read a stream from the server by using the RTSP, RTMP, HLS and SRT protocols. The recommended one is RTSP.

In order to minimize latency, it is also suggested to change the Network caching parameter of VLC:

  1. Open VLC, Tools, Preferences, Show Settings, All, page Input / Codecs.
  2. Find the Network caching (ms) parameter, set it to 50. Save

VLC and RTSP

Open the following URL:

rtsp://localhost:8554/mystream

RTSP and Ubuntu

The VLC shipped with Ubuntu 21.10 doesn't support playing RTSP due to a license issue (read here and here). To fix the issue, remove the default VLC instance and install the snap version:

sh
sudo apt purge -y vlc
snap install vlc

Encrypted RTSP

At the moment VLC doesn't support reading encrypted RTSP streams (RTSPS). However, you can use a proxy like stunnel or nginx or a local MediaMTX instance to decrypt streams before reading them.

VLC and RTMP

Open the following URL:

rtmp://localhost/mystream

VLC and SRT

Open the following URL:

srt://localhost:8890?streamid=read:mystream