segler-alex / radiobrowser-api-rust

radio-browser API implementation in rust
GNU Affero General Public License v3.0
230 stars 96 forks source link

m3u8 playlist urls not resolved #145

Closed louis77 closed 2 years ago

louis77 commented 2 years ago

hi @segler-alex

I reopen this issue because I get issues from users of Tuner (which I'm the developer of) that they cannot play stations which have a m3u8 playlist URL. Obviously these URLs don't get resolved by radio-browser.info: https://github.com/louis77/tuner/issues/84

This is one of the stations https://www.radio-browser.info/history/ce14d522-526f-4143-8a15-7bc75e13c347

I've tried to find any reference in the radiobrowser repository about m3u8 playlist support but couldn't find one. Is this something that can be added/supported? More and more stations use the m3u8 playlist format.

segler-alex commented 2 years ago

m3u8 playlists are in other words HLS streams. https://en.wikipedia.org/wiki/HTTP_Live_Streaming they work differently than typical shoutcast-like streams which only have a single "endless" file/url you just open and play. HLS incorporates playlist files into the protocol definition, this makes it possible for the player to select different qualitites of the same stream with a single master/ Multivariant playlist file https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/creating_a_multivariant_playlist this main playlist files do then reference other playlist files that have themselfes links to parts of the stream (the "real" data) as such an index as radiobrowser is not meant to use this files at all. i do support it as much as i can as i mark HLS streams as beeing HLS so a player immediately knows from the entry it gets from radio-browser that it handling a HLS stream. I also plan to make HLS searchable (if you only want to select HLS streams , or only ones that are NOT HLS) but the main part of decoding the HLS streams is meant to be done by the player. i hope i managed to explain it well.

louis77 commented 2 years ago

Thank you for your remarks. I'll have to look into it then to make Tuner able to use m3u8 URLs directly.