LinuxMCE Forums

General => Users => Topic started by: krys on June 12, 2009, 04:06:59 pm

Title: Shoutcast Plugin
Post by: krys on June 12, 2009, 04:06:59 pm
Just wanted to post to see what stage this plugin was at. I noticed it on the last update but dont have any clue if it is ready to be used or how to use it. Any clues would be appreciated.
(I have pm'd Sambuca as I was told he might know)

Title: Re: Shoutcast Plugin
Post by: sambuca on June 14, 2009, 11:49:38 am

I've been meaning to post some information about the shoutcast plugin, but haven't got round to it yet.

Just to be clear: it may not yet work as advertised, and is only available in the 810 version. But I guess if you already run the alpha version, you might be able to handle some breakage  ;)

To use it, you need to add it to the core in the web-admin: advanced -> configuration -> devices, open the core device, select the DCERouter and click "Create child device", pick the shoutcast radio plugin template.
After adding the plugin you can change its configuration. Currently you need to edit the configuration text field in the device page. This controls what genres to load, how many stations to load per genre, and how often you want to update the list (too often, and you are banned from the shoutcast list for some time).
After this, you need to reload (or reboot, not sure if reload is enough ? ) and the plugin should be loaded.

To view and play the stations, in the orbiter go to audio and select sources. You should now have a new source named shoutcast. Select this and deselect the others. As the stations don't really have the same structure (performer-album-title) as the normal audio this is recommended. You will see the list of genres, and selecting one will display the stations contained in it.
Select a station and click play. Sometimes it takes too long to load station playlist and you will be told that you cannot play that file. Just try again and it will most often work.

Ok, this was a short description, may contain errors, and is certainly not complete. I will add this to the wiki given some time, and expand on it there.

I am open to ideas of how to present the station list. The current way certainly is not ideal. Also the configuration should be improved, perhaps with its own web-admin page.

best regard,
Title: Re: Shoutcast Plugin
Post by: hari on June 14, 2009, 11:58:55 am
Thanks for your great effort sambuca!!

br, Hari
Title: Re: Shoutcast Plugin
Post by: dlewis on June 14, 2009, 03:58:39 pm
I thought some people got this working... Their was a convo on IRC. Could one of those individuals respond?
Title: Re: Shoutcast Plugin
Post by: merkur2k on June 14, 2009, 04:07:21 pm
Yes, much thanks for this!
We managed to figure out the above steps after a bit of discussion on irc (and some help from Thom).
Once I got all that figured out, the only problem I am having is that isnt saving anything to a playlist when i try to make one for a favorite station.
Title: Re: Shoutcast Plugin
Post by: sambuca on June 14, 2009, 06:46:55 pm
Hi merkur2k,

I haven't tried to save stations to a playlist, but there are three things that come to mind:
1) The station URLs are http://, I don't think the media plugin handles that correctly. That might have something to do with it.
2) The station is not stored in the media database, it currently only keeps the stations in memory(as I assume reloads are not frequent in a production installation and station data may change over time). This may also keep the save playlist from working, as I remember to have seen the playlist referencing the media items in database.
3) When playing a station, the station tune-in playlist is fetched from shoutcast and the individual stream URLs are added to the current playing list. For a stored list of (favorite) stations, one should ideally store the tune-in playlist, and not the streams themselves, as these may change over time, while the tune-in URL does not (to my understanding at least).

Maybe someone more familiar with the media handling can comment more on 1 and 2?

I have been thinking about some way of storing favorite stations, but haven't decided on how yet. Suppose it depends how the stations and genres themselves should be presented. In the current version, I guess a "Favorites" genre could be a good solution.

For those that have tried it out, let me know what you think so far.

best regards,
Title: Re: Shoutcast Plugin
Post by: Marie.O on June 14, 2009, 08:36:36 pm

tried it, and like it :)

Whenever I find a feed that I like, I just go and save it as a playlist.

One thing: It does not work with my Squeezebox, i.e. I can't play on the Squeezebox any of the selected playlists.
Title: Re: Shoutcast Plugin
Post by: tschak909 on June 14, 2009, 08:39:32 pm
I think we need to do one of two things:

(1) pick one entry from the playlist and use that in the deque
(2) make a proxy.php in the web folder that picks an entry and shoves it back to us.

I think we opt for option #1.

If we do this, we'll be able to select feeds from the audio page, and save them as a playlist.

Title: Re: Shoutcast Plugin
Post by: krys on June 15, 2009, 02:59:45 pm
I have been to busy all weekend to play with this much, but I did get it working on Friday. The only issue I see with functionality is that there are a number of stations that present an error. Something like "there is no device in the current area capable of playing this". I know the station is working because I verified it on the shoutcast site.

Thanks for the great effort, this is going to be very cool once its all pieced together.

Title: Re: Shoutcast Plugin
Post by: sambuca on June 15, 2009, 08:37:41 pm

Yes, I encounter that error sometimes myself. I think it takes too long to download the playlist from shoutcast, and it eventually drops out with that error. Haven't looked any more into it.

Are you saying that you can save the station playlist? from what merkur2k wrote, it seems he cannot do that..

best regards,
Title: Re: Shoutcast Plugin
Post by: merkur2k on June 15, 2009, 10:07:30 pm
When i get that error it is immediate, there is no lag between pressing the "play" button and having that error come up. And now its doing it for a station that played just fine yesterday.
Title: Re: Shoutcast Plugin
Post by: merkur2k on June 15, 2009, 10:15:48 pm
and of course after i tried like 5 times it worked...
Title: Re: Shoutcast Plugin
Post by: pga57 on July 24, 2009, 02:03:17 pm
Hello Sambuca,

Is there a reason why the station genre are note displayed on an (external) orbiter ?
I try it on a N810 and a Webdt366 and it give me nothing when I select the shoutcast option (UI1)
It work with the orbiter from the PC media director.


Title: Re: Shoutcast Plugin
Post by: sambuca on July 26, 2009, 08:19:48 pm
Hello Philippe

No, I don't see any reason that the genres should not be displayed on those orbiters.
You don't say, but you should deselect all other sources besides shoutcast, otherwise it may be hard to see any change to the list.

best regards,
Title: Re: Shoutcast Plugin
Post by: pga57 on July 27, 2009, 06:14:16 pm
Humm... I have now the genres displayed on the webdt but still nothing on the N810. :-(
Very strange.

Best regards,
Title: Re: Shoutcast Plugin
Post by: pga57 on July 27, 2009, 06:30:15 pm
and I deselect all other sources besides shoutcast....
Title: Re: Shoutcast Plugin
Post by: jimbodude on July 29, 2009, 07:57:56 pm
I just tried this last night - great work!

Here's how it went down:
1) I added the Shoutcast Plug-In device to DCE Router
-) This caused a software download notification to appear on the Orbiter
-) When complete, I was instructed to reload the router
2) The Shoutcast source did not show up on my DT360
-) The Orbiter binary on the device is clearly too far out of date
3) After a regen, the Shoutcast source was available on the web orbiter
4) The station list loaded (I didn't go through any configuration), though it took a bit
-) It would be great to have some sort of status indication - does the list load show up in Pending Tasks or elsewhere?  MythTV Plug-in sends a notification to all orbiter screens when all the TV guide data is downloaded - maybe this would be appropriate?
5) The Genres were then available for browsing
-) Even though I was in "Title" sort, I was still seeing genres... is this normal? is this correct?  Radio stations don't exactly fit the same attribute structure as single songs, so this might be tricky...
6) I selected a station, and hit play
7) A warning about no device being available to play the media popped up
8) I repeated 6 + 7 about 7 or 8 times
9) Music started playing
10) Future station selections did not display the warning

Overall, I'd say it went pretty well. Thanks for your contribution!
Title: Re: Shoutcast Plugin
Post by: sambuca on August 04, 2009, 10:42:59 am
Hi jimbodude,

Glad you liked it.

4) At this time, there is no status indication for genre updates, but I like your suggestion of having it in the pending tasks. At least the first updates. Later ones would be run at regular intervals and we don't want it to display a pending task each time.
 Another possibility would be to send a notification when the update has finished. Or maybe both?

5) This is normal, and as you say, it is because radio stations don't fit the normal browsing pattern (Radio stations don't have a performer, or at least it will change over time, and you probably would have a hard time finding your station if you had to search by performer  ;) )
In my mind the Genre -> station structure is the most suitable for finding the station you are looking for, but this doesn't fit the file browser. The current solution contains at least one piece of duct-tape  ;)
I'm open to suggestions...

6, 7)
Yes, this happens sometimes. It will happen if the station you selected takes too long to download its playlist. We might adjust the timeout when downloading these playlists, although it seems to work after a few tries so I don't know if it's that big a deal..

Title: Re: Shoutcast Plugin
Post by: jimbodude on August 04, 2009, 10:49:05 pm
I'm assuming the station list isn't being stored to the database yet, correct?  Are there plans in the works to do this?  If so, I would expect a notification on the orbiter after the first update is complete, and I would expect all list update tasks to be visible somewhere - most likely pending tasks.  From what I remember, the Myth guide data update does something similar to this by using a little wrapper script around mythfilldatabase.

I agree that internet radio doesn't fit the current browsing pattern.  I'm not sure what the correct answer is - duct tape is holding well until someone finds the right way.  Searching by who is currently performing on all stations would be a neat trick, but probably pretty difficult to get working reliably, and not terribly useful.

Having to reopen the stream several times is annoying, and really the only "problem" that I saw.  If the main issue is a timeout, then I would say it needs to be increased or a more creative way to avoid the failure could be possible.  Some user feedback while the download and initial buffering is going on would be awesome - "Downloading playlist, click to cancel", "Buffering... click to cancel" are the two pop-ups that come to mind.

Great work so far.
Title: Re: Shoutcast Plugin
Post by: rperre on September 07, 2010, 05:46:22 am
Sorry to pull this up from long long ago, but does anybody have this working atm?

I deselect sources, but no shoutcast option for me, not on the onscreen orbiter and no on the DT366.

Regen all orbiters, what else can i try?

Title: Re: Shoutcast Plugin
Post by: tschak909 on September 07, 2010, 05:54:01 am
I'll add a wizard install for this feature in the next day or so....

In the mean time, did you add the shoutcast plugin as a child of DCERouter? If you've done this, and regenerated orbiters, there should be a Shoutcast Media source when selecting something in Audio.

Title: Re: Shoutcast Plugin
Post by: rperre on September 07, 2010, 06:02:02 am
it is the child of DCErouter, but no shoutcast source is available

Title: Re: Shoutcast Plugin
Post by: tschak909 on September 07, 2010, 06:03:51 am
Title: Re: Shoutcast Plugin
Post by: bongowongo on September 07, 2010, 04:18:48 pm
Added the shoutcast plugin as in the wiki, no downloads appeared as of yet.