본문으로 건너뛰기

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​

Operation completed.