Read the statement by Michael Teeuw here.
Online Radio
-
@wishmaster270 Mate you’re a genius. Worked perfectly. Seriously can’t thank you enough. Just one question, it’s not 24 hours radio, when it’s come back online will it start automatically? On my computer browser on the radio page when it’s come back online it doesn’t go live automatically, I need to press refresh button to go live.
-
@tanvir586 Great if I could help.
I am not sure how vlc will handle a connection loss. Normally it will try to reconnect but I do not know how long and often it tries.
Maybe there is a command line option but I think the best option is to try it -
@wishmaster270 ok. Will try and let you know. Really appreciated. Thanks 😊
-
@wishmaster270 Hi. Ive just checked it doesn’t go online after radio came back online. the link I gave you before that is 24 hour’s radio. But I used this link https://relay.emasjidlive.uk/kingsheathmasjid
but it didn’t work. the channel went offline at 4.30pm uk time and came back online at 6.00pm. I pressed stop button and press play and it start working.
-
@wishmaster270 is there any command I can use for auto reconnect?
-
@tanvir586 Sorry, needed a moment to figure things out…
You can try to add “–http-reconnect” and maybe “–http-continuous” to the options.
Your config should look something like this then:
{ module: "MMM-MplayerRadio", header: "Radio", position: "top_center", config: { //autoplay: 0, customCommand: "/usr/bin/vlc", customCommandArgs: ["-I","dummy", "--http-reconnect", "--http-continuous", "###URL###"], stations: [ { title: "Al Mubarak", url: "https://relay.emasjidlive.uk/almubarakradio", logo: "https://upload.wikimedia.org/wikipedia/commons/a/ac/Antenne-bayern-logo.png", }, ], }, },
-
@wishmaster270 thanks mate. I’ll try today.
-
@wishmaster270 It didn’t work. it do work when I press stop and play agian.
config ;-
{ module: "MMM-MplayerRadio", header: "Radio", position: "top_center", config: { autoplay: 0, customCommand: "/usr/bin/vlc", customCommandArgs: ["-I","dummy", "--http-reconnect", "--http-continuous", "###URL###"], stations: [ { title: "Al Mubarak", url: "https://relay.emasjidlive.uk/kingsheathmasjid", logo: "https://upload.wikimedia.org/wikipedia/commons/a/ac/Antenne-bayern-logo.png", }, ], }, },
-
@tanvir586 I will try to dig deeper the next days but I can not promise that I will have the time.
Maybe I can write a simple wrapper for vlc which ends the process when the streams stops or is unreachable and tries to start the process every few seconds.
Did not find any better solution til now. -
@tanvir586
I release a new version of MMM-MplayerRadio (0.0.10) a few minutes ago which contains a new script called “streamlinkWrapper.bash” script. This script uses the streamlink tool to wrap the stream and restarts it if the connection gets lost.
You will find a example configuration in the examples directory for streamlinkWrapper which contains the configuration needed for your case.Make sure to install streamlink:
sudo apt -y update && sudo apt -y install streamlink