Finally got my MP3 music player "StreamStar" packaged up on Android Market and it's now available for installation on Android based devices. Its purpose is to allow progressive streaming of your home music collection (MP3 files) using a web server set up for directory browsing. I've successfully done this myself using a DNS-321 NAS device running lighttpd and also successfully tested using IIS. Since it's not wise to expose your entire music collection to the online world, you'll probably want to tunnel the HTTP connection over SSH and use an obscure port for added security. Being my first Android app and coming from the VB.Net world (i.e. Java noob), there are bound to be some bugs so expect to see a force close (FC) or two. But it does work nicely once you get things set up correctly on the server side.
Since this is the first public beta release, the app will self-terminate when executed on or after 9/1/2010 (I should have newer versions available by then.)
Sunday, July 11, 2010
Saturday, June 5, 2010
Is America Falling Off the Flat Earth?
A great read about the future (or lack) of science and engineering in the USA:
http://www.nap.edu/catalog.php?record_id=12021
http://www.nap.edu/catalog.php?record_id=12021
Wednesday, April 21, 2010
Using VLC to stream MP3 audio to a SHOUTcast server
My wife is a singer on SecondLife (her avatar name is iCandy Overland). In order to stream music semi-professionally, she's got a Shure wireless microphone and an MP3 player hooked into a Behringer mixer. The mixer is plugged into the line-in on her Windows PC. An audio encoder is used (in this case, VLC) to encode and stream the music as MP3 to a SHOUTcast server which is then played at venues within SecondLife.
I set all this up a long time ago and it worked great, until I decided to upgrade VLC to the latest version (1.0.5). Once I did that, I could no longer get the stream to connect to the SHOUTcast server to save my life. I eventually had to restore a backup of her PC into a virtual machine and copy over the VLC preferences located under %APPDATA%. I'm now writing this blog entry to save others (and myself) from making the same mistakes again.
First off, when it wasn't working, this is the error I was seeing in VLC:
access_output_shout warning: failed to connect using 'icy' (shoutcast) protocol
I set all this up a long time ago and it worked great, until I decided to upgrade VLC to the latest version (1.0.5). Once I did that, I could no longer get the stream to connect to the SHOUTcast server to save my life. I eventually had to restore a backup of her PC into a virtual machine and copy over the VLC preferences located under %APPDATA%. I'm now writing this blog entry to save others (and myself) from making the same mistakes again.
First off, when it wasn't working, this is the error I was seeing in VLC:
access_output_shout warning: failed to connect using 'icy' (shoutcast) protocol
access_output_shout warning: failed to connect using 'http' (icecast 2.x) protocol
access_output_shout warning: unable to establish connection, retrying...
I later found out that my first mistake was adding "http://" to the beginning of the server URL when configuring the Icecast destination in the VLC Stream Output GUI. My second mistake was not checking the "Stream MP3" checkbox in the VLC Preferences for Shoutcast. Once I corrected both of those mistakes, the stream worked again.
So here are the basic steps. This is for VLC 1.0.5:
1) In VLC, click "Tools" and then "Preferences".
2) Under "Show settings" select "All".
3) Select "Stream output" -> "Access output" -> "Shoutcast".
4) Enter whatever stream info you want here but make sure to check "Stream MP3":
5) Save the settings.
6) In VLC, select "Media" and then "Stream...".
7) Pick whatever you're going to stream (in my case Line In, located under the Capture Device tab) then click "Stream":
8) Source should be "dshow://" so click "Next".
9) Select "IceCast" for new destination and then click "Add".
10) Enter the server address WITHOUT preceding it with "http://" (e.g. "lema-awards.ipr365.com").
11) Enter your server port.
12) Not sure if it's necessary, but I always enter something for "Mount Point".
13) Again, not sure if the login name is necessary, but I enter both a login and password for "Login:pass".
14) Check "Activate Transcoding" and select "Audio - MP3" for "Profile".
15) Click "Stream".
If all goes well you should now be successfully streaming to the SHOUTcast server. Note that if you want something less than a 128Kbps stream you'll need to adjust your MP3 encoder settings in VLC as it appears that's the default.
7/24/2012 Update:
I decided to upgrade VLC to the latest current version (2.0.2) but ran into another issue: the stream was constantly skipping and stuttering like a badly scratched record. After much experimentation, I eventually stumbled across the "Stream output muxer caching (ms)" setting and changed it from 1500ms to 0ms (found under "Stream output" in step #3 above). This appears to have solved the skipping problem.
I also figured out how to create a desktop shortcut to start the stream immediately:
I later found out that my first mistake was adding "http://" to the beginning of the server URL when configuring the Icecast destination in the VLC Stream Output GUI. My second mistake was not checking the "Stream MP3" checkbox in the VLC Preferences for Shoutcast. Once I corrected both of those mistakes, the stream worked again.
So here are the basic steps. This is for VLC 1.0.5:
1) In VLC, click "Tools" and then "Preferences".
2) Under "Show settings" select "All".
3) Select "Stream output" -> "Access output" -> "Shoutcast".
4) Enter whatever stream info you want here but make sure to check "Stream MP3":
![]() |
| VLC Shoutcast Preferences |
5) Save the settings.
6) In VLC, select "Media" and then "Stream...".
7) Pick whatever you're going to stream (in my case Line In, located under the Capture Device tab) then click "Stream":
![]() |
| Capture Device |
8) Source should be "dshow://" so click "Next".
9) Select "IceCast" for new destination and then click "Add".
10) Enter the server address WITHOUT preceding it with "http://" (e.g. "lema-awards.ipr365.com").
11) Enter your server port.
12) Not sure if it's necessary, but I always enter something for "Mount Point".
13) Again, not sure if the login name is necessary, but I enter both a login and password for "Login:pass".
14) Check "Activate Transcoding" and select "Audio - MP3" for "Profile".
![]() |
| Stream Destination |
15) Click "Stream".
If all goes well you should now be successfully streaming to the SHOUTcast server. Note that if you want something less than a 128Kbps stream you'll need to adjust your MP3 encoder settings in VLC as it appears that's the default.
7/24/2012 Update:
I decided to upgrade VLC to the latest current version (2.0.2) but ran into another issue: the stream was constantly skipping and stuttering like a badly scratched record. After much experimentation, I eventually stumbled across the "Stream output muxer caching (ms)" setting and changed it from 1500ms to 0ms (found under "Stream output" in step #3 above). This appears to have solved the skipping problem.
I also figured out how to create a desktop shortcut to start the stream immediately:
"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// --sout="#transcode{vcodec=
none,acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=shout,mux=ogg,dst=icandy:password@lema-awards.ipr365.com:1234/icandy}" --sout-keep
Sunday, April 4, 2010
The Apple II disk transfers have started
Man... I sure hope this effort is appreciated by someone! It's taking many hours to transfer hundreds of 5.25" floppy disks over to my Windows laptop. Doesn't help that I didn't organize some of the disks very well, especially my backups. But I've already found lots of games and utilities that don't currently exist on the Asimov FTP site. Or at least I couldn't find them there (some files aren't named very well.) I'll be uploading those as time permits. I figure if nothing else I'm preserving computer history as I may very well be the only person left who has some of these titles! I mean, who else kept a copy of Telechess? I even have original copies of Ultima III, Flight Sim II, and a few others. Not to mention lots of software I wrote myself, including a virus I coded in assembly (it was never released into the wild.)
Was also able to image over my Sider ][ HD but I can't get my BBS software to run successfully in AppleWin because it doesn't emulate a Thunderclock time card (yet). And I don't really feel like hacking the ACOS code I wrote 20 years ago.
Was also able to image over my Sider ][ HD but I can't get my BBS software to run successfully in AppleWin because it doesn't emulate a Thunderclock time card (yet). And I don't really feel like hacking the ACOS code I wrote 20 years ago.
-DC-
Sunday, March 28, 2010
The mind is an amazing thing
I'm sitting here playing with an Apple IIgs emulator on my PC and I actually remembered the command to boot a disk from the monitor prompt (type the slot # and press Ctrl-P). That's something I haven't done or even thought about in over 20 years! Amazing.
(Then again, I still remember CALL -151 and 3D0G too).
(Then again, I still remember CALL -151 and 3D0G too).
Friday, March 26, 2010
Reviving my Apple //e
For a long time I've known that there are utilities available to archive old Apple II disks onto the PC but never got around to actually doing it. I still have boxes full of 5.25" disks containing all kinds of pirated games and other apps (warez) that I painstakingly collected back in the 80's when I ran the Shooting Star BBS. I also still have my Sider ][ 20MB (yes that's MEGAbyte not GIGAbyte) hard drive containing all my heavily modified BBS code. Recently I was contacted by one of my old users (not as infrequent as you might think) who got me interested in pursuing this again. So I dug out the //e and powered it up. Last time I tried this I couldn't get any 5.25" disks to boot but this time everything worked! I was even able to run AppleWorks and open some old high school homework files. So now I just need a USB-to-serial adapter and I'll be in business using ADTPro. Not really looking forward to 9600 baud serial disk transfers though...
PS: For those who are interested, you can run lots of old Apple II games in your browser for free (just in case you really miss those low-res graphics).
-DC-
PS: For those who are interested, you can run lots of old Apple II games in your browser for free (just in case you really miss those low-res graphics).
Tuesday, March 23, 2010
I've written a streaming MP3 player for Android
It's probably been done and I just couldn't find it, but after I got my Droid I really wanted a way to traverse and play my home MP3 (and OGG) music collection. So I decided I'd write my own app. It would be a good project for me since I'm a long-time VB programmer looking to learn more Java.
At this point, I've got a working beta version that I'm pretty happy with. I was hoping I could use ConnectBot to make a secure authenticated connection to my home server, but my app kept crashing when using it (socket connection issues--need to work on this later). I set up a Lighthttp web server on my DNS-321, where all my music resides, and connected using HTTP (I've got other servers running at home and already use DDNS so this was relatively painless.) The app allows me to traverse all my MP3 files and folders that are on my DNS-321 via a spinner, and I'm able to pick a file/folder for playback. The cool thing is that the MediaPlayer object I'm using, which comes with Android, actually streams MP3 files over HTTP so the playback starts right away. Unfortunately, even though OGG files are supported with this player, they won't stream (boo Google!) So now I'm having to convert most of my music from OGG to MP3, although I plan to implement a pre-download feature for OGG files later. My PS3 doesn't play OGG either so it makes some sense to switch, even though I think OGG is superior to MP3 for several reasons.
If anyone is interested in trying out the beta version of my player (named StreamStar), let me know. I'd like to get some feedback before making it available in the Market. Plenty of bugs remain since programming Android is fairly complex and not nearly as easy as writing a simple desktop app! Not to mention being somewhat new to Java.
PS: I plan to eventually revise the code so that nearly any web server could be used, not just Lighthttp.
At this point, I've got a working beta version that I'm pretty happy with. I was hoping I could use ConnectBot to make a secure authenticated connection to my home server, but my app kept crashing when using it (socket connection issues--need to work on this later). I set up a Lighthttp web server on my DNS-321, where all my music resides, and connected using HTTP (I've got other servers running at home and already use DDNS so this was relatively painless.) The app allows me to traverse all my MP3 files and folders that are on my DNS-321 via a spinner, and I'm able to pick a file/folder for playback. The cool thing is that the MediaPlayer object I'm using, which comes with Android, actually streams MP3 files over HTTP so the playback starts right away. Unfortunately, even though OGG files are supported with this player, they won't stream (boo Google!) So now I'm having to convert most of my music from OGG to MP3, although I plan to implement a pre-download feature for OGG files later. My PS3 doesn't play OGG either so it makes some sense to switch, even though I think OGG is superior to MP3 for several reasons.
If anyone is interested in trying out the beta version of my player (named StreamStar), let me know. I'd like to get some feedback before making it available in the Market. Plenty of bugs remain since programming Android is fairly complex and not nearly as easy as writing a simple desktop app! Not to mention being somewhat new to Java.
PS: I plan to eventually revise the code so that nearly any web server could be used, not just Lighthttp.
Subscribe to:
Posts (Atom)


