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.
MIT License
10.71k stars 1.4k forks source link

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

Closed yelodevopsi closed 2 months ago

yelodevopsi commented 2 months ago

Which version are you using?

Self-compiled, Windows amd64 binary Latest commit: https://github.com/bluenviron/mediamtx/commit/8b51ca9c8b0ac4639556e3704216ba5b42231058 v1.8.0

Which operating system are you using?

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

aler9 commented 2 months ago

duplicate of #1406