mediamtx#

This container deploys a MediaMTX live media server and media proxy. This container is a thin wrapper around the official MediaMTX container and only serves to provide a consistent build and deployment environment like other mux containers. There is no functional difference between the mux mediamtx container and one built following the MediaMTX installation instructions.

More details about what MediaMTX is and how to configure and use it

Build#

make prod

The development build contains some useful debugging tools

make dev

If needed, create an image file with

make save

Configuring MediaMTX#

MediaMTX configuration is defined in a mediamtx.yml file that is mounted when the container is run. Details on how to write the config file are available here. If no config file is provided, the MediaMTX default configuration is used.

Run#

podman run -d \
  --name mediamtx \
  -v /path/to/mediamtx.yml:/app/mediamtx.yml:ro \
  mediamtx

To run the container and start MediaMTX:

podman run --rm \
  -v /path/to/mediamtx.yml:/app/mediamtx.yml:ro \
  mediamtx

To run the container in interactive mode with a terminal:

podman run -it --rm \
  -v /path/to/mediamtx.yml:/app/mediamtx.yml:ro \
  mediamtx /bin/bash

Once the container is running, MediaMTX can be started via

./mediamtx

Note

When mounting the config file, omitting the :ro suffix will make the mount read-write so that the config can be changed in-place from the host machine. MediaMTX will automatically reload the config file when it is changed.