# MediaMTX / OvenMediaEngine

Live video you host. MediaMTX is MIT; OvenMediaEngine is AGPL-3.0 — Mux without the encoding meter.

**Replaces:** Mux

**Tier:** Medium

## Problem

Mux sells encoding, live, and a playback CDN. You wanted ingest and playback on a box you run. MediaMTX is MIT (bluenviron/mediamtx). OvenMediaEngine is AGPL-3.0 (OvenMediaLabs/OvenMediaEngine) if you want sub-second WebRTC/LLHLS. This is not Mux's global CDN, every encoding preset, or a Vimeo-shaped library — that stays on /replace/vimeo. PeerTube is the federated VOD host, not a live API.

## Stack

- [MediaMTX](https://mediamtx.org) — MIT media server and proxy (WebRTC, RTSP, RTMP, HLS)
- [OvenMediaEngine](https://ovenmedia.com) — AGPL-3.0 sub-second live streaming if you want that stack

## Estimated SaaS cost saved

| You stop paying | Typical / year | Self-host instead |
|---|---:|---|
| Mux (small team) | $1,200 | MediaMTX or OvenMediaEngine |

**About $1,200 / year** on a small team, before you count lock-in.

## Deploy on Railway

Placeholder: MediaMTX (or OvenMediaEngine) with UDP/TCP as the project docs require and a volume for recordings. A single tiny Railway service may be the wrong size for live video. No one-click template in this repo yet — Start on Railway. VOD libraries stay on /stacks/peertube-video.

[Start on Railway](https://c17.io/go/railway/mediamtx-video?from=%2Fstacks%2Fmediamtx-video.md)

[PeerTube if this is a video library, not a live ingest API](https://c17.io/stacks/peertube-video)

## AGENT_PROMPT

```
Replace Mux live/ingest with MediaMTX (preferred) or OvenMediaEngine.

- Publish one RTMP or WHIP stream. Play it back. Persist recordings if you need them.
- Do not claim a global CDN or every Mux encoding ladder. Write AGENT_PROMPT.md.
- A VOD library stays on /stacks/peertube-video.
```

## FAQ

### MediaMTX or OvenMediaEngine?

MediaMTX if you want a small MIT proxy/server. OvenMediaEngine if you want sub-second live at scale. Pick one.

### Is this PeerTube or Vimeo?

No. /replace/vimeo is a library you publish. Mux is ingest, encode, and playback. This page is the live/API slice.

### Do I get Mux's CDN?

No. You get a server you run. Edge caching is a different job.

Source: https://c17.io/stacks/mediamtx-video
