New stream URLs via API
Hello again,
I am the author of the Radio Now Playing plugin for LMS - it uses your APIs (some documented and others ... discovered) to show what is playing and also to launch the stream on Squeezebox (and related) players.
I see that new stream URLs are coming.
Is there an API call that I can use to get the stream URLs so that I do not have to manually add them all (I have seen the web page that lists them).
I am the author of the Radio Now Playing plugin for LMS - it uses your APIs (some documented and others ... discovered) to show what is playing and also to launch the stream on Squeezebox (and related) players.
I see that new stream URLs are coming.
Is there an API call that I can use to get the stream URLs so that I do not have to manually add them all (I have seen the web page that lists them).
Följ inlägget
1
följare
I will ask the developers and then get back to you.
I am well aware of Radio Now Playing and have recommended Squeezebox-owner to use your plugin instead of the Tunein-based service they used before, as our content via Tunein is blocked abroad. One listener asked why we are viewing your service as a more secure option, and I wrote:In English:So, it is in our mutual interest you can continue to use our API 😀
I think our old discussion here has been archived away somewhere.
An updated "audiourltemplates" ... and documented values for "quality" (which was high, medium, low and may well still be) could be good.
FLAC streams for radio
The "audiourltemplates" 2-5 will still be ok and redirected to our new streams. BUT (and this is an old problem) templates 2 and 5 are malfunctioning when it comes to protocols and gives you an https-stream although you used an http-URL.
I think that the templates 3 and 4 gives you http-streams but in cantainers of pls/m3u if you use http.
- <urltemplate id="2" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid].mp3"/>
- <urltemplate id="3" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http.pls"/>
- <urltemplate id="4" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http.m3u"/>
- <urltemplate id="5" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http"/>
The quality-parameter can be lo (low), hi (high) or left out (normal). The channelid you find here:https://api.sr.se/api/v2/channels?pagination=false&format=json
http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http
High quality, ID 132 (the station P1):
http://sverigesradio.se/topsy/direkt/srapi/132-hi-aac-http
Starts https://edge1.sr.se/p1-aac-320 or https://edge2.sr.se/p1-aac-320
In medium quality you get:
http://sverigesradio.se/topsy/direkt/srapi/132-aac-http
Starts https://edge1.sr.se/p1-aac-128 or https://edge2.sr.se/p1-aac-128
https://live1.sr.se/p2-aac-320
It redirects to https://edge1.sr.se/p2-aac-320 (or edge2 etc)
It is the same stream as you get from http://sverigesradio.se/topsy/direkt/srapi/2562-hi-aac-http
The old streams (that are still up and running) were on a server named http-live.sr.se:
https://http-live.sr.se/p2musik-aac-320
I'll probably make a version available to beta testers today or tomorrow.
I am going to stick with live1 for now but if someone plays edge1 directly (not requesting via RNP) then I will still detect it and dynamically add the programme/song info.
Extrakanal 1 etc
Extrakanals are sending content not aired in the ordinary stations, most often football or ice hockey, on a very irregular basis. There is no usable way for the audience to know which of the channels we are going to use for a scheduled match and browsing around among 12 different stations in hope of catching the right one is not a behavior I think our audioence on Radio Now Playing are interested in.
P2 Språk & musik
P2 Språk & musik is an FM-product. Due to limitation in frequencies, "P2 in FM" is sending an odd combination of content in Finnish, Romani and other "non Swedish languages" part of the day, and classical music, jazz and folk music most of the time.
On internet we have divided this into separate stations. P2 with music 24/7, and P6 for non Swedish content. They are both better options and thus we don't list P2 Språk & musik among our internet stations.
The beta is now available.
I already had a work around for P2 Språk & musik ... although I did not keep brilliant notes about the approach that I took.
If you still feel you wan't to have it, please beware of the confusion due to old names in the API, that cased you some trouble in July 2024.
P2:
The station we think is better suited for digital listeners, music 24/7
Name in API: P2 Musik
ID: 2562
P2 Språk och musik:
The "FM-product", left out in our newer list but still present in the API
Name in API: P2
ID: 163
A RNP-user reports problems whith P1 and P3 från Sveriges Radio where he gets the looping sound we are using on the old streams that we are about to end by March.
Does he need to do something in order to catch the current streams or is this problem on your side? Updated URL:s to our stations:
Länkar till ljudströmmar för alla kanaler - Support - hjälpsidor | Sveriges Radio
PS: During the Olympic games all P4-stations (except P4 Plus) will be geoblocked for non Swedish PI-addreses.
If we take P1 as an example - I am using:
h t t p s ://ljud1-cdn.sr.se/lc/p1.m3u8
h t t p s ://live1.sr.se/p1-mp3-96
h t t p s ://live1.sr.se/p1-aac-320
h t t p ://live1.sr.se/p1-aac-128
h t t p ://live1.sr.se/p1-mp3-96
h t t p ://live1.sr.se/p1-aac-32
Which, apart from the first one, all seem valid on your list.
Should I remove the HLS one?
I list the 320 AAC stream as "(aac-high)" in the RNP menu and it appears to be working from here in UK.
If the listener is using a different stream URL then perhaps they have saved an old one as a favourite or preset ... in which case they should replace it with one of the others that works well for them from the RNP menu.
They could also edit the stream URL in Favourite/Preset to add your latency field in case it helps - it should still work with RNP.
You are right, the problem is probably that he needs to replace his old favourites.
It is no problem with you sharing the HLS-links I guess. They are not listed on our page for "external use", but as we use the same streams in our apps and on our website, they are monitored and running. I let you know if my collegues say thatthose
I wrote:
Read "IP-addresses".
Read;