The Multi-Stream RTSP Launcher is a Bash tool designed to quickly stand up an MediaMTX RTSP server and stream multiple video files over RTSP using FFmpeg.
It automatically:
- Installs FFmpeg and MediaMTX if not already available.
- Starts a local RTSP server (
rtsp://<local-ip>:8554/). - Scans a media folder for
.mp4files. - Streams each file as a unique RTSP source (
/src0,/src1, …). - Keeps processes alive and logs FFmpeg output to
/tmp/ffmpeg_src<N>.log.
This is particularly useful for testing multi-channel video pipelines and validating AI/vision workloads that depend on live RTSP streams.
sima-cli install gh:sima-ai/tool-mediasources- FFmpeg → Installed automatically if missing (apt-get, yum, or brew).
- MediaMTX → Downloaded and installed automatically from GitHub releases.
- Bash ≥ 4.0
- Linux (Debian/Ubuntu, CentOS/RHEL)
- macOS (via Homebrew)
- Windows (manual install of FFmpeg, MediaMTX required)
./mediasrc.sh ../videos-480p30Important
On Windows, open Powershell and run:
mediasrc.bat ..\videos-480p30The folder should contain one or more .mp4 files. Each file will be exposed as its own RTSP stream.
open preview.html