Prevent source streaming if no active viewing clients?

About encoding, codec settings, muxers and filter usage
pixulator
New Cone
New Cone
Posts: 1
Joined: 04 Apr 2017 14:04

Prevent source streaming if no active viewing clients?

Postby pixulator » 04 Apr 2017 14:24

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Prevent source streaming if no active viewing clients?

Postby Rémi Denis-Courmont » 06 Apr 2017 17:29

You can achieve that using VLM, but it's flaky and inconvenient.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 23 guests