My configuration for MediaMTX, a video streaming proxy server.
This repository contains the configuration files for MediaMTX. The configuration is meant to be used with the containers from the Home Lab Helm repository.
-
Create a
Projects
directory in the current user’s home directory.mkdir --parents ~/Projects
-
Clone this repository under
~/Projects
.git -C ~/Projects clone https://codeberg.org/jwillikers/mediamtx-config.git
-
Then mount the provided
mediamtx.yaml
file inside the MediaMTX server container at/mediamtx.yaml
.
A stream can be published to the server. The following example demonstrates how to publish an RTSP stream from a Raspberry Pi 5 using GStreamer.
-
Install the necessary dependencies.
sudo apt install --yes libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-gl gstreamer1.0-plugins-base-apps libcamera-dev gstreamer1.0-libcamera gstreamer1.0-rtsp
-
Use the
gst-launch-1.0
command to create a pipeline and publish the camera feed to the server.gst-launch-1.0 -v libcamerasrc ! video/x-raw, format=RGBx, width=1920, height=1080, framerate=30/1 ! videoconvert ! video/x-raw,format=I420 ! openh264enc complexity=high multi-thread=4 rate-control=buffer slice-mode=auto ! video/x-h264,profile=baseline ! rtspclientsink location=rtsp://mediamtx.jwillikers.io:8554/detectionator protocols=tcp
Please refer to the project’s Code of Conduct.