Robust httpd client

brilyant

New Member
Joined
Jul 28, 2023
Messages
3
Reaction score
3
Credits
29
I need to create a reliable audio stream, listening to a website across the internet.
The simplest way seems to be the most obvious: just run a web client, and click on the appropriate link.
However, with Firefox, and possibly other clients, a temporary break in the bitstream leads to complete loss of audio: when the bitstream is restored the client doesn't restart producing audio.
Is there a client that will restart?
If not, I guess I'll need to build in a monitor that checks for failure and automatically restarts the client.
 


Hmm... This almost looks like a homework question, but you could just be working on a nifty project.

I wonder if using cURL on the stream (and then setting a media player to play that stream) would work?

You could set it with a long timeout and the -c flag should reconnect you after interruptions.

Someone smarter than I can take it from there, but I think that's where I'd start. There might even be existing tools that do this.
 
I usually just download the mp3's locally.

Yeah, it's old school. Yeah, I can't listen to them on every device. Yeah, they take up space.

... but I can still listen to them, even when there is no internet.


Also the "can't listen to them on my mobile device", argument ... usually the only time I listen to music
on my mobile device, is if I'm away from my PC, away from my house. So it's a different
network altogether. Usually a 5G cell tower or something.
 
Hmm... This almost looks like a homework question, but you could just be working on a nifty project.

I wonder if using cURL on the stream (and then setting a media player to play that stream) would work?

You could set it with a long timeout and the -c flag should reconnect you after interruptions.

Someone smarter than I can take it from there, but I think that's where I'd start. There might even be existing tools that do this.
Thanks for your thoughts. The situation is that this is a backup feed to an FM transmitter. The main route uses a microwave link carrying 16-bit audio, which sometimes fails for the most absurd reasons, and having a decent backup will ease our "dead air" dialogue with OfCOM.
AB
 
An in-depth study of man mplayer revealed the -idle switch that keeps it live when the bitstream fails, and allows it to pick up again after the interruption. Stand to reason that someone would've thought about that. Works a dream.
 

Members online


Top