Skip to main content

RTSP Streaming

Two skills let the agent feed the model a looping local video file over RTSP — useful for demos or testing without a live camera, per the upstream RTSP streaming guide.

1. Set Up the RTSP Infrastructure

Set up RTSP streaming

This invokes the rtsp-streaming-setup skill.

Prerequisites

SSH access to the instance, the WebUI already running (it exposes POST /api/rtsp/start, used by this skill to point the model at the stream), and ~100MB+ free disk for the MediaMTX binary. RTSP traffic stays on 127.0.0.1 (the WebUI consumes the stream from the same box that publishes it), so no security group changes are needed.

It installs ffmpeg and MediaMTX, starts MediaMTX, loops a video into it at a stable rtsp://127.0.0.1:8554/live URL, and points the WebUI at that stream via its /api/rtsp/start API. Like the rest of this repo's services it runs as a plain background process, not a systemd unit, so it needs to be relaunched manually after a reboot.

2. Upload a Different Video

At any time, switch the feed to a different local video file:

Upload <local video path> as the new RTSP video

This invokes the rtsp-video-upload skill.

Prerequisites

rtsp-streaming-setup must already be applied (MediaMTX listening on 127.0.0.1:8554), SSH/SCP access, a local video file path, and enough free disk on the instance for the upload.

It scps the file to the instance, restarts the ffmpeg loop on the new video (targeting a specific PID, not a broad process kill), and re-triggers /api/rtsp/start so the WebUI picks up the change — no need to touch the RTSP URL itself, since the stream path stays the same across video swaps.