Skip to content

mediasource tool streams multiple RTSP streams from files, support local preview

License

Notifications You must be signed in to change notification settings

SiMa-ai/tool-mediasources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Multi-Stream RTSP Launcher

License Platform

Overview

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 .mp4 files.
  • 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.

Usage

1. Download the tool and video assets

sima-cli install gh:sima-ai/tool-mediasources

2. Dependencies

  • FFmpeg → Installed automatically if missing (apt-get, yum, or brew).
  • MediaMTX → Downloaded and installed automatically from GitHub releases.
  • Bash ≥ 4.0

3. Supported platforms:

  • Linux (Debian/Ubuntu, CentOS/RHEL)
  • macOS (via Homebrew)
  • Windows (manual install of FFmpeg, MediaMTX required)

4. Run with a media folder

./mediasrc.sh ../videos-480p30

Important

On Windows, open Powershell and run:

mediasrc.bat ..\videos-480p30

The folder should contain one or more .mp4 files. Each file will be exposed as its own RTSP stream.

5. Preview the streams

open preview.html

About

mediasource tool streams multiple RTSP streams from files, support local preview

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks