Skip to content

Media

The Media page manages real-time video and audio streams on the MAGK platform. Media streams use RTSP and RTMP protocols via the integrated MediaMTX media server, enabling live video feeds from cameras, drones, and other sources to be viewed directly within the platform.

Media Overview

MAGK integrates with MediaMTX to provide a lightweight, protocol-agnostic media streaming server. Streams published to MediaMTX are discoverable from the Media page and can be embedded in the tactical map or viewed standalone.

graph LR
    A[Camera / Drone] -->|RTSP or RTMP| B[MediaMTX]
    B -->|HLS / WebRTC| C[Browser Viewer]
    B -->|RTSP| D[VLC / Other Clients]

Stream List

The stream list displays all active and configured media streams.

Column Description
Name Stream display name
Path MediaMTX stream path (e.g., /live/drone1)
Protocol Source protocol — RTSP, RTMP, or HLS
Status Active (receiving data), Idle, or Error
Viewers Number of current viewers
Source Source device or URL description

Adding a Stream

Click Add Stream to register a new media stream.

Form Fields

Field Type Required Description
Name Text Yes Display name for the stream
Path Text Yes MediaMTX path (e.g., live/drone1) — must be unique
Source URL Text No Pull-mode source URL if MediaMTX should pull from an external RTSP/RTMP source
Description Text No Optional description of the stream source
Event Select No Associate the stream with a specific event

Push vs. Pull Mode

Mode Description
Push A device publishes directly to MediaMTX at rtsp://<server>:8554/<path> or rtmp://<server>:1935/<path>. Leave Source URL blank.
Pull MediaMTX pulls from an external source URL. Enter the full RTSP or RTMP URL in the Source URL field.

Viewing Streams

Click a stream entry to open the stream viewer. The viewer supports:

  • HLS playback — Browser-native video playback with adaptive bitrate
  • WebRTC playback — Low-latency playback where supported
  • Full-screen mode — Expand the viewer to fill the browser window
  • Snapshot — Capture a still frame from the live stream

Embedding on the Tactical Map

Streams can be linked to map markers for in-context viewing:

  1. Open the stream detail view
  2. Click Link to Map
  3. Place or select a marker on the tactical map
  4. The marker displays a video icon — clicking it opens the stream viewer overlay

Stream Configuration

Edit a stream's settings from the stream detail view.

Setting Description
Recording Enable server-side recording of the stream to disk
Authentication Require credentials to publish or view the stream
Max Viewers Limit the number of concurrent viewers
Timeout Idle timeout before MediaMTX closes the stream path

MediaMTX Configuration

MediaMTX connection settings are configured in the platform Settings page under the Media Streaming section. Key environment variables:

Variable Description
MTX_PROTOCOLS Enabled protocols (e.g., tcp, udp)
MEDIAMTX_RTSP_PORT RTSP listen port (default: 8554)
MEDIAMTX_RTMP_PORT RTMP listen port (default: 1935)

See the Configuration Reference for the full list of media streaming variables.