mediamtx
mediamtx copied to clipboard
Enabling/Disabling a Path
Describe the feature
Let me know if I'm missing something, but I do not see a way to disable a path without deleting it.
The Use Case I'm thinking of is a UI that uses the HTTP API to add/remove/configure stream paths. There may be cases where you want to disable a proxied stream to save resources, but you don't want to lose all of the path information associated with it since you will enable it at a later time. And of course if you are able to disable, the feature would need to allow enabling it again. "sourceOnDemand" helps conserve resources if there are no readers, but it won't kick off active readers.
A simple addition to the configuration file like "sourceEnabled: true" or "sourceEnabled: false" would work.
Good idea, +1.
Thanks for a great project aler9!
I have a use case in retail for camera sharing where it is required to pause a stream to one application reader, reposition the camera (using PTZ) for a minute or so to look at something else for a different use case (which may start up a different stream), put the camera back and then resume the initial stream. We don't want the initial application seeing the camera move, that would freak it out. I'm even thinking redirecting the initial stream to a gstreamer test pattern or a standby video or stock camera baseline footage might work through changing the stream source. Obviously there would be a short stream outage. Some of this can already be done with streams sourcing from other internal streams. Automating this through an API is required for this solution. Potentially this could help here.
@pkerney store the entire path configuration somewhere in the application that is controlling the server through the API, add it to the server when you need it and remove it when you don't need it anymore.