Update: Zach Callear has published a complete shoutcast player in flash without memory leaks. I haven’t tested it yet but it should works in the wii browser.
Update: Now it’s needed only a shoutcast server, I’m working on removing the web server too
I own a Wii!
And I’m playing more with the opera browser+flash than with Zelda…
My first experiment is to stream music from the pc to the Wii.
So here a quick how to:
Note: I’ve encountered some problems because of a weird bug in the flash Sound object, witch I’ll explain in the next post. Update: here the post.
There are still some imperceptible “glitches” every two minutes, but the overall quality is good.
Notice that the player hasn’t any interface yet and its required to run three(!) servers. In the next days I’ll try to improve those things.
Requirements
You need:
- a Wii
- Winamp
- Winamp Shoutcast plugin
- Shoutcast server
- A web server that run on the same computer
- A flash movie that play music without memory leaks
It is possible to swap every item in the list with a Mac/Linux alternative, I’ll leave it to google.
The server(s)
Download and install the SHOUTcast server.
In sc_serv.ini change the password and make it private:
Password=changeme PublicServer=never
Now start the server.
This has to run on the same machine of the webserver due to the security restrictions of the flash player.
We need two servers because flash refuse to open another connection to the same server. (And we need to do that to avoid memory leaks)
Stream
Download and install the Shoutcast winamp plugin.
Start winamp.
Select Options->Preferences->DSP/Effect->Nullsoft SHOUTcast Source DSP
and put the new password and the server port (8000 by default)
Now the music you listen will be streamed to the shoutcast servers.
The player
Now, get the swf player:
Shoutcast stream flash player
It hasn’t any interface yet, I’ll do that in the next days.
Put the swf in your web server and pass your ip as a flashVar in wiinamp.html:
<object> <param name="movie" value="stream.swf" /> <param NAME=FlashVars VALUE="stream1=http://192.168.1.33:8000/" /> <embed src="stream.swf" FlashVars="stream1=http://192.168.1.33:8000/" /> </object>
8000
and 8002
are the ports of8000
is the port of the stream servers.
Listen
In the Wii Internet Channel open http://*yourip*/wiinamp.html and relax 🙂
To Do
- An interface for the player
- try Icecast to get rid of the second server and the webserver (for now it made flash unstable)
Pingback: Madarco DevBlog » Blog Archive » Memory leaks playing Shoutcast/Icecast streams in Flash
Could you make a file browser and then have that add to a playlist in a database and then have a winamp plugin that refreshes the winamp playlist from the same database the web server posts into.
Hi shizza,
try http://ajaxamp.com/ (manage winamp from a web browser) or SlimServer: http://www.slimdevices.com/su_downloads.html (manage your collection from the web, works with itunes too)
Hi,
I love you app, I find it especially useful to turn my wii into a web radio turner like Radio Paradise or Groove Salad.
So: do you plan to develop it further (adding a gui to choose a stream, playlist support…)? Is it open source? I would like to ask Radio Paradise to put a page on their website with your app, would it be ok with you?
Bye, and thanks again for wiinamp,
Emme
Hi,
Thanks for the appreciation 🙂
You can do whatever you want with the code, it’s public-domain. (just let me know because I’m curious!)
However, I’ve quit developing it because the solution I’ve used suffered of small audio glitches when the two tracks cross fade.
The best solution will be to use a Flash Media Server. (last.fm use it)
There is an open source equivalent of FMS: red5.
However, it isn’t pluggable with winamp like a shoutcast server, maybe you can submit a feature request to the dev team of red5.
Marco.
Pingback: Madarco DevBlog » Blog Archive » haxeVideo
Hey, I’ve been trying to figure out how to use a streaming swf in a browser for awhile, but I can’t open up your .fla to see the source code- I get the error “Unexpected file format.” Could you post the source AS?
Strange, maybe the fla got corrupted?
I can’t check it now, I’ll try it at home.
In the meantime, the code is explained here: http://www.madarco.net/44/memory-leaks-playing-shoutcasticecast-streams-in-flash/