Wednesday, October 22, 2008

Shoutcast Bug In Streamtuner

So last week I fired up Streamtuner. It's been awhile since I have used it to listen to online music now that I have been using Songbird, so I was a bit upset when I couldn't get any listings for the Shoutcast feed.
At first I thought there was a glitch with their server but after a few days of checking it, I found it was still not working.
So I went digging.

Turns out that Shoutcast changed their website. The old Streamtuner plug-in doesn't work with the new design. What needed to be done was to fire up a hex editor and update the plug-in. But not an update that would use their new site feed. Nope! That would require a full rewrite of the plug-in code.

What I did was to find the Shoutcast address in the plug-in and change it to the new address that points to the old site that Shoutcast is maintaining.

Here's what you need to do in order to fix the Shoutcast plug-in.
Fire up your favorite hex editor and use it to open up the plug-in found in usr/lib/streamtuner/plugins.
Now search for the two instances of and replace them with making sure you keep the spacing sane.
Now save it back into your folder.
Open up Streamtuner and go to the Shoutcast tab. You should now see your listings. If your don't just click on the Reload button.

For those of you who are saying that you don't know how to use a hex editor, no worries.
Here is a link to the patched shoutcast plug-in.
Download Plugin

Copy the plug-in, go to usr/lib/streamtuner/plugins folder. Open it as Root. Delete the existing file and paste this patched file in to the folder.
Now open up Streamtuner, go to the Shoutcast tab and your listings should show up.

This is only a quick fix as it doesn't allow Streamtuner to access the new Shoutcast site and categories. Streamtuner itself needs to be fixed. I believe the original designer quit the project several years ago as there haven't been any updated versions. But I do believe there are some people maintaining it and hopefully they will release a newer 'fixed' version.


Thanks to Ernie for this easy fix that offers more functionality.

An alternative solution can be to edit your hosts file (/etc/hosts) and add the following line:
That overrides the ip address provided by the DNS. It fixes the issue and you can access the webpage from the browser too.

Thanks again Ernie!




John said...

Thanks for the tip. Going to give it a try now.

TaZMAn said...

Your welcome John.
It should work for you with no problems.
Let's hope someone comes along soon and rewrites Streamtuner to use the new Shoutcast plugin.

mario said...

Great! I've patched this issue changing the DNS but after the last update done by UpdateManager the problem was still there. Now it works well. Thanks a lot.

jerome said...

thanks to you for your work stream tunner is one of many reason what ive leave W**S i will try
i hope you nice continuation 8D thx!!

(sory for bad grammar °)

coplin said...

¡Muchas gracias!
Llevaba semanas rompiéndome la cabeza intentando saber qué es lo que había pasado con STREAMTUNER y Shoutcast.

Gracias y 1000 gracias

Thank you!
I have breaking my head for weeks trying to find out what had happened to STREAMTUNER and Shoutcast.

Thank you thousand thanks

TaZMAn said...

To everyone who posted a thank you all I can say is, you are very welcome.
The support for Ubuntu and Linux as a whole is what makes it all a great community.

We help each other and pass around our knowledge.

Open source is the best!

Ernie said...

Great Work! An alternative solution can be to edit your hosts file (/etc/hosts) and add the following line:
That overrides the ip address provided by the DNS. It fixes the issue and you can access the webpage from the browser too.

Long Live Open Source! Keep it up! :)

TaZMAn said...

Thanks for that great tip Ernie!

I will update this post to include your info and also credit you with it. Readers may not read these comments and miss it.

Help like this is what makes open source so great!

Anonymous said...

Thanks a lot!
The DNS-fix seems to work for VLC too.


Adam said...

Thank you so much for this advice.

I just upgraded from Mint 6 to Mint 7. Streamtuner worked great under 6 but under 7 it would consistently crash any time clicking the "Shoutcast" tab.

Here's what I did- I hope it helps other *buntu or Mint users.

1. completely uninstall streamtuner via synaptic.
2. remove any .streamtuner files (found in a user's home directory).
3. Use Synaptic to install streamtuner
4. Download the new plugin from this site, and ---
A) As root, delete the plugin, then mv the file to its proper plugin folder.
B) While still "root" user, apply the new host info to /etc/hosts file.

Very very happy with the results. Thank you so much. You are a star!

Linux user number 480776

TaZMAn said...

Hi Adam,
Glad it helped you out.
And I hope that my blog and all the helpful comments like yours will continue helping other Linux users.

Never considered myself a star. LOL!!
Just enjoy helping others get the most out of their computer.

Switching to Linux has been the best computing experience I ever had.

Enjoy and thank you for your gracious comment.

Patrick et Valérie! said...

Hey there!

f course the plugin was compiled for an ELF 32 bit system -> wont work with x64 OS :-)

Thanks anyway!

Adam said...

Hi TaZMAn -
"Never considered myself a star. LOL!!" -

well, sure, you're a star when you help lots of people out there use a program that they like (in this case Streamtuner).


Chris said...

Just another thanks!

keep up the good work

hhh said...
This comment has been removed by the author.
hhh said...

Heads up. I'm running Ubuntu Jaunty. Tunapie [ ] is another Streamripper front end and it's working out of the box for me with Audacious and Streamripper. All genres and channels listed. Adding -r to the Streamripper field in Preferences opens a relay port, so you're not downloading the stream both for your player and Streamripper. I also changed the download directory there. I installed it through Synaptic (search "tunapie"), give it a try.

hhh said...

Oh, delete your host file mod if you made one.

hhh said...

Scratch all that. Tunapie crapped out on me today, back on Streamtuner. Sorry...

TaZMAn said...

Hi hhh,

Thanks for the effort and follow up about tunapie.

I had previously tried tunapie and like you was excited. But I also experienced a crash.

I had heard that shoutcast was working in Jaunty so I was excited when I upgraded to it. Tried 2 different versions of shoutcast with no luck. Had to patch it.

I just wish someone would take over the shoutcast project and do a rewrite so it would just work.

Meanwhile I hope everyone will keep a look out for a viable and stable alternative.

Thanks again!

hhh said...

No problem, I appreciate you following up on your post long after it was posted. Yeah, I thought Tunapie was going to be the answer. To be fair, Streamtuner still works, and works damn well considering it's been dead in the water development-wise forever. Signing off.

alfredo said...

it's good for linux mint 7 too

Andrew said...

There is a ppa out there which fixes the streamtuner problems. Comment #13 at This is probably the easiest way to fix. The /etc/hosts workaround will prevent people from seeing the proper streamtuner site, so while clever, its quite hackish.

Anonymous said...

I do not know if I have left a response or not, but I suppose it will not harm to leave another saying:
Thank you so much for this! You fixed something which I so highly value and have been using for years. This program is solid gold to me, and your fix worked well for me. May you always be well!

TaZMAn said...

To Anonymous,
You are very welcome.
I appreciate the thanks I get. And I also feel that Streamtuner is a program that must be kept alive even if it's by individuals from the Linux community.
Wish I knew more about programming so I could rewrite it with all the fixes and maybe add some newer features. Instead I can only hack away at the existing code.

Glad it has helped all those who still love it.


Anonymous said...

I am very pleased to post this most excellent and updated version of streamtuner, which seems completely bug-free and improved.