bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changes in Control API don't save into mediamtx.yml

yelodevopsi opened this issue · comments

Which version are you using?

Self-compiled, Windows amd64 binary
Latest commit: 8b51ca9
v1.8.0

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

Why aren't the changes done with the Control API reflected in the mediamtx.yml file?
The changes are there when doing a new GET on the path {name} of the Control API again, however.

I cannot find any documentation on this. Is this by design?
How can I retain changes done through the Control API?

Describe how to replicate the issue

  1. POST v3/config/paths/replace/{name} (change e.g. record: true/false in body)
  2. GET /v3/config/paths/get/{name}
  3. Check the mediamtx.yml file. The change is not seen.

Did you attach the server logs?

(body of 1968 bytes)
2024/04/30 10:42:36 DEB [API] [conn [::1]:49280] [c->s] POST /v3/config/paths/replace/PI-02 HTTP/1.1
Host: localhost:9997
Accept: application/json, text/plain, */*
Connection: close
Content-Length: 324
Content-Type: application/json
User-Agent: axios/0.21.4

{"name":"PI-02","record":true,"runOnDemand":"gst-launch-1.0 rtspsrc location=rtsp://172.25.25.102:554/axis-media/media.amp name=src latency=0 drop-on-latency=true udp-buffer-size=10242888 ! queue2 ! rtph264depay ! h264parse ! queue2 ! rtspclientsink location=rtsp://localhost:$RTSP_PORT/$MTX_PATH","runOnDemandRestart":true}
2024/04/30 10:42:36 DEB [API] [conn [::1]:49280] [s->c] HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Server: mediamtx


2024/04/30 10:42:36 INF reloading configuration (API request)

Did you attach a network dump?

no

duplicate of #1406