Open chsims1 opened 6 years ago
I’m seeing the same problem in both the currently released version of Volumio (2.389) and the latest Beta (2.406) on a RaspberryPi 3.
The issue seems to be with Volumio’s handling of streams without expected Track (and perhaps other) info.
For instance the playlist for BBC Radio 5 Live Sports Extra is
When adding this as a webradio and playing it, it plays fine but shows incorrect info and cannot be stopped using the Volumio UI. mpc status shows http://as-hls-uk-live.akamaized.net/pool_6/live/bbc_radio_five_live_sports_extra/bbc_radio_five_live_sports_extra.isml/bbc_radio_five_live_sports_extra-audio%3d320000.norewind.m3u8
And mpc stop successfully stops playing the stream.
Volumio logs show the following info:
2018-06-14T10:22:34.937Z - info: ControllerMpd::parseTrackInfo 2018-06-14T10:22:34.938Z - info: ControllerMpd::pushError 2018-06-14T10:22:34.939Z - info: TypeError: Cannot read property 'replace' of undefined at ControllerMpd.parseTrackInfo (/volumio/app/plugins/music_service/mpd/index.js:402:55) at Promise._successFn (/volumio/app/plugins/music_service/mpd/index.js:283:28) at nextTickCallback (/volumio/node_modules/kew/kew.js:47:28) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) 2018-06-14T10:22:34.939Z - info: ControllerMpd::pushError 2018-06-14T10:22:34.940Z - info: TypeError: Cannot read property 'replace' of undefined at ControllerMpd.parseTrackInfo (/volumio/app/plugins/music_service/mpd/index.js:402:55) at Promise._successFn (/volumio/app/plugins/music_service/mpd/index.js:283:28) at nextTickCallback (/volumio/node_modules/kew/kew.js:47:28) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) 2018-06-14T10:22:34.940Z - info: ControllerMpd::pushError 2018-06-14T10:22:34.941Z - info: TypeError: Cannot read property 'replace' of undefined at ControllerMpd.parseTrackInfo (/volumio/app/plugins/music_service/mpd/index.js:402:55) at Promise._successFn (/volumio/app/plugins/music_service/mpd/index.js:283:28) at nextTickCallback (/volumio/node_modules/kew/kew.js:47:28) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) 2018-06-14T10:22:34.941Z - info: ControllerMpd::pushError 2018-06-14T10:22:34.942Z - info: TypeError: Cannot read property 'replace' of undefined at ControllerMpd.parseTrackInfo (/volumio/app/plugins/music_service/mpd/index.js:402:55) at Promise._successFn (/volumio/app/plugins/music_service/mpd/index.js:283:28) at nextTickCallback (/volumio/node_modules/kew/kew.js:47:28) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) 2018-06-14T10:22:34.942Z - info: ------------------------------ 30ms
mpc status for BBC Radio 4 which also exhibits this problem shows http://as-hls-uk-live.akamaized.net/pool_6/live/bbc_radio_fourfm/bbc_radio_fourfm.isml/bbc_radio_fourfm-audio%3d320000.norewind.m3u8 While BBC World Service which behaves a bit better, seems to have track info, with mpc status returning bbc_world_service
Interesting. Can you post the url for the world service that you are using? Or the contents of the m3u8 file?
So if I try this url: http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_five_live_sports_extra.m3u8 I get geoblocked (403 Forbidden).
This hack to the code:
--- a/app/plugins/music_service/mpd/index.js
+++ b/app/plugins/music_service/mpd/index.js
@@ -399,7 +399,12 @@ ControllerMpd.prototype.parseTrackInfo = function (objTrackInfo) {
} else if (resp.uri.indexOf('http://') >= 0) {
resp.service='dirble';
if (objTrackInfo.file.indexOf('bbc') >= 0) {
- objTrackInfo.Name = objTrackInfo.Name.replace(/_/g, ' ').replace('bbc', 'BBC');
+ this.commandRouter.logger.info("OBJTRACKINFO 'bbc' "+JSON.stringify(objTrackInfo));
+ if (objTrackInfo.Name != undefined) {
+ objTrackInfo.Name = objTrackInfo.Name.replace(/_/g, ' ').replace('bbc', 'BBC');
+ } else {
+ objTrackInfo.Name = 'BBC_-_no_name';
+ }
objTrackInfo.file = objTrackInfo.Name;
}
}
allows me to see that the objTrackInfo is lacking a lot of fields:
info: OBJTRACKINFO 'bbc' {
"file":"http://as-hls-uk-live.akamaized.net/pool_6/live/bbc_radio_five_live_sports_extra/bbc_radio_five_live_sports_extra.isml/bbc_radio_five_live_sports_extra-audio%3d320000.norewind.m3u8",
"Pos":"0",
"Id":"1"
}
It would be interesting to see what @chsims1 or @bboffey get when applying the same hack.
Thanks for the reply. I’ll give the hack a go, for now here’s some more info on the streams. Sorry some are geoblocked, they’re the BBC’s ‘high quality’ streams for use within the UK.
BBC World Service is a straight stream, this ‘just works’ http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-eieuk
BBC Radio 4 is a playlist http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_fourfm.m3u8 Which when grabbed with curl itself returns a playlist
http://as-hls-uk-live.akamaized.net/pool_6/live/bbc_radio_fourfm/bbc_radio_fourfm.isml/bbc_radio_fourfm-audio%3d320000.norewind.m3u8 Which when grabbed with curl returns
bbc_radio_fourfm-audio=320000-238918316.ts
bbc_radio_fourfm-audio=320000-238918317.ts
bbc_radio_fourfm-audio=320000-238918318.ts
bbc_radio_fourfm-audio=320000-238918319.ts
bbc_radio_fourfm-audio=320000-238918320.ts
Radio 5 Live Sports Extra is similar, a playlist http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_five_live_sports_extra.m3u8 Which when grabbed with curl gives
http://as-hls-uk-live.akamaized.net/pool_6/live/bbc_radio_five_live_sports_extra/bbc_radio_five_live_sports_extra.isml/bbc_radio_five_live_sports_extra-audio%3d320000.norewind.m3u8 Which when grabbed with curl gives
bbc_radio_five_live_sports_extra-audio=320000-238918391.ts
bbc_radio_five_live_sports_extra-audio=320000-238918392.ts
bbc_radio_five_live_sports_extra-audio=320000-238918393.ts
bbc_radio_five_live_sports_extra-audio=320000-238918394.ts
bbc_radio_five_live_sports_extra-audio=320000-238918395.ts
I wonder if this difference and nesting may be related? I’m not familiar with structures of playlists and streams.
Apologies for formatting, the commenting system is horrible to use on an iPad! Will clear up later from a laptop.
This issue seems to definitely be related to the .m3u8 filetype (or the newer streams they point at).
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
works fine, UI info present and stop/start button works.
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_two.m3u8
works, but no UI info and stop/start button doesn't work.
Here’s what I see for a couple of streams with the hack above:
2018-09-20T12:47:59.717Z - info: OBJTRACKINFO 'bbc' {"file":"http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p","Name":"BBC Radio 4 FM","Pos":"0","Id":"5"}
2018-09-20T12:48:03.732Z - info: OBJTRACKINFO 'bbc' {"file":"http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-eieuk","Name":"BBC World Service","Pos":"0","Id":"6"}
Is there a more graceful way of handling cases when expected fields are missing?
This problem went away (for me) for a couple of update versions. It's now back with 2.502.
Edit: it might well be changes at the BBC end rather than Volumio. Annoying though, because the only way to stop the BBC stream is to 'clear and play' something else, or reboot.
Anyone have a solution to this? I'm using the m3u8 URLs. I don't mind no information but being able to stop would be useful 😂
There is still a problem with an added stream to My Web Radios for the BBC stream. It can't be stopped. The stream in particular is http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_fourfm.m3u8 which is a higher bitrate than the one in the "Volumio Selection"
Not had chance to try on a RPi yet, but on Sparky BBC radio streams (eg. http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_fourfm.m3u8) don't display title (or any info) in UI. Also, no 'stop' button to stop stream. This behaviour started some time in the last month or so.
Edit: just noticed the .m3u8 filetype; don't know if this is significant