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
12.19k stars 1.53k forks source link

Path in configuration unable to be removed via the API #680

Closed Afrostie closed 2 years ago

Afrostie commented 2 years ago

Which version are you using?

v0.17.7

Which operating system are you using?

Describe the issue

Hello, I have an issue where there is a path getting added to the list of paths that I am unable to remove/modify via the API. This only happens if a video player (VLC etc), requests the RTSP stream before it has been configured to publish/proxy any streams. HTTP calls to

POST 127.0.0.1:9997/v1/config/paths/remove/proxyStream

have no effect, and the following proxyStream configuration is still returned in the get lists API command

{
    "items": {
        "proxyStream": {
            "confName": "~^.*$",
            "conf": {
                "source": "publisher",
                "sourceProtocol": "automatic",
                "sourceAnyPortEnable": false,
                "sourceFingerprint": "",
                "sourceOnDemand": false,
                "sourceOnDemandStartTimeout": "10s",
                "sourceOnDemandCloseAfter": "10s",
                "sourceRedirect": "",
                "disablePublisherOverride": false,
                "fallback": "",
                "publishUser": "",
                "publishPass": "",
                "publishIPs": [],
                "readUser": "",
                "readPass": "",
                "readIPs": [],
                "runOnInit": "",
                "runOnInitRestart": false,
                "runOnDemand": "",
                "runOnDemandRestart": false,
                "runOnDemandStartTimeout": "10s",
                "runOnDemandCloseAfter": "10s",
                "runOnPublish": "",
                "runOnPublishRestart": false,
                "runOnRead": "",
                "runOnReadRestart": false
            },
            "source": null,
            "sourceReady": false,
            "readers": []
        }
    }
}

Describe how to replicate the issue

  1. Start the rtsp-simple-server with default configuration, except api enabled
  2. Using a rtsp player such as VLC, access the rtsp://localhost:8554/proxyStream rtsp stream. The stream won't connect as there is no proxyStream configured yet
  3. GET 127.0.0.1:9997/v1/paths/list for me the response contains the empty proxyStream above
  4. Try and remove or edit the proxyStream path so I can publish the correct path from another application, such as POST 127.0.0.1:9997/v1/config/paths/remove/proxyStream
  5. Get the paths list again and see that the above proxyStream configuration still exists. The same happens when I try and edit via the API. It returns a 200 OK but the updated configuration is not applied
  6. I also tried adding a new path with POST 127.0.0.1:9997/v1/config/paths/add/proxyStream and the data containing
    {"source": "rtsp url"}
  7. Response to the add path command is 200 OK, but when getting the list of paths again it has not been updated.

Thanks for any suggestions/help

aler9 commented 2 years ago

Hello, this is a bug, the path should disappear automatically. This is the same as #664

aler9 commented 2 years ago

Thanks for reporting the issue, this is fixed in main and will be added to the next release.

aler9 commented 2 years ago

added in v0.17.8

github-actions[bot] commented 1 year ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.