Hello everyone.
I am currently trying to achieve the following behaviour with VLM:
When there is one or more clients interested in a particular stream, create a SHARED broadcast, thus a unique access/decoding/encoding/muxing instance shared by multiple clients.
When no client is watching a stream, the broadcast should be disabled/stopped, so to reduce network/CPU/memory consumption.
For now, this logic is implemented within the VLM controlling code, by refcounting the clients and stopping the broadcast when this number falls to zero.
Currently VLM provides two types of media : Broadcast and VOD.
Broadcast have exactly one instance running when played even if there is no client watching.
VOD creates an instance for each client connection. Each of those instances gets the data (presumably from network, thus consuming bandwidth), decodes it, then reencodes it and finally stream it. This costs a lot uselessly if the source is the same live stream (for example coming for ip cameras).
A perfect solution would be to have some kind of "on-demand boadcast" or "uni-instance VOD" VLM media type. I wonder if I am the only one having such requirements and if such a proposition would be considerable enough to be integrated in VLM main tree.