Page 1 of 1

Prevent source streaming if no active viewing clients?

Posted: 04 Apr 2017 14:24
by pixulator
Hello,

Just wondering if any command line option exists to stop VLC from streaming from the source if no active clients are connected to the server?

For example here is the server setup.

Code: Select all

vlc.exe -I dummy rtsp://[some ip]:554/ :network-caching=10 :sout=#transcode{no-sout-transcode-hurry-up,vcodec=theo,vb=100,scale=1,acodec=none}:http{mux=ogg,dst=:8181/stream} :no-sout-rtp-sap :no-sout-standard-sap :sout-keep
As soon as the server is run and without any clients viewing the stream, I can see in Wireshark that VLC is pulling the stream, presumably to keep it buffered. The source is a H.264 camera over 4G wireless so as you can imagine the data costs are going to be very high if it's running all the time.

We don't want it to stream or just consume very little data if no one is looking at the stream. If VLC can not do this I will probably have to write a script to manage the running instances of the server, killing it when the last user closes their connection.


Thanks

Re: Prevent source streaming if no active viewing clients?

Posted: 06 Apr 2017 17:29
by RĂ©mi Denis-Courmont
You can achieve that using VLM, but it's flaky and inconvenient.