micro-nova / AmpliPi

Whole House Audio System 🔊
https://amplipi.com
GNU General Public License v3.0
286 stars 23 forks source link

Feature: Add m3u file support to internet radio stream #255

Closed linknum23 closed 1 year ago

linknum23 commented 2 years ago

Although vlc supports m3u file playback our stream implementation does not. What do we need to change?

AmpliPi's vlc support is pretty simple. Here's what you need to reproduce the problem on an AmpliPi:

cd amplipi-dev
source venv/bin/activate
python streams/runvlc.py http://radiox.de/media/radiox.m3u --verbose

runvlc.py is a standalone script that we use to interface with vlc and get metadata back. If we are lucky adding some small changes there may add support for this and other formats.

linknum23 commented 2 years ago

It looks like we can add something similar to this parser in mopidy: https://github.com/mopidy/mopidy/blob/develop/mopidy/internal/playlists.py to handle different playlist types.

linknum23 commented 2 years ago

Another option would be to add a download step that downloads the file before giving it to vlc. VLC handles most filetypes well and should have a default .method of handling the m3u file, this would require some testing.

linknum23 commented 2 years ago

Enabling this is actually as simple as telling vlc to fetch and parse the playlist. Check out #379

linknum23 commented 1 year ago

After more testing this appears to be partially supported without any modification. We may need to robustify internet radio as a whole though.