Page 1 of 1

How can I time out from a bad URL ?

Posted: 31 May 2018 20:21
by GeorgeC
Hi,

I am using a command such as the following as part of a windows batch file:

Code: Select all

vlc !URL! --sout=#std{access=file,mux=mp3,dst=!FILENAME!} --run-time 10 vlc://quit
In this command, "--run-time 10", as intended, stops the streaming of a connected URL to the file after 10 seconds.

The problem is that if the stream at the URL is down, vlc keeps trying to connect and does not quit. How then do I tell vlc to quit if failing to connect to the specified URL stream after, let's say, x secs.

Thx

gc

Re: How can I time out from a bad URL ?

Posted: 01 Jun 2018 21:28
by Rémi Denis-Courmont
If the URL is not responding, VLC will time out and quit.

--run-time is for playback time, not total time.

Re: How can I time out from a bad URL ?

Posted: 02 Jun 2018 00:19
by GeorgeC
If the URL is not responding, VLC will time out and quit.

--run-time is for playback time, not total time.
Understood. The question is whether there is a way of controlling the length of time before vlc quits.

gc

Re: How can I time out from a bad URL ?

Posted: 02 Jun 2018 08:45
by Rémi Denis-Courmont
Yeah, in the TCP/IP stack settings of the OS.

Re: How can I time out from a bad URL ?

Posted: 02 Jun 2018 14:44
by GeorgeC
If the URL is not responding, VLC will time out and quit.
I tested this, waiting several minutes. It does NOT time out and quit.
Yeah, in the TCP/IP stack settings of the OS.
Where exactly and how ?


I was hoping to find a solution within vlc..... When entering a bad URL in the VLC GUI, i.e. in interactive mode, an Errors and Warnings dialog is promptly displayed. Can't the same be generated in command line mode, followed by stopping the attempt to connect ?

Thank you again.

gc

Re: How can I time out from a bad URL ?

Posted: 02 Jun 2018 21:26
by Rémi Denis-Courmont
Works for me, and depends on your OS - wrong venue.