Start one source
POST/api/mediasrc/start
Starts streaming the file assigned to one one-based source slot and persists its state as playing. The slot must exist and have a valid assignment. Repeated calls are safe for normal control flows, but callers should inspect /api/mediasrc when they need to distinguish newly started from already-running sources. Returns 409 when an external publisher holds the slot and Insight has no stream of its own on it; use /api/mediasrc/takeover first. Returns 409 while Insight pulls a network stream into the slot; use /api/mediasrc/stop first. When the slot has an fps that differs from the media's native frame rate, the matching rendition is created (synchronously, without progress output) or reused before the stream starts; use /api/mediasrc/prepare first to observe progress. Because that preparation can take minutes, the slot is re-read afterwards; if another request stopped, reassigned, reset or unassigned it meanwhile, or an external publisher took the slot, the start is abandoned with 409 and nothing is persisted. A start for a slot that a concurrent start already launched succeeds without changing anything.
A webcam slot is published by the browser rather than by Insight, so for those slots this endpoint only confirms the stream: it returns 409 until MediaMTX reports the WHIP stream as publishing.
Request
Responses
- 200
- 400
- 404
- 409
- 410
- 500
- 502
Operation completed.
Missing or invalid request data.
The requested resource was not found.
Either the webcam slot exists but the browser is not publishing to it yet (retry), or an external publisher holds the slot and Insight has no stream of its own on it (use /api/mediasrc/takeover first).
The slot was reassigned while Insight was confirming a webcam publisher or starting a file, so the start was not recorded (a file stream started this way is stopped again). Unlike 409, not worth retrying: reload the source list.
A local operation failed.
Insight could not reach MediaMTX to verify the slot's publisher, so nothing was changed. If the camera has in fact stopped, the slot updates on its own once MediaMTX is reachable.