VLC does something really wrong, when HTTP source is gone.

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
postscripter
Blank Cone
Blank Cone
Posts: 36
Joined: 21 Jul 2017 08:30
Location: Hot Russia

VLC does something really wrong, when HTTP source is gone.

Postby postscripter » 18 Sep 2017 21:09

Hello!

I have a playlist, which contains two elements:

http://bookradio.hostingradio.ru:8069/fm
file:///home/me/scripts/lost.wav

And I also turned on the option "Repeat playlist".

My point of view is like this: when HTTP source is gone (I pulled off a cable) VLC should go on to the next item. But instead it stuck on the first item forever in "playing" state, until I manually click Next.

On Windows it's even worse. Just imagine, this guy will repeat the last 15 seconds until the source is back online!!! That's ridiculous!

VLC 2.2-3.0/Ubuntu+Xfce and VLC 2.1/Windows.

postscripter
Blank Cone
Blank Cone
Posts: 36
Joined: 21 Jul 2017 08:30
Location: Hot Russia

Re: VLC does something really wrong, when HTTP source is gone.

Postby postscripter » 18 Sep 2017 21:21

So, the question is, how to make it failure-safe? I'd like it to switch to the next stream if the first one becomes unavailable.

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

Re: VLC does something really wrong, when HTTP source is gone.

Postby Rémi Denis-Courmont » 19 Sep 2017 17:31

Unless you enabled HTTP continuous mode, VLC will switch to the next item when the connection fails or times out. Of course, that might take some time, depending on TCP/IP stack.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

postscripter
Blank Cone
Blank Cone
Posts: 36
Joined: 21 Jul 2017 08:30
Location: Hot Russia

Re: VLC does something really wrong, when HTTP source is gone.

Postby postscripter » 19 Sep 2017 18:36

Rémi Denis-Courmont

I saw the checkbox "HTTP: try to reconnect". It is disabled. And frankly, vlc seems not to pay any attention to it, I tried.

30 min - that's how much I have been waiting. Should be enough for any tcp stack.

postscripter
Blank Cone
Blank Cone
Posts: 36
Joined: 21 Jul 2017 08:30
Location: Hot Russia

Re: VLC does something really wrong, when HTTP source is gone.

Postby postscripter » 19 Sep 2017 20:43

Oh, are you a developer? Could you check it, please? Just make a playlist out of those two and accidentally unplug the internet cable (for more than 30 seconds!)

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

Re: VLC does something really wrong, when HTTP source is gone.

Postby Rémi Denis-Courmont » 19 Sep 2017 21:08

It sounds like the TCP connection is still valid - you can check with netstat or your OS equivalent.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

postscripter
Blank Cone
Blank Cone
Posts: 36
Joined: 21 Jul 2017 08:30
Location: Hot Russia

Re: VLC does something really wrong, when HTTP source is gone.

Postby postscripter » 20 Sep 2017 17:56

It sounds like the TCP connection is still valid
Indeed. Other software's connections became FIN_WAIT within a dozen of seconds or so after the disconnect, but VLC's one never closed. It's bloody immortal...(

Code: Select all

netstat -tvanpe Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name .... tcp 0 0 0.0.0.0:32400 0.0.0.0:* LISTEN 128 24432 2092/Plex Media Ser tcp 0 0 127.0.0.1:58452 127.0.0.1:48401 ESTABLISHED 1000 1892745 22444/sshd: sweetho tcp 0 0 192.168.1.10:45640 5.178.80.42:8069 ESTABLISHED 1000 22067 1762/vlc tcp 0 1 192.168.1.10:44340 82.94.168.60:443 FIN_WAIT1 0 0 2092/Plex Media Ser tcp 0 0 127.0.0.1:48401 127.0.0.1:58452 ESTABLISHED 1000 1891302 22755/x2goagent ....

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

Re: VLC does something really wrong, when HTTP source is gone.

Postby Rémi Denis-Courmont » 20 Sep 2017 19:02

In other words, there is nothing wrong. It's just waiting for more data.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

postscripter
Blank Cone
Blank Cone
Posts: 36
Joined: 21 Jul 2017 08:30
Location: Hot Russia

Re: VLC does something really wrong, when HTTP source is gone.

Postby postscripter » 20 Sep 2017 23:44

It's just waiting for more data.
What for? The remote server will shut the connection down unilaterally very soon, and there won't be more data.

Others close their connections by timeout (see "plex media" in the table above). Why VLC is so different?

Isn't the option "tcp connection timeout" which by default = 5000 the one which should limit our waiting time?

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

Re: VLC does something really wrong, when HTTP source is gone.

Postby Rémi Denis-Courmont » 23 Sep 2017 17:05

The TCP connection timeout is for establishment, not keeping open.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

postscripter
Blank Cone
Blank Cone
Posts: 36
Joined: 21 Jul 2017 08:30
Location: Hot Russia

Re: VLC does something really wrong, when HTTP source is gone.

Postby postscripter » 23 Sep 2017 17:52

From your answer I guess there's nothing for "keeping open"? To prevent the behaviour I described in the previous message? I mean, at the moment the Internet is restored, the connection is confidently dead. The player will stick forever (or may be for 2 hours, it depends on socket options & tcp defaults). Can not wrap my head around it, how come, there is no timeout?

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

Re: VLC does something really wrong, when HTTP source is gone.

Postby Rémi Denis-Courmont » 25 Sep 2017 17:36

How would VLC distinguish working connection with no data from broken connection? The HTTP layer knows nothing of the expected bit rate. It's the TCP/IP stack's job to notify the player of breakage.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests