Skip to main content

Media sources

Manage one-based source slots that publish assigned media over RTSP or HTTP MJPEG. A normal workflow is list videos โ†’ assign a slot โ†’ start it โ†’ inspect state โ†’ stop it before changing or deleting media.

๐Ÿ“„๏ธRegister one source slot for a browser webcam

Marks one one-based source slot as a browser-published webcam and returns the WHIP URL the browser posts its WebRTC offer to. Unlike `/api/mediasrc/assign`, Insight does not start a publisher itself: the browser publishes the camera over WHIP to an internal ingest path, MediaMTX normalizes it to baseline H.264 with regular keyframes and republishes it on the `urls.rtsp` path (the same shape a file source produces, so detection apps and hardware decoders can consume it directly), and `/api/mediasrc/start` only confirms that the stream arrived. Any file assignment on the slot is cleared, and a playing file source is stopped first. The returned `urls.whip` host and port already account for SDK port remapping, so use it exactly as returned.