How can I time out from a bad URL ?

About encoding, codec settings, muxers and filter usage
GeorgeC
New Cone
New Cone
Posts: 8
Joined: 21 Feb 2010 19:05

How can I time out from a bad URL ?

Postby GeorgeC » 31 May 2018 20:21

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
Think (critically) for yourself

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

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

Postby Rémi Denis-Courmont » 01 Jun 2018 21:28

If the URL is not responding, VLC will time out and quit.

--run-time is for playback time, not total time.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

GeorgeC
New Cone
New Cone
Posts: 8
Joined: 21 Feb 2010 19:05

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

Postby GeorgeC » 02 Jun 2018 00:19

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
Think (critically) for yourself

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

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

Postby Rémi Denis-Courmont » 02 Jun 2018 08:45

Yeah, in the TCP/IP stack settings of the OS.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

GeorgeC
New Cone
New Cone
Posts: 8
Joined: 21 Feb 2010 19:05

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

Postby GeorgeC » 02 Jun 2018 14:44

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
Think (critically) for yourself

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

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

Postby Rémi Denis-Courmont » 02 Jun 2018 21:26

Works for me, and depends on your OS - wrong venue.
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 18 guests