music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.36k stars 52 forks source link

Bug: RadioBrowser Provider Won't Play #1679

Closed libby2cm closed 10 months ago

libby2cm commented 10 months ago

What version of Music Assistant has the issue?

2.0.0b77

The problem

Streaming from the RadioBrowser provider does not work, likely due to missing https whitelist config flag for ffmpeg.

How to reproduce

Try to play any RadioBrowser stream.. it will faill.

Relevant log output

2023-12-08 10:47:54.651 WARNING (MainThread) [music_assistant.audio] Could not determine integrated loudness of radiobrowser://radio/092c3ba9-432c-4765-991b-328f4e9efc05 - ffmpeg version 5.1.4-0+deb12u1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 [hls @ 0x55c4325c7980] Skip ('#EXT-X-INDEPENDENT-SEGMENTS') [hls @ 0x55c4325c7980] Skip ('#ICEBERG-MASTER-PLAYLIST') [hls @ 0x55c4325c7980] Skip ('#ICEBERG-SERVER-IP: 35.153.100.95') [hls @ 0x55c4325c7980] Opening 'https://prod-35-153-100-95.amperwave.net/audacy-wrxlfmaac-hlsc.m3u8/?z=448c185cd69840aa8595395c63e38db8&p=1' for reading [https @ 0x55c4325cd500] Protocol 'https' not on whitelist 'crypto,data'! [hls @ 0x55c4325c7980] parse_playlist error Invalid argument [https://prod-35-153-100-95.amperwave.net/audacy-wrxlfmaac-hlsc.m3u8/?z=448c185cd69840aa8595395c63e38db8&p=1] [hls @ 0x55c4325c7980] Opening 'https://prod-35-153-100-95.amperwave.net/audacy-wrxlfmaac-hlsc.m3u8/?z=448c185cd69840aa8595395c63e38db8&p=2' for reading [https @ 0x55c4325cd800] Protocol 'https' not on whitelist 'crypto,data'! [hls @ 0x55c4325c7980] parse_playlist error Invalid argument [https://prod-35-153-100-95.amperwave.net/audacy-wrxlfmaac-hlsc.m3u8/?z=448c185cd69840aa8595395c63e38db8&p=2] [hls @ 0x55c4325c7980] Empty segment [https://prod-35-153-100-95.amperwave.net/audacy-wrxlfmaac-hlsc.m3u8/?z=448c185cd69840aa8595395c63e38db8&p=1] [hls @ 0x55c4325c7980] Empty segment [https://prod-35-153-100-95.amperwave.net/audacy-wrxlfmaac-hlsc.m3u8/?z=448c185cd69840aa8595395c63e38db8&p=2] Input #0, hls, from 'pipe:': Duration: N/A, bitrate: N/A Program 0 Metadata: variant_bitrate : 128000 Program 1 Metadata: variant_bitrate : 128000 Output #0, null, to 'pipe:': Output file #0 does not contain any stream

Additional information

If I manually add a stream URL using http, it works fine. This provider should probably default to using http anyway, since no need to encrypt a radio stream or incur the overhead.

What version of Home Assistant Core are your running

2023.12.0

What type of installation are you running?

Home Assistant Supervised

On what type of hardware are you running?

Linux

OzGav commented 10 months ago

Thanks. Can you just confirm it is still a problem with b78.

OzGav commented 10 months ago

Confirmed

OzGav commented 10 months ago

Looking at the code the protocol_whitelist argument is sent so I think there is a problem elsewhere

OzGav commented 10 months ago

@gieljnssns Can you have a look at this?

fliespl commented 10 months ago

I can confirm it happening on two out of 5 radio stations from TuneIn. I need to power off speaker in ha to be able to stream to it again.

marcelveldt commented 10 months ago

This should be fixed for most radio streams with beta79

OzGav commented 10 months ago

Please report if this still an issue after beta79 is released