kingosticks / mopidy-tunein

Mopidy extension for playing music from tunein
Apache License 2.0
65 stars 14 forks source link

BBC Radio Stations don't work #5

Closed jackrichardson closed 10 years ago

jackrichardson commented 10 years ago

Using this in PiMusicBox, BBC Radio 1, 2, 3 and 4 just don't work.

kingosticks commented 10 years ago

OK interesting, I did a lot of testing with BBC 1, 2 and 5 live so perhaps something on their end has changed. I'll try and take a look at this tomorrow. If you could get me the mopidy debug log that'd be very useful but don't worry if not. Thanks for the report.

kingosticks commented 10 years ago

Well, I can't reproduce it when running mopidy on my desktop but it does appear to be broken on musicbox. I'm still not sure what's going wrong here.

DEBUG    2014-03-10 23:02:33,471 [2793:TuneInBackend-5] mopidy_tunein.tunein
  Using TuneIn stream url parsing
DEBUG    2014-03-10 23:02:33,478 [2793:TuneInBackend-5] mopidy_tunein.tunein
  Playlist request: http://www.bbc.co.uk/radio/listen/live/r2.asx
INFO     2014-03-10 23:02:33,509 [2793:TuneInBackend-5] requests.packages.urllib3.connectionpool
  Starting new HTTP connection (1): www.bbc.co.uk
DEBUG    2014-03-10 23:02:33,755 [2793:TuneInBackend-5] requests.packages.urllib3.connectionpool
  "GET /radio/listen/live/r2.asx HTTP/1.1" 200 None
WARNING  2014-03-10 23:02:33,857 [2793:Audio-1] mopidy.audio.actor
  Setting GStreamer state to GST_STATE_PLAYING failed
WARNING  2014-03-10 23:02:33,868 [2793:Core-6] mopidy.core.tracklist
  Track is not playable: tunein:station:s24940
DEBUG    2014-03-10 23:02:33,877 [2793:Audio-1] mopidy.audio.actor
  Position query failed
DEBUG    2014-03-10 23:02:33,889 [2793:Audio-1] mopidy.audio.actor
  Position query failed
DEBUG    2014-03-10 23:02:33,909 [2793:Audio-1] mopidy.audio.actor
  Setting GStreamer state to GST_STATE_NULL is OK
DEBUG    2014-03-10 23:02:33,927 [2793:Core-6] mopidy.core.playback
  Changing state: playing -> stopped
jackrichardson commented 10 years ago

If BBC stations won't work through musicbox then could you please tell me how I can go about using your tunein plugin without going through musicbox? Apologies, I'm a complete novice when it comes to python.

kingosticks commented 10 years ago

Musicbox is just a raspbian image that's pre-configured and slightly customised. To do it yourself:

  1. Follow the instructions to download and setup mopidy on vanilla raspbian.
  2. Install pip (sudo apt-get install python-pip).
  3. Install the TuneIn extension (sudo pip install Mopidy-TuneIn).
  4. Optionally grab yourself a HTTP frontend from the selection if you want to control mopidy using a web browser.

To be honest it's considerably more effort to go down this route so only do so if you're keen. I hope to fix the problem ASAP and get BBC stations working on musicbox soon; I'm just a bit busy this week.

jackrichardson commented 10 years ago

Thanks for your explanation, makes a bit more sense now. I think I'll just wait for your fix first. Thanks for the great work, it's really appreciated.

kingosticks commented 10 years ago

OK I got to the bottom of this. The BBC streams use a different audio format ('video/x-ms-asf', I think) and the current version of musicbox doesn't have the plugin required to play them. I fixed it on my RPi by installing gstreamer0.10-plugins-bad. It should be simple enough to add this package to musicbox, @woutervanwijk what do you think?

In the meantime you can fix it for yourself by logging in via ssh and running sudo apt-get install gstreamer0.10-plugins-bad.

I'll also take a look at the possibility of using a different stream, I think there's a way to tell TuneIn that you only support certain formats. But doing this will reduce the station choice so it's undesirable.

jackrichardson commented 10 years ago

After running sudo apt-get install gstreamer0.10-plugins-bad, BBC stations still aren't working with TuneIn on Musicbox for me, but running that command has made BBC stations work with the Dirble plug-in in Musicbox, which is fine for me. Thanks for the help.

kingosticks commented 10 years ago

Well that is odd, I'll have to try another fresh install. Thanks for the feedback though and glad it's fixed it for you, even if you're not using TuneIn now. On 15 Mar 2014 17:09, "jackrichardson" notifications@github.com wrote:

After running sudo apt-get install gstreamer0.10-plugins-bad BBC stations still aren't working with TuneIn on Musicbox for me, but running that command has made BBC stations work with the Dirble plug-in in Musicbox, which is fine for me. Thanks for the help.

Reply to this email directly or view it on GitHubhttps://github.com/kingosticks/mopidy-tunein/issues/5#issuecomment-37731427 .

woutervanwijk commented 10 years ago

Could it be a location requirement of the BBC? UK only perhaps?

jackrichardson commented 10 years ago

I'm in the UK, and the BBC won't work through TuneIn, only through Dirble.

woutervanwijk commented 10 years ago

Ok, that's one off the list...

Op zondag 6 april 2014 heeft jackrichardson notifications@github.com het volgende geschreven:

I'm in the UK, and the BBC won't work through TuneIn, only through Dirble.

Reply to this email directly or view it on GitHubhttps://github.com/kingosticks/mopidy-tunein/issues/5#issuecomment-39666050 .


Met Zoek+ vind je meer www.zoekplus.nl

kingosticks commented 10 years ago

So this is what's happening

0:00:38.170081000  5736  0x244df50 INFO        GST_ERROR_SYSTEM gstelement.c:1987:gst_element_message_full:<uridecodebin3> posted warning message: No decoder available for type 'audio/x-wma, wmaversion=(int)2, bitrate=(int)128016, depth=(int)16, rate=(int)44100, channels=(int)2, block_align=(int)5945, codec_data=(buffer)008800000f00e55c0000'.
0:00:38.173925000  5736  0x244df50 WARN              decodebin2 gstdecodebin2.c:3574:gst_decode_bin_expose:<decodebin21> No suitable plugins found
0:00:38.176013000  5736  0x244df50 WARN              decodebin2 gstdecodebin2.c:3576:gst_decode_bin_expose:<decodebin21> error: no suitable plugins found
0:00:38.179734000  5736  0x244df50 INFO        GST_ERROR_SYSTEM gstelement.c:1964:gst_element_message_full:<decodebin21> posting message: Your GStreamer installation is missing a plug-in.
0:00:38.183007000  5736  0x244df50 INFO        GST_ERROR_SYSTEM gstelement.c:1987:gst_element_message_full:<decodebin21> posted error message: Your GStreamer installation is missing a plug-in.

And decoder-audio/x-wma is provided by gstreamer0.10-ffmpeg so you need to install that too. Got there in the end!

jackrichardson commented 10 years ago

That works perfectly, thanks!

kingosticks commented 10 years ago

@woutervanwijk Could you also add gstreamer0.10-ffmpeg, as well as gstreamer0.10-plugins-bad, to the base install of musicbox?

woutervanwijk commented 10 years ago

Will add it in the next beta of 0.5

kingosticks commented 10 years ago

Thanks!

kingosticks commented 10 years ago

@woutervanwijk Could you please also add gstreamer0.10-plugins-ugly please, this should fix https://github.com/kingosticks/mopidy-tunein/issues/7