InternetRadio - customize

,

Recently I detect the InternetRadio - chain, nice implementation.
The list of available streams are 9.
How can I add a internet-webstream, I like, to this list?

The list of stations (presets) uses a hardcoded list if there is no config. You can manually add a config file in json format: /zynthian/zynthian-my-data/presets/inet_radio/presets.json This has the format:

{
	"Music": [
		["http://stream.radiotime.com/listen.m3u?streamId=10555650", 0, "FIP", "auto", ""],
		["http://icecast.radiofrance.fr/fipgroove-hifi.aac", 0, "FIP Groove", "aac", ""],
		["http://direct.fipradio.fr/live/fip-webradio4.mp3", 0, "FIP Radio 4", "auto", ""],
		["http://jazzblues.ice.infomaniak.ch/jazzblues-high.mp3", 0, "Jazz Blues", "auto", ""],
		["http://relax.stream.publicradio.org/relax.mp3", 0, "Relax", "auto", ""],
		["http://icy.unitedradio.it/VirginRock70.mp3", 0, "Virgin Rock 70's", "auto", ""],
		["https://peacefulpiano.stream.publicradio.org/peacefulpiano.aac", 0, "Peaceful Piano", "aac", ""],
		["https://chambermusic.stream.publicradio.org/chambermusic.aac", 0, "Chamber Music", "aac", ""],
		["http://sc3.radiocaroline.net:8030/listen.m3u", 0, "Radio Caroline", "auto", ""]
	],
	"Speech": [
		["http://direct.franceculture.fr/ts/franceculture-midfi.mp3", 0, "France Culture", "auto", ""],
		["http://wsdownload.bbc.co.uk/worldservice/meta/live/shoutcast/mp3/eieuk.pls", 0, "BBC Radio World Service (English)", "auto", ""]
	]
}

The first parent node is the bank, i.e. “Music” and “Speech” in this example.
Each entry below this is a station with parameters:

  • URL of stream or playlist
  • 0 - not used
  • Preset / station friendly / display name
  • CODEC type - can use usually use “auto”

It would be good to add a method of editing this from the UI or at least from webconf.

3 Likes

WOW, it works! After fiddling around with the json file and rights management on another Pi and an overseen square bracket, the config is accepted. Nice feature! Thank you!

This is my favourite stream: http://www.ebm-radio.org:7000/;537270416216132stream.nsv

1 Like

Oh 2 things I’ve discovered here

the webradio player and the ebm Channel. There was an old Alien Sex Friends track play ing when I gave it a try

:christmas_tree:

1 Like

Thanks, @riban
Try to add following station to the presets.json file
[“https://stream.laut.fm/apostrophe.m3u”, 0, “apostrophe”, “auto”, “”]
and put the file “presets.json” in the place
/zynthian/zynthian-my-data/presets/inet_radio/

{
        "Music": [
                ["http://stream.radiotime.com/listen.m3u?streamId=10555650", 0, "FIP", "auto", ""],
                ["http://icecast.radiofrance.fr/fipgroove-hifi.aac", 0, "FIP Groove", "aac", ""],
                ["http://direct.fipradio.fr/live/fip-webradio4.mp3", 0, "FIP Radio 4", "auto", ""],
                ["http://jazzblues.ice.infomaniak.ch/jazzblues-high.mp3", 0, "Jazz Blues", "auto", ""],
                ["http://relax.stream.publicradio.org/relax.mp3", 0, "Relax", "auto", ""],
                ["http://icy.unitedradio.it/VirginRock70.mp3", 0, "Virgin Rock 70's", "auto", ""],
                ["https://peacefulpiano.stream.publicradio.org/peacefulpiano.aac", 0, "Peaceful Piano", "aac", ""],
                ["https://chambermusic.stream.publicradio.org/chambermusic.aac", 0, "Chamber Music", "aac", ""],
                ["http://sc3.radiocaroline.net:8030/listen.m3u", 0, "Radio Caroline", "auto", ""]
                ["https://stream.laut.fm/apostrophe.m3u", 0, "apostrophe", "auto", ""]
        ],
        "Speech": [
                ["http://direct.franceculture.fr/ts/franceculture-midfi.mp3", 0, "France Culture", "auto", ""],
                ["http://wsdownload.bbc.co.uk/worldservice/meta/live/shoutcast/mp3/eieuk.pls", 0, "BBC Radio World Service (English)", "auto", ""]
        ]
}

rebooted, but the list looks the same as without the modified “presets.json”.

The mentioned stream link does not work in an ordinary web browser on PC or other kind of computer or mobile device, since it stores a m3u playlist file only. The stream must immediately open a browser based player in a tab to play directly in browser. Otherwise it will not work on zynthian.

m3u playlists are supported by the player used by Zynthian, e.g. the Radio Caroline feed is presented as a m3u playlists. It might depend on the playlist content, e.g. it may only take the first stream in the list.

2 Likes

It seems, that the new “presets,json” is not recalled.
My edited presets.json file has 10 entry, but the preset menu shows only 9 entries.
I changed the order, but no luck.
@riban , do you have a working “presets.json”, which has different entries as the hardcoded list, to try if something is wrong with the path/ rights.

Maybe a late answer, but as I just fiddled with the same problem and used this entry as reference:
I copied the examples from above and had the same problem.
After checking the file by hand, I found that a trailing comma seemed to miss in my case.
I added it, saved and found my entries in the UI.
So: double check the format.

This could indeed be made easier and more fault-tolerant by at least adding a method for editing in webconf as already mentioned by @riban.

Just my 2 cents:
Personally I’d prefer to have a possibility to just add my presets to the existing hard coded stations (instead of overwriting) or better have a possibility to edit these stations as well.

I’d like to share this /zynthian/zynthian-my-data/presets/inet_radio/presets.json

presets.json (5.3 KB)

It lists all streams of the DASDING and of SomaFM.

5 Likes

Super, vielen Dank, many thanks, works well !

This /zynthian/zynthian-my-data/presets/inet_radio/presets.json
presets.json (5.7 KB)
contains all of above plus an additional entry from Ibiza in Music :yum: and the abf bouquet from Paris.

1 Like

We are going to start requiring a tool to handle all the stations…

A classic success problem.

1 Like

@fussl Great. I did not get the “apostrophe”- channel, stream unavailable, with the desktop it works. Any thoughts?

Sometimes a stream does not start immediately, because the server has no free connection, sometimes this has other reasons.
The solution:
Adjust wait for stream to a higher value (15) and twist stream so a new connect is tried.
This makes streams work, sometimes needs more than one try with overcrowded stream servers.
Sometimes, a stream has dropouts, which is often true for abf.radio. This is an uplink problem at the station site and unsolvable from our side.

2 Likes

Should check out https://www.radio-browser.info/

1 Like

This /zynthian/zynthian-my-data/presets/inet_radio/presets.json
presets.json (9.5 KB)
contains the recent default stations plus the addons from above.
Unfortunately, when uploading a new file, the default station entries are lost, so I combined this one.

1 Like