Audio streaming loop issue on Debian

*nix specific usage questions
Raspberry
New Cone
New Cone
Posts: 3
Joined: 27 Jan 2024 22:19

Audio streaming loop issue on Debian

Postby Raspberry » 27 Jan 2024 22:33

Good Day,

I have a Rpi4 running Debian 11 Bullseye. I'm using VLC to play some HTTP internet streams. I've setup a playlist with the stream listed twice so if the network drops, it jumps to the stream again and resumes playing. I've turned loop on in the player the same is how I have my Windows machine setup. On Windows it works great - when the network drops VLC will keep going through the playlist to start the stream.

However on Debian and VLC 3.0.20, when the network disconnects, VLC doesn't detect a drop. No errors messages appear. VLC doesn't jump to the next item on the playlist. The time on the stream doesn't change after the dropout. It just sits there.

Usually you'll see the orange bar go back and forth when it attempts to load again so I'm not sure why VLC isn't detecting that there is no data incoming on the stream. Manually clicking the next file or pressing stop and then play restarts the stream. I've also tried several other playlist settings to no avail.

I saw a similar thread below but wanted to start a separate thread in case this is a different issue.

Please let me know if you have any suggestions as to what might be going on.

Thanks

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

Re: Audio streaming loop issue on Debian

Postby Rémi Denis-Courmont » 28 Jan 2024 13:45

Windows forcefully breaks all ongoing TCP connections if it detects a loss of network carrier.
Linux does not, which allows connections to transparently resumes after a momentary breakage.

So yeah, VLC (or any other app) will not detect the problem on Linux.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Raspberry
New Cone
New Cone
Posts: 3
Joined: 27 Jan 2024 22:19

Re: Audio streaming loop issue on Debian

Postby Raspberry » 28 Jan 2024 20:36

Windows forcefully breaks all ongoing TCP connections if it detects a loss of network carrier.
Linux does not, which allows connections to transparently resumes after a momentary breakage.

So yeah, VLC (or any other app) will not detect the problem on Linux.
Thanks Remi. So there is no way on Linux to get VLC to resume a network stream? Wasn't sure if some sort of task could break TCP when the network drops so VLC will start looking for the stream again?

Edit: I might experiment with tcp keepalive and retry to see what that is set to....perhaps adjusting those will drop the tcp session and get VLC to retry perhaps?

Raspberry
New Cone
New Cone
Posts: 3
Joined: 27 Jan 2024 22:19

RESOLVED: Audio streaming loop issue on Debian

Postby Raspberry » 29 Jan 2024 14:42

Update: I believe this is now resolved. By looking at the below articles, I adjusted the tcp keepalive, interval, and retry settings to a much shorter duration. I might adjust as needed.

net.ipv4.tcp_keepalive_time = 15
net.ipv4.tcp_keepalive_intvl = 15
net.ipv4.tcp_keepalive_probes = 1

After updating the sysctl.conf, saving and rebooting this seemed to work.

With the updated settings, Basically after 30 seconds, Linux will close the TCP connection/ VLC will then see it as dropped and starts trying to reconnect as it does in Windows (provided VLC is set to loop). I have the stream in a playlist with 2 identical entries so it will bounce to the next item (same URL) if it drops.

I will also adjust the network caching settings in VLC to cache a bit more to compensate for the dropouts.

https://webhostinggeeks.com/howto/tcp-k ... practices/
https://webhostinggeeks.com/howto/how-t ... d-systems/


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 22 guests