Reeve Docs

Docs / Sidecars

Media plane

An optional shared media server (MediaMTX) that every camera publishes into and every viewer reads from, so a browser needs one reachable port instead of a route to each camera's workload. It is off by default in both the chart (cameras.mediaPlane.enabled) and Compose (the media-plane profile). Only a plugin that declares a pullable origin for a camera is routed through it, and an installation that never enables it is unaffected by everything below.

Deploying it

On Kubernetes the chart writes the backend's settings from the Services it renders, so enabling the component is the whole switch. On Compose it is two switches that must agree: the profile deploys the server and Cameras__MediaPlane__Enabled tells the backend to use it. The flag without the profile leaves cameras negotiating against a server that is not running; the profile without the flag runs a server nothing registers a path in. Compose also needs CAMERAS_MEDIA_PLANE_PASSWORD set to the value in deploy/secrets/cameras-media-plane-password; see Secrets.

It buys one exposed port for every camera and every viewer. Media multiplexes onto a single port carrying UDP and TCP under the same number (TCP is the last rung for a network that blocks UDP; ICE picks it on its own). The number published outside must equal the number the server listens on: a rewritten port answers the signalling normally, announces candidates and then carries nothing, with no error on either side. The chart renders one number into both the Service and the server's listeners, and Compose publishes the fixed port 8189; a router that maps it to another port outside is the case nothing here can catch.

The deployment rules, each enforced by a render-time guard on Kubernetes:

  • One replica. Sessions live in the server's memory: a second instance would hold half the cameras, and a viewer reaching the wrong one sees nothing. Scaling it is not a capacity lever.

  • A configuration change is a restart. The configuration is mounted as a single file the kubelet never refreshes, every WebRTC setting is read at start, and a reload would replace the running configuration and drop every path the backend registered. The chart rolls the pod when the configuration changes, which ends every live session. Adding and removing camera paths, which the backend does per viewer, costs nothing.

  • The control API and the signalling API are backend-only. Both sit on a ClusterIP Service no ingress reaches, both are behind an account whose password only the backend has, and the chart's network policy names the backend's pods as the only source for either port. The password is required at render time, because a ClusterIP is reachable from every pod in the namespace, the workloads Reeve orchestrates included. A firewall inside the cluster still has to name these ports.

  • The credential has a character set. MediaMTX accepts only letters, digits and ! $ ( ) * + . ; < = > [ ] ^ _ - { } @ # & in the account name and the password, checks them when it loads its configuration, and exits on anything else. Its error message names the wrong set (it lists a comma it rejects), and the space, the quote and the backslash fail earlier, at parsing. A backslash that forms a valid JSON escape decodes to a different password, so the plane starts, the backend is refused every time, and nothing says why. openssl rand -base64 32 yields a slash about half the time; generate with openssl rand -base64 32 | tr '+/' '-_'. The chart refuses an inline credential that would fail; one handed over through existingSecret is the case no render-time guard can see.

  • An announced host is an address or a name, never a URL and never host:port. MediaMTX drops a form it cannot parse with only its own log to say so, and the sessions that needed it park in checking. cameras.mediaPlane.lanHost is the address a viewer on the local network dials, normally the LoadBalancer's; cameras.mediaPlane.publicHost is the name from outside, worth setting only once the media port is forwarded. Both are announced when both are set, and the viewer picks the one it can reach. Both empty with no STUN server is a working server nobody can connect to: the plane announces only its own interfaces' addresses, inside Kubernetes the pod's, and every negotiation ends on the browser's ICE deadline. STUN gives viewers outside the home an address but none to the local network, so lanHost stays in every setup.

  • The viewer's address survives only with cameras.mediaPlane.externalTrafficPolicy: Local. Left empty, the cluster's default (Cluster) applies: any node may receive the media and forwards it with its own address as the source, which works everywhere. Local makes a node without the plane drop the traffic, so it is safe only where the load balancer sends it to the plane's node alone:

    • cloud load balancers, MetalLB (layer 2 and BGP) and Cilium's L2 announcements from 1.20.2 pick the node by where the plane runs;
    • kube-vip does so only with per-service election (svc_election); without it the address sits on its leader;
    • Cilium's L2 announcements before 1.20.2 and ServiceLB in k3s publish nodes regardless of where the plane runs; a viewer that reaches another node gets no media, or arrives without the address Local keeps, so leave the field empty there;
    • serviceType: NodePort works only for viewers that dial the plane's node.

    The chart refuses the field on any other serviceType, and any value but Cluster or Local.

Changing the announced address ends every session on the server. A cold on-demand path answers a viewer in about 2.5 s or is refused at the read timeout. cameras.mediaPlane.trackGatherTimeout (default 20 s) is the publisher's first-frame budget; MediaMTX's own 2 s does not suit a camera that must allocate an encoder first.

The fMP4 rung (the go2rtc remux) runs as a container in the plane's own pod and reads the plane over loopback RTSP. It serves progressive fMP4 and a JPEG still, the transports a camera that publishes only into the plane otherwise lacks and the ones the mobile app uses. A camera already sending H.264 is repackaged; only a stream the viewer cannot decode is re-encoded, by the backend. Hardware encoding and its device access are in Helm chart values. The settings the backend reads are in Backend settings, and how the media path works is in the media plane reference.

Viewers outside the home

Three setups are supported. An installation that configures none of them serves viewers on the local network only.

Setup What you configure What it costs Viewers outside the home
Public port publicHost, the router's forward of the media port, a DNS record naming the home An inbound port and a record carrying the home's address Connect through the forward
STUN stunUrls for the plane and viewerStunUrls for the browser; no publicHost, no forward Nothing inbound Connect where both networks allow hole punching; the rest get fMP4
Both The public port plus the plane's stunUrls; viewerStunUrls stays unset (see the source-NAT note below) Both costs Connect through the forward

With STUN, a viewer whose network cannot be punched through, or that blocks outbound UDP, falls back to fMP4. A camera with no fMP4 rung, such as a Matter camera on an installation without the remux, then shows its snapshot or "unavailable". Where such cameras matter to viewers outside the home, keep the public port, alone or beside STUN.

On Kubernetes:

cameras:
  mediaPlane:
    stunUrls:
      - stun:stun.cloudflare.com:3478
      - stun:stun.l.google.com:19302
    viewerStunUrls:
      - stun:stun.cloudflare.com:3478
      - stun:stun.l.google.com:19302

stunUrls becomes the plane's webrtcICEServers2, with webrtcSTUNGatherTimeout from stunGatherTimeout (2s, at most 6s), and touches nothing else. viewerStunUrls alone fills the browser's list (Cameras__MediaPlane__ViewerStunUrls); it never inherits stunUrls, so a plane-only list leaves viewers with no ICE servers and no candidate trickle. The STUN setup needs both lists: without viewerStunUrls and no forward, every viewer outside the home falls back to fMP4. Both lists take stun:<host or IP>[:<port>] with a port from 1 to 65535, and the render refuses anything else, including stuns:, turn:, userinfo, a path and a query, so no credential reaches MediaMTX or a browser. On Compose, uncomment the two STUN keys in deploy/mediamtx/mediamtx.yml and set CAMERAS_MEDIA_PLANE_VIEWER_STUN_URL_0 and _1 in .env. Changing the list restarts the plane once and ends live sessions.

  • Use two servers from different providers. The plane's answer waits for all of them, up to the gather timeout, so one dead server costs the timeout and not the address. That wait also reaches viewers on the local network.
  • A default-deny network policy needs two rules for the plane. The chart's policy for the plane restricts ingress only, so it blocks nothing here. A cluster-wide default-deny policy does: let the plane's pod send UDP to the internet and receive on its media port.
  • Behind a node's source NAT, STUN can fail for some viewers. When the node maps the pod's traffic differently per destination, the port STUN learned for the plane is not the port its packets to the viewer use, and a viewer behind a port-restricted NAT falls back to fMP4. Where the public port is forwarded through a node's source NAT (DSR), viewerStunUrls beside publicHost makes the plane check viewers from the node's address rather than the forwarded one and remote viewers fall back to fMP4, so keep viewerStunUrls unset while publicHost is announced.

Moving from the public port to STUN. Stopping after step 1 leaves the "both" setup.

  1. Add the plane's STUN. Set stunUrls to two servers and deploy. The plane restarts once and the public port keeps working.
  2. Stop announcing the public name and turn on viewer STUN, in one deploy. Clear publicHost and set viewerStunUrls (on Compose, CAMERAS_MEDIA_PLANE_VIEWER_STUN_URL_0 and _1). On Compose, also replace the public name in webrtcAdditionalHosts with the host's LAN address, or viewers on the LAN lose their host pair. Deploy, then confirm from an outside network that live view plays over WebRTC. To roll back, set publicHost again and clear viewerStunUrls.
  3. Remove the router's forward of the media port. To roll back, forward it again and set publicHost.
  4. Delete the DNS record, last.

lanHost, and a LoadBalancer Service on a LAN address, stay in the STUN setup: they give LAN viewers a host pair.

Cameras on their own segment

The plane dials every camera it can reach itself, by default from the cluster network, so each pull crosses whatever routes and filters sit between the nodes and the cameras. When the cameras live on a segment of their own, cameras.mediaPlane.networkAttachment gives the plane a second interface there (with Multus, a NetworkAttachmentDefinition in the release's namespace, typically macvlan on the nodes' camera VLAN), and the pulls go out of it directly:

cameras:
  mediaPlane:
    networkAttachment: cameras-lan

The attachment is requested on the plane's pod alone. Viewers and the backend stay on the cluster network, and the Service and lanHost do not change. The server announces the addresses of all its interfaces, so a viewer on that segment is also offered the attachment's address.

Cameras the plane cannot dial

A Matter camera has no address anything can pull; it negotiates. cameras.mediaPlane.ingest.enabled turns on the route the plane pulls those cameras from, on the backend itself. It is a second switch with its own secret (openssl rand -base64 32), because that route negotiates with a camera on behalf of whoever presents the credential, and enabling it without a secret is refused at render.

It opens one more path through the cluster: a NetworkPolicy rule letting the plane's pod reach the backend's port, in the direction the other rule does not cover. A denied hop is not an error anywhere (the registration succeeds, the pull never connects, the tile stays dark), so a policy of your own must name it too. The address the plane is given is the pod's own IP, not the Service's, because a negotiation lives on the replica that answered and the teardown has to find it there.

cameras.mediaPlane.readTimeout is the deadline that route works against, and the only number in the plane's ladder an operator sets. The chart renders it into the server three times (read timeout, WebRTC handshake timeout, on-demand source start timeout), which together cut an unanswered pull at exactly this value. The backend derives both of its own deadlines from it: its wait for the plane's verdict is this plus two seconds, its ingest negotiation budget this less two, so the three cannot be raised apart. It defaults to 14 s (ingest budget 12 s, wait 16 s), so a camera with no route to the internet that waits about ten seconds for its own STUN lookup before it answers is still served. It is global, so it lengthens every other read the server does. On Compose, set CAMERAS_MEDIA_PLANE_READ_TIMEOUT_SECONDS.

The chart accepts 10 to 16 s, and the upper bound is the browser's. Every step is nested inside one viewer's click, which the frontend gives twenty seconds; above sixteen the backend is still waiting for the plane after the viewer has given up. A failed attempt does not warm the path for the next click: an on-demand path is dialled exactly once per reader arrival and cut at readTimeout. A camera that cannot answer inside this window cannot be served by an on-demand path, and raising the setting does not change that.

Backend settings

Off unless deployed. Cameras:MediaPlane tells the backend where a media server is; the server itself is deployed by the chart or the Compose profile, not by this section. Both addresses must be set or the plane counts as absent, and every camera keeps the transport it already had. A half-configured plane is treated as off, not as an error.

Setting Default Effect
Enabled false Whether the backend may use a media plane at all. Off, and nothing below is read
ControlAddress none The plane's control API, which registers camera paths. Backend-only: whoever can write a path can point a camera at an address of their choosing, and whoever can read one back gets that camera's password
SignallingAddress none Where WHIP and WHEP are served. Also backend-only: a viewer never learns it, because the host relays the negotiation and hands out its own routes
Username none The account the plane knows the backend by. Without it the plane counts as unconfigured, and every camera keeps the transport it had
Password none Its password. The chart writes both from the Secret it also gives the plane. MediaMTX accepts only letters, digits and ! $ ( ) * + . ; < = > [ ] ^ _ - { } @ # & in a credential and exits at start-up on anything else, so a password it will not take is a crash-looping plane rather than a rejected login. A backslash that forms a JSON escape decodes to another password, and every request is then refused. Generate it with openssl rand -base64 32 | tr '+/' '-_'
IngestAddress none Where the plane reaches this replica to pull a camera it cannot dial. The pod's own address, not the Service's: the negotiation lives on the replica that answered and is ended there
IngestSecret none What every camera's ingest credential is derived from. Without it the backend serves no ingest, and a camera with no address of its own keeps the transport it had
PlaneReadTimeout 00:00:14 What the plane gives an endpoint it pulls from, mirrored from the server's own readTimeout. The one number the two budgets below are derived from. Fourteen, so a camera that has no route to the internet, and waits about ten seconds for its own STUN lookup before it answers, is still served
IngestBudget derived (12 s) How long one negotiation may take: PlaneReadTimeout less one ladder step (2 s), so a slow camera is refused here, where the reason is visible, rather than cut by the plane. Set it outright only in a test
WhepWait derived (16 s) How long to wait for the plane to answer a viewer: PlaneReadTimeout plus one step, so the plane's verdict arrives rather than being cut off, and still inside the viewer's window
IngestCandidateGrace 00:00:00.750 How long to keep collecting candidates after the answer, for a camera that never says it has sent its last; the plane takes none later
PathReadyWait 00:00:04 How long a viewer waits for a held-open camera path to start carrying its camera before the URL is handed out. Zero turns the wait off. A value the viewer's window cannot afford is refused at start-up
IngestCapacity 32 How many cameras one replica holds negotiations for at once. Each is an encoder on a device, so a plane that stops tearing them down costs one camera rather than every camera; a camera already held may always renegotiate, which replaces its session rather than adding one
ViewerStunUrls__<n> none The STUN servers a viewer's browser is given, so a viewer outside the home can learn its own public address. Each entry must be exactly stun:host or stun:host:port: an entry that is not is dropped with a warning at start-up naming its index and never its value, and the valid ones stay. An empty entry is skipped without a warning, so an unset Compose variable logs nothing. The list has no effect unless the plane is configured; with no valid entry no servers are sent, viewer candidates are not forwarded and nothing is recorded
RemuxAddress none The remux's API, which turns a plane path into progressive fMP4 and a JPEG still. Reeve sends it no credential: go2rtc 1.9.15 does enforce api.username and api.password on callers outside loopback, but the chart and Compose configure none and the backend has no setting for one. Any pod that reaches the plane's ClusterIP (any container on the Compose network) can call it unless the chart's NetworkPolicy is on (see known limitations). A relative address is treated as off
RtspAddress none Where the remux is told to read a path from, resolved in the remux's network namespace, not the backend's: it shares the plane's, so this is a loopback address with no credential, read through the plane's anonymous reader that only 127.0.0.1 may use, handed to the remux and never to a viewer. A relative address, or one carrying a credential (go2rtc reads its source table back to any caller), leaves the remux off
EncoderHardware unset The hardware encoder family the chart rendered for the remux, mirrored here, because go2rtc refuses a source naming a device its configuration has no entry for

What the viewer learns on this rung. A camera the plane carries is answered by the plane, which announces its own addresses: the pod's, plus the host the chart is given in cameras.mediaPlane.publicHost. The camera behind the plane is never a peer, so its address is never disclosed; what the viewer learns instead belongs to a server the operator deployed and published for it to reach.

The fMP4 rung. A camera that publishes only into the plane (every Matter camera is that class) reaches a viewer over WebRTC and over nothing else. RemuxAddress and RtspAddress together give it a second rung: the backend registers its plane path on the remux, and the remux answers with progressive fMP4 and a JPEG still. Those are the transports the mobile app has, whose picture is a WebView on the same preview the browser uses, and they are what a dashboard thumbnail is polled from. Set neither and nothing changes; set one and the rung stays off, because a remux with nothing to read serves a URL that answers no picture. A plugin that publishes its own media is never routed this way: its own workload is closer to the camera than the plane is.

As environment variables these are Cameras__MediaPlane__<Setting>. The chart writes Enabled, the two addresses, the credential and PlaneReadTimeout when the plane is enabled: the addresses from the Services it renders, the credential from the Secret the plane itself reads, and the timeout from cameras.mediaPlane.readTimeout, the same value the server's own configuration carries. With cameras.mediaPlane.ingest.enabled it writes IngestAddress from the pod's own IP and IngestSecret from a second key in the same Secret, and opens the one NetworkPolicy rule that lets the plane back in to that port. Neither budget is written: the backend derives both from PlaneReadTimeout.

Setting the plane's read timeout. One value moves the plane and the backend together; there is no second knob. In the chart it is cameras.mediaPlane.readTimeout, whole seconds from 10s to 16s, default 14s; the chart renders it into the server's readTimeout, webrtcHandshakeTimeout and pathDefaults.sourceOnDemandStartTimeout and into Cameras__MediaPlane__PlaneReadTimeout. In Compose it is CAMERAS_MEDIA_PLANE_READ_TIMEOUT_SECONDS in .env (whole seconds, default 14), which feeds MTX_READTIMEOUT, MTX_WEBRTCHANDSHAKETIMEOUT, MTX_PATHDEFAULTS_SOURCEONDEMANDSTARTTIMEOUT and the backend's PlaneReadTimeout. Changing it restarts the plane, and the new timers apply to every path it holds. If you run the plane with a mediamtx.yml of your own, mirror the value into those three server keys yourself. A camera that answers later than IngestBudget after the offer is refused with camera did not answer: Timeout and the plane has no source for it; raise the value by the camera's delay plus a few seconds. Only the chart checks the range; the ladder has room for about 16 s because the browser gives a click 20 s, and above that the backend is still waiting after the browser has given up.

With cameras.mediaPlane.remux.enabled (on by default when the plane is) the chart writes RemuxAddress and RtspAddress, adds go2rtc as a second container in the plane's own pod, and turns RTSP on in the plane's configuration bound to 127.0.0.1. RTSP therefore reaches no Service: its only reader shares the network namespace, which matters because it authenticates as the plane's own account and that account can read every camera the plane holds. Only the remux's API is served, on the existing -media-plane-control Service. Compose does the same with network_mode: "service:media-plane". Turning it off leaves the plane with WebRTC only.

The three rung switches are not configuration. WebRTC, fMP4 and transcoding can each be switched off for the whole household at Integrations → Media Plane: all three on Overview, and transcoding again on the Transcoding tab beside the probe it governs. They are a household setting stored by Reeve, they need no restart, and they can only narrow the deployment: each rung serves on the deployment AND the switch, so a switch stored on for a part this installation never rendered stays inert until that part is deployed. A rung the deployment silenced reads as switched on and disabled, with the reason beside it. Changing them takes cameras.media.manage; reading the page takes cameras.media.view. Each change is audited with all three booleans.

Each replica reads them from its applied media_plane generation, so a change is in force on every serving replica once the save is acknowledged. Nothing is unregistered by a switch: the plane paths and remux streams already registered are left in place. What a switch does release is the cameras: with both live rungs off, nothing reads a plane path, and the sweep below patches each held-open path back to on demand, which drops the plane's pull. That happens per path and only once nothing is reading it, so a viewer already watching keeps their stream to its end, and the camera behind them is released about a minute after they stop.

Every setting in Cameras:MediaPlane is start-time: it is bound once, so changing one is a backend restart. That costs the sessions in flight and nothing else: a viewer reconnects and the camera's path is registered again on its next negotiation.

The path sweep. A path is registered when a viewer first opens that camera, and nothing in deleting a camera, removing a plugin instance or re-keying a device source reaches the plane. An hourly sweep closes that: it reads every path the plane holds, works out which ones this backend would register for the device sources that still exist, and deletes the rest. Only paths named reeve-… are considered, so the plane's own all_others and anything an operator wrote by hand are left alone. It runs on the one replica that owns the media-plane-path-sweep kind, and a plane that is not configured is never asked anything. A stale path registered for a camera the plane dials itself was registered held open (sourceOnDemand: false), and it keeps pulling that camera until the sweep reclaims it; only a host-negotiated camera's path is on demand and holds nothing.

The same pass owns the hold on the paths it keeps. A path the plane dials is held open when either live rung is on and released to its camera when both are off. The sweep runs as soon as the owning replica applies a switch change, hourly when it has nothing outstanding, and once a minute while it has: a path it had to skip or a plane that did not answer counts as outstanding. Nothing observes a viewer closing a tab, so the sweep comes back for the camera instead. On the pinned MediaMTX image a sourceOnDemand patch reloads the server's configuration and closes the path in both directions, so a path is only ever patched while it reports no reader, and that count is read again per path immediately before its own patch. A path someone is reading keeps its hold until they leave, and a plane that does not answer is read as "unknown", never as "idle".

The plane's own configuration is a different matter, and one knob there is expensive: changing an announced address terminates every session on the server, not just the one being changed. Adding a camera path is free, which is what the backend does on a camera's first viewer; a path is left in place afterwards, and rewritten only when the camera's address has changed. The deployment side and the port a firewall must name are in Viewers outside the home.

Configuration files

mediamtx/mediamtx.yml

The media plane's configuration for Compose; the chart renders its own from the same rules.

Key Value Why
api, apiAddress on, :9997 The control API the backend registers paths through
rtsp, rtspAddress, rtspTransports on, 127.0.0.1:8554, tcp Read only by the remux in the same network namespace
rtmp, hls, srt, moq, playback, metrics off Not used
webrtc, webrtcAddress on, :8889 WHIP and WHEP, reached by the backend only
webrtcLocalUDPAddress, webrtcLocalTCPAddress :8189 One multiplexed media port over UDP and TCP, the only port a firewall must name
webrtcIPsFromInterfaces yes Announce the container's own addresses
webrtcAdditionalHosts [] Extra announced hosts: a bare name or address, no scheme or port, resolved per session, so a dynamic DNS name follows the address
webrtcTrackGatherTimeout 20s MediaMTX's 2 s default is too short for camera encoders
webrtcICEServers2, webrtcSTUNGatherTimeout commented out Uncomment with a STUN server (and 2s) for viewers outside the LAN, together with the viewer STUN variables
authInternalUsers reeve with publish, read and API; any from 127.0.0.1 read-only The backend's account, and the remux's read access (go2rtc echoes source URLs to its callers, so it gets no credential)
paths {} The backend registers paths at runtime

Every WebRTC setting is read at start: a change restarts the plane and ends live sessions.

mediamtx/go2rtc.yaml

The remux's seed file. It serves only the API on :1984 and turns every other server off. It has no streams key: an empty mapping there breaks go2rtc's own writer with "did not find expected key". The backend registers streams at runtime.

Helm chart values (cameras.mediaPlane)

Key Default Effect
cameras.mediaPlane.enabled false One MediaMTX every camera publishes into and every viewer reads from, so a browser needs one reachable port instead of a route to each camera workload. Enabling it changes nothing until a camera plugin declares an ingest for it.
cameras.mediaPlane.secretInitImage busybox:1.38.0 Init container that reads the plane password from its mounted file and writes the runtime config into an emptyDir; the password never appears in MediaMTX's environment or ConfigMap.
cameras.mediaPlane.{extraVolumes,extraVolumeMounts} [], [] Extra mounts for the plane pod (a file password source must be mounted here and into the backend).
cameras.mediaPlane.image.repository bluenviron/mediamtx Plane image.
cameras.mediaPlane.image.tag "1.21.4" Pinned. Behaviour the plane relies on differs between MediaMTX minor versions; re-verify the plane before changing it.
cameras.mediaPlane.image.pullPolicy IfNotPresent Plane image pull policy.
cameras.mediaPlane.publicHost "" The name a viewer outside the LAN reaches the media port on (a DDNS name is resolved per session, so a changing public address needs no restart). A bare host only: a scheme, port or path fails the render. Empty announces the pod's own addresses only; with no stunUrls either, the installation is LAN-only.
cameras.mediaPlane.lanHost "" The address a viewer on the LAN dials, announced even while no port is forwarded. Both hosts are announced when both are set, and a viewer picks the one it can reach.
cameras.mediaPlane.stunUrls [] stun:<host or IP>[:<port>] servers the plane learns its public address from, so outside viewers need no forward or publicHost. Use two from different providers. Changing it restarts the plane.
cameras.mediaPlane.viewerStunUrls [] Cameras__MediaPlane__ViewerStunUrls__<i>: the browser's STUN list. Empty turns viewer STUN and candidate trickle off, whatever stunUrls says.
cameras.mediaPlane.stunGatherTimeout "2s" How long the plane's answer waits for STUN, whole seconds from 1s to 6s; rendered only with stunUrls.
cameras.mediaPlane.mediaPort 8189 The one port every session muxes onto, UDP and TCP on the same number. Whatever forwards it must not rewrite it: a rewritten port answers and then carries nothing. Must differ from the signalling and control ports.
cameras.mediaPlane.serviceType LoadBalancer How the media port is published. A provider that refuses mixed protocols gives UDP only, which is the path that matters.
cameras.mediaPlane.loadBalancerIP "" Fixed load-balancer address.
cameras.mediaPlane.externalTrafficPolicy "" Empty keeps the cluster default (Cluster: every node forwards, with its own address as the viewer's). Local keeps the viewer's address and is safe only where the load balancer sends traffic to the plane's node alone. Only Cluster or Local, and only on LoadBalancer or NodePort.
cameras.mediaPlane.serviceAnnotations {} Annotations on the media Service.
cameras.mediaPlane.networkAttachment "" A Multus NetworkAttachmentDefinition giving the plane a second NIC on the cameras' own segment, so it dials them there. Viewers still use the Service.
cameras.mediaPlane.signallingPort 8889 WHIP/WHEP signalling, on a ClusterIP -control Service only the backend calls (Cameras__MediaPlane__SignallingAddress).
cameras.mediaPlane.controlPort 9997 MediaMTX control API on the same Service (Cameras__MediaPlane__ControlAddress). Must differ from signallingPort.
cameras.mediaPlane.rtspPort 8554 RTSP listener on loopback, read by the remux in the same pod; published by no Service, because RTSP authenticates the plane's one account, which can read every camera.
cameras.mediaPlane.controlAllowedCidrs [] Source CIDRs allowed to reach the control API and WHIP/WHEP. Empty accepts any source that can reach the ClusterIP; narrowing it to the backend's pod CIDR is safe for the remux, which reads over loopback.
cameras.mediaPlane.auth.username reeve Account the backend authenticates to the plane with (Cameras__MediaPlane__Username).
cameras.mediaPlane.auth.passwordSource null Required when the plane is on (value, existingSecret, externalSecret or file; ref refused). Both plane APIs are reachable from every pod in the namespace, the control API writes where a camera is pulled from, and reading a path back returns that camera's password. MediaMTX accepts only letters, digits and ! $ ( ) * + . ; < = > [ ] ^ _ - { } @ # & and exits at start on anything else; plain base64 yields a / about half the time, and a backslash can decode to a different password. Generate with openssl rand -base64 32 | tr '+/' '-_', and quote a value YAML would read as a number.
cameras.mediaPlane.auth.{password,existingSecret} "", "" Aliases of passwordSource. An existingSecret is preferred over an inline password and required under Argo CD; the character set applies to it too, and no render-time check can see it.
cameras.mediaPlane.auth.existingSecretKey password Key in that Secret.
cameras.mediaPlane.trackGatherTimeout "20s" How long a publisher has to produce its first frame (whole seconds, at least 10s). MediaMTX's 2 s default is too short for a camera that must allocate an encoder first. Global: changing it restarts the WebRTC server and ends every live session. It is the publisher's budget, not a viewer's.
cameras.mediaPlane.ingest.enabled false For a camera the plane cannot dial (every Matter camera): the plane pulls from the backend, which negotiates with the device (Cameras__MediaPlane__IngestAddress, this replica's pod address).
cameras.mediaPlane.ingest.secretSource null Required with ingest on (ref refused). Only the backend reads it (Cameras__MediaPlane__IngestSecret_FILE); the plane gets a per-camera credential derived from it. Generate with openssl rand -base64 32.
cameras.mediaPlane.ingest.{secret,existingSecret} "", "" Aliases of secretSource.
cameras.mediaPlane.ingest.existingSecretKey ingest-secret Key in that Secret.
cameras.mediaPlane.readTimeout "14s" The number the whole plane ladder is set from: rendered as MediaMTX's readTimeout, webrtcHandshakeTimeout and sourceOnDemandStartTimeout, and the backend derives its wait for the plane's verdict (this plus 2 s) and its ingest budget (this less 2 s) from it (Cameras__MediaPlane__PlaneReadTimeout). Whole seconds from 10s to 16s, no leading zero. The ceiling comes from the browser, which gives one click's negotiation 20 s; 14 s still serves a camera with no internet route that waits 10 s for its own STUN lookup. Global: it lengthens every protocol's read.
cameras.mediaPlane.logLevel info MediaMTX log level.
cameras.mediaPlane.runAsUser 1000 Non-root UID of the plane (the image runs as root by default).
cameras.mediaPlane.nodeSelector {} Node selector for the plane pod.
cameras.mediaPlane.resources.limits.{cpu,memory} 1000m, 512Mi Sized for relaying, not encoding: cost scales with concurrent sessions, not resolution.
cameras.mediaPlane.resources.requests.{cpu,memory} 100m, 128Mi Plane requests.
cameras.mediaPlane.remux.enabled true The fMP4 path: go2rtc, in the plane's own pod, reads a plane path over loopback RTSP and gives a camera that publishes only into the plane a progressive fMP4 stream and a JPEG still (Cameras__MediaPlane__RemuxAddress, Cameras__MediaPlane__RtspAddress). Without it such a camera is WebRTC-only, and a browser or the mobile app that cannot use WebRTC shows a dark tile. Off also removes RTSP from the plane.
cameras.mediaPlane.remux.image.repository alexxit/go2rtc Remux image.
cameras.mediaPlane.remux.image.tag "1.9.15" Pinned: go2rtc persists every registered stream into its own config file (so the file is copied from a seed into a writable volume) and a flow-style streams: {} breaks its writer. Its api.username/api.password are enforced for callers outside loopback, but Reeve configures none.
cameras.mediaPlane.remux.image.pullPolicy IfNotPresent Remux image pull policy.
cameras.mediaPlane.remux.rtspPort 8654 go2rtc's own RTSP listener on loopback; a transcoding source publishes back through it, and with none every such source fails with exec: rtsp module disabled. Must differ from the plane's rtspPort (both share one network namespace).
cameras.mediaPlane.remux.apiPort 1984 API the backend registers streams on, on the plane's ClusterIP -control Service. Reeve gives it no credential, so any pod that reaches the Service can register and read streams; networkPolicy.enabled (operator hardening, off by default) limits it to the backend. The remux reads the plane anonymously and read-only from loopback, because go2rtc returns each source URL verbatim from GET /api/streams.
cameras.mediaPlane.remux.gpu.enabled false Hardware encoding (Cameras__MediaPlane__EncoderHardware, and a seeded go2rtc ffmpeg entry). Off, a camera the viewers cannot decode is re-encoded in software on the remux's CPU budget. Needs a way in for the device: gpu.hostPath.enabled, or a device-plugin resource in remux.resources.limits.
cameras.mediaPlane.remux.gpu.encoder vaapi Asked of go2rtc as #hardware=<encoder>. vaapi (Intel and AMD) is the only one the chart seeds an entry for.
cameras.mediaPlane.remux.gpu.ffmpeg {} Replaces the seeded go2rtc ffmpeg: map; required for any encoder but vaapi, for example h264/cuda: "-hwaccel cuda -hwaccel_output_format cuda -c:v h264_nvenc -g 50 -bf 0".
cameras.mediaPlane.remux.gpu.devicePath /dev/dri/renderD128 Device path inside the container, used by the mount and the seeded vaapi entry.
cameras.mediaPlane.remux.gpu.hostPath.enabled false Bind-mounts the device from the node. A cluster whose device plugin passes cards leaves this off and requests the resource (for example gpu.intel.com/i915: 1) under remux.resources.limits, which costs no privilege.
cameras.mediaPlane.remux.gpu.hostPath.privileged false Must be true with hostPath: the runtime's device cgroup denies a bind-mounted character device, so an unprivileged pod sees the node and cannot open it (No VA display found). Privilege grants the whole host /dev and every capability.
cameras.mediaPlane.remux.gpu.hostPath.renderGroupId 0 Required with hostPath: the render node's group, read on the node with stat -c %g /dev/dri/renderD128.
cameras.mediaPlane.remux.resources.limits.{cpu,memory} 1000m, 512Mi Sizes how many cameras can be re-encoded at once, not how many are served: one software 1080p20 encode is about one core; an H.264 camera is only repackaged. Also where a device plugin's card is requested.
cameras.mediaPlane.remux.resources.requests.{cpu,memory} 50m, 64Mi Remux requests.

Measured on the chart's own pod shape with the pinned image: an extended resource requested without a mount opens the device and encodes; a hostPath mount with the right render group but unprivileged fails with No VA display found; the same mount privileged encodes.

Troubleshooting

Symptom Cause What to do
A camera says its transports were switched off Someone turned the plane's WebRTC or fMP4 rung off for the whole household, or the deployment never rendered the half that rung needs Integrations → Media Plane → Overview. The switch that is off is named there; a rung the deployment silenced reads as on and disabled, with the reason under it. Changing one takes cameras.media.manage
The GPU was enabled and nothing changed The remux reached no accelerator, and falls back to software without failing Integrations → Media Plane → Transcoding, and compare the configured accelerator with the probe. Every pair reading unavailable means the device was not reached: check cameras.mediaPlane.remux.gpu.devicePath and renderGroupId against the node the pod landed on (stat -c %g /dev/dri/renderD128). The probe is held rather than polled, so re-take it with Probe again after a change
The Media Plane page shows no sessions while cameras are playing The plane refused the backend's credential. Its control API answers 401, which is read as no answer at all rather than as a plane with nobody watching The Health row on Overview already says the control API is unreachable — the counters are zeros because nothing answered. Check Cameras:MediaPlane:Username and Cameras:MediaPlane:Password against the plane's own Secret
A camera keeps its old transport and the backend logs The media plane keeps refusing … not asking again for … The plane answered 400 to the registration and still does not hold the path, so it rejected the body itself. The line just before it, The media plane refused POST v3/config/paths/add/… : <reason>, carries the plane's own reason with the camera's address and password taken out Fix what the reason names. The same registration is asked again after the pause (30 s, doubling to 15 min). A 401, 404 or 5xx never pauses anything. A corrected address or credential is asked at once, and restarting the backend clears every pause
The media plane pod crash-loops and every camera keeps its old transport Its account name or password holds a character MediaMTX will not take. It checks both when it loads its configuration and exits, leaving one line in its own log — credential contains unsupported characters, or invalid character if the value was a quote or a backslash, which die in the parse before that check kubectl -n <ns> logs -l app.kubernetes.io/component=media-plane --previous. It accepts only letters, digits and ! $ ( ) * + . ; < = > [ ] ^ _ - { } @ # &; MediaMTX's own error text lists a different set. Regenerate with openssl rand -base64 32 | tr '+/' '-_', patch the Secret, then delete the plane pod and restart the backend: both read it as environment
docker compose ps shows no health state for the media plane The image is a static binary on an empty base with no shell, so a Docker healthcheck, which runs inside the container, cannot run Expected. Watch the plane from Integrations → Media Plane → Overview. Its credentials reach it only through its own environment variables (no *_FILE support), and its configuration is one read-only file: a custom mediamtx.yml must keep the three timeout settings the backend derives its deadlines from (see configuration)
The plane runs, but every backend call to it is refused A backslash in the password formed a valid JSON escape, so the plane decoded it to a different value than the backend sends. Nothing crashes and nothing logs it Regenerate without one, as above
With STUN and no public port, viewers outside the home fall back to fMP4 Their network is not one hole punching can cross (a symmetric or port-restricted NAT, or UDP blocked), a default-deny network policy stops the plane's UDP egress or its replies on the media port, or the node's source NAT maps the pod's traffic per destination Let the plane send UDP to the internet and receive on its media port. Where the cause is a NAT, keep or add the public port, which carries what STUN cannot

See also