Sign up here and you can log into the forum!

UMSP Plugin: Shoutcast

UMSP Plugin Depot, the place for sharing plugins & info about them. No requests, just plugins/code.

Re: UMSP Plugin: Shoutcast   

Postby mad_ady » Tue Dec 20, 2011 11:27 am

Yes. A shoutcast/winamp forum admin fixed the key. I will save an xml output of the categories just in case the previous problem I mentioned happens again in the future. In the mean time you can go ahead and make your changes (I won't be changing code any time soon).
User avatar
mad_ady
Developer
 
Posts: 3027
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: UMSP Plugin: Shoutcast (added Beta Tree)   

Postby PaulF » Sun Jan 01, 2012 12:50 am

I have tried several ways to do the song title on the fly using upnp-cmd and none of my attempts are very consistent.

I decided to do something useful so I added the new shoutcast api genre tree for the new year by porting some daily-podcast xpath menu code.

Happy New Year
User avatar
PaulF
Developer
 
Posts: 422
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: UMSP Plugin: Shoutcast   

Postby mad_ady » Wed Jan 04, 2012 12:46 am

@PaulF: If you are still on 1.02, you can develop a wdtvext plugin to display that information onscreen independent of UMSP. You would need to register some code to be executed when the audio playback page is loaded (can be done easily as far as I know), and then have a loop built with timers setTimeout() to read your extra data from the temporary file and display it onscreen at a different position.

The Pros:
* would do what you want

The Cons:
* limited only to firmwares with wdtvext (1.02)
* needs to be distributed as an app.bin/wdtvext plugin in order to be able to register the plugin events
User avatar
mad_ady
Developer
 
Posts: 3027
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: UMSP Plugin: Shoutcast   

Postby PaulF » Wed Jan 04, 2012 6:44 pm

Someone said they use the old shoutcast because they lose the sleep timer. The new shoutcast plugin uses the search button previously used for sleep.

I added a pseudo sleep timer(see WEC to enable). I also added some info to the playing screen. I disabled listing of the ACC+ stations until someone gets them working.

Techie report(I did reports for so many years at work that I can not stop):

I noticed that the end time in the progress bar changed depending on the stream.

I guessed the stream info was different. The HTTP headers were the same and the pls playlist, nada.

OK, maybe I could set the "duration" in the media <res> element. upnp-cmd GetPositionInfo responded that the UPNP renderer wrote "duration="" after I set it.

I tried the "size" res attribute and the end time did change, but seemed random for each stream. One stream was half of the norm so I guessed stereo vs mono ... wrong. It turned out the FW computed the end time based on the size and bit rate.

So I computed the "size" based on sleep time and bit rate. It worked great ...for awhile. Then I would get occasional random end times. It seemed to be worse for stations that had multiple streams ... wrong again, grasshopper. The answer was that the mpeg has the bitrate embedded in the stream as 4 byte frame headers. The problem is phony headers can be generated by the codec's encoder. My solution was to send one good frame header before starting the stream and voilà ! a pseudo timer.

http://www.mp3-tech.org/programmer/frame_header.html
User avatar
PaulF
Developer
 
Posts: 422
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: UMSP Plugin: Shoutcast   

Postby PaulF » Sun Jan 08, 2012 12:17 am

PaulF wrote:http://www.mp3-tech.org/programmer/frame_header.html
I had to put in a fix for slow bit rates some talk shows use that do not appear in the list on this link. I use 128 kbits/s for size and the dummy header. No encoding table needed and last played timer was fixed unintentionally. :oops:
User avatar
PaulF
Developer
 
Posts: 422
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: UMSP Plugin: Shoutcast   

Postby PaulF » Tue Jan 24, 2012 8:43 pm

mad_ady wrote:Edit: Seems something else is going on:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<response><statusCode>450</statusCode><statusText>DEV ID TIER MISMATCH</statusText><statusDetailText>DEV ID TIER MISMATCH</statusDetailText></response>


The previous error would still generate a valid response, but it was empty. Now I get this error.
I'll look into it.

Edit2: Seems like there were some API changes on friday that broke some things: http://forums.winamp.com/showthread.php?p=2826758


It is happening again. That link is now locked and new requests for a key are now referred to the Shoutcast Partner Program. You now have to be a licensed partner to get a key. Are we licensed?

http://www.shoutcast.com/partner_request_form
User avatar
PaulF
Developer
 
Posts: 422
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: UMSP Plugin: Shoutcast   

Postby mad_ady » Tue Jan 24, 2012 10:41 pm

I don't think we are... Didn't the newer official firmwares add support for Shoutcast? If they did, they must be using some valid key. All we need to do is to sniff it in the requests and add it to wdlxtv.

Can anywone with an official firmware capable of running shoutcast give us a hand?

I will look for alternatives, but so far it seems the only locked things are queries to display genres - playback of the stations seems to work (via Last played).
User avatar
mad_ady
Developer
 
Posts: 3027
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: UMSP Plugin: Shoutcast   

Postby mad_ady » Thu Feb 02, 2012 4:57 am

I keep trying to get a new key but I am unable to log in into their developer network. I keep get redirected to a page that doesn't exist...

From what I've read on their forums, they issue keys just for their partners: http://forums.winamp.com/showthread.php?t=333738

So - I think it's time for plan B...
Plan B means moving away from the API and switching to scraping. We need to get the genre list (I have it saved from the last time it failed: http://pastebin.com/cFDz1PKx), the station list (for each genre).

We can still play the stations if we have their ids (stations play fine from Last played).
An example for scraping is http://www.shoutcast.com/radio/Alternative
I reckon we can pretty much get everything...

Plan C is to move away from shoutcast and create a new plugin - for instance for xiph.org/icecast directory (http://dir.xiph.org/index.php)

So, are we on for plan B?
User avatar
mad_ady
Developer
 
Posts: 3027
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: UMSP Plugin: Shoutcast   

Postby pittie » Thu Feb 02, 2012 10:20 am

I only flashed my WD TV Live recently so I missed shoutcast while it was still working.

I've downloaded the pls file for the radio station I want to listen to and should get all the info from in there.

Does anyone have a sample file to a 'Last played' radio station and the folder that it is in? I don't know if it just goes into "/tmp/umsp-plugins/shoutcast".

Many Thanks!
pittie
n00b
 
Posts: 1
Joined: Thu Feb 02, 2012 9:59 am

Re: UMSP Plugin: Shoutcast   

Postby mad_ady » Thu Feb 02, 2012 11:22 am

You can use the last played feature if you know the station ids you want to listen to by running the command below:

Code: Select all
config_tool -c SHOUTCAST_LAST_PLAYED='1628913,181fm - The Mix Channel 70s  80|2087118,Abacusfm Vintage Jazz - a SHOUT|2063729,Acoustic Alternative - Acoustic|1280831,80s I streamed by pop-streamde '
config_tool -c SHOUTCAST_NUMBER_OF_STATIONS='4'


You can add a pipe (|) delimited list of station id (e.g. 1628913) and title/description (e.g. 181fm - The Mix Channel 70s 80) separated by commas.

You will then be able to go to Video -> Media Servers -> UMSP -> Shoutcast -> Last played -> 181fm - The Mix Channel 70s 80

You can get the station ids from the shoutcast website.

This is a temporary workaround. I expect we will fix this plugin soon.
User avatar
mad_ady
Developer
 
Posts: 3027
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

PreviousNext

Return to UMSP Plugins

Who is online

Users browsing this forum: No registered users and 1 guest