Home » 2005 » March

Monthly Archives: March 2005

The Most Versatile VoIP Provider: FREE PORTING

ISP-In-A-Box: The $500 Mac mini (Building a Streaming Audio Server, Part I)

Most of our Mac mini projects, which also work fine on any other Mac running Mac OS X v10.3, have focused on open source solutions at no cost. The reason was not so much because the technology was free (although that’s obviously a big plus for many of us) but because the open source software was the best in its class. The landscape is a little different in the streaming audio world. You can build a streaming audio server on a Mac with free tools, but they are not open source. While the quality is certainly still there, the system’s usability leaves a lot to be desired. Here’s why. There are usually three components in a streaming audio system: a player, a broadcaster, and a streaming server. The broadcaster sends MP3 files to the streaming server which handles compression for streaming and distribution of the stream to the players. Players and a streaming server are readily available on the Mac platform; however, the broadcaster component (which is open source) is limited in its functionality so we’ll propose another approach for the Mac platform.

We’re going to break down the process into its parts to simplify things for those just getting started. Today we’ll be addressing streaming audio players. Then, in Part II of our series, we’ll talk about a broadcaster and streaming audio server for your Mac mini. We’re also going to focus primarily on products which are Shoutcast-compatible since it is the free standard for streaming audio. For your own requirements, other solutions may work as well or better, and we’ll mention a couple. The bottom line is you can’t go wrong with a Shoutcast-compatible streaming audio solution, and you won’t have to worry about someone pulling the rug out from under your music project down the road (we hope).

Shoutcast is the invention of the good folks at Nullsoft that brought the world WinAmp. Nullsoft is now a subsidiary of AOL which now is part of the Time Warner empire. After joining AOL, the Nullsoft team created gnutella. AOL management shut down the gnutella project, and virtually all of the Nullsoft developers resigned. That history lesson is intended to explain the "we hope" reference in the previous paragraph. Thus far, Nullsoft’s Shoutcast streaming server remains free for the taking, and there are many open source broadcaster products which have evolved that all rely upon the Shoutcast server for streaming content distribution. Just keep in mind that both AOL and Time Warner are content aggregators, and you can rest assured that Big Brother will never let Little Brother interfere with their primary goal: making money. For another perspective on the incestuous relationship between Nullsoft and AOL, read this. Before you shed too many tears for the Nullsoft developers, keep in mind that they walked away from the table with a cool $100 million for a company whose major income producer is the WinAmp music player, the deluxe version of which sells for $14.95. And then there’s the WinAmp competition: Microsoft’s free (bundled) Windows Media Player and MusicMatch (almost free and bundled with virtually every new PC on the planet). And folks wonder why the Internet bubble burst. Do the math! So much for the politics, let’s get back to the technology.

Streaming Audio Defined. As the name implies, streaming audio means you can play a digital audio stream almost instantaneously on some type of player without waiting for an entire song to first download into the player. If you want to learn more about streaming technology, here’s a link that will tell you everything you ever wanted to know. So the first two prerequisites to make all of this work are some type of player that can handle streaming audio and a local network or Internet connection with acceptable bandwidth to the streaming audio source. In terms of quality and versatility for home use, there is no finer hardware-based player than Turtle Beach’s AudioTron. The AudioTron’s distinguishing characteristic from most other players is that it can play a collection of songs directly from a network hard disk without reliance upon any streaming audio server. It can also play Shoutcast streaming audio. And, as luck would have it, Turtle Beach has inexplicably killed the product just when streaming audio has finally hit its stride. The good news is that Turtle Beach and a throng of dedicated users still support the product with a broad range of add-on’s. And there are usually some units available on eBay if you want one.

Streaming Audio Players. There are many of other streaming audio players that can double as a server as well. Not the least of these is your trusty Mac running iTunes or a PC running WinAmp or Windows Media Player. One advantage of WinAmp is that it can also serve as a broadcaster in addition to being a great streaming audio player. In fact, if you are fortunate enough to have both a Mac and a Windows XP machine and you also have an XM Radio or a Sirius Radio with a line out jack, you can actually use WinAmp to broadcast your satellite radio content to your Shoutcast server by adding the free Shoutcast broadcasting plug-in to WinAmp. And, until last week, you could add the Output Stacker plug-in to capture Napster To Go streams to disk. Big Brother deleted out_disk.dll from the Shoutcast site but, with a bit of Googling on the file name, you can probably still find it if you are so inclined. See what we mean about the content aggregator mentality. This is basically the same technology and quality as a tape recorder from forty years ago, and now the content providers want to outlaw it. So much for fair use. Another worthy contender in the all-in-one category is the Blackbird Digital Music Player. Also in the home audio component player category are the Squeezebox which uses its own server software for your Mac and Netgear’s MP101.

Streaming Audio to Cellphones. One of the really cool uses of streaming audio is to play tunes on your cellphone from your home music collection. The Treo 650 running PocketTunes with an Internet connection such as Sprint’s PCS Vision is the perfect fit. For this to work, you obviously will have to open port 8000 on your home firewall and map the port to the IP address of your Mac. You’ll also have to enable port 8000 in your Mac’s firewall. We’ve covered all of this before if you need a refresher course. Just substitute 8000 for 80 in the discussion and follow the steps.

But, is it legal? Well, as a lawyer, I’m obliged to first tell you that this article is not a legal opinion, but a technology discussion. You’ll need to consult with your favorite lawyer to get a legal opinion. As a layman, I’d predict that your guess is about as good as mine. Building a shoutcast server certainly appears to be legal since there is a process in place to pay astronomical license fees. But. if you are shoutcasting only to listen to your own music collection yourself, it’s difficult to fathom how this differs from playing your purchased music directly on your CD player or iPod or Mac or PC. If you can legally carry your CD music collection from your home to your car to play it, then it seems reasonable to assume you could beam an album you’ve paid for from your home to your car or your cellphone. That is essentially what Apple does with its Airport Express. Of course, once you start sharing your music collection, all bets are off. A law professor would probably ask what happens when someone walks in your house and listens to your music. Are you now a music pirate? And what if they bring a tape recorder? Isn’t law school fun? Here’s an article and another one that cover a lot of the issues if you’re interested.

Having grown up in an era when kids were afraid to touch someone else’s mailbox out of fear of committing a felony, it’s more than a little disconcerting to look at today’s music landscape in the United States where the RIAA in collusion with the United States Congress has managed to turn almost half the country into felons for their music collections. My own view is that the Digital Millenium Copyright Act was enacted out of spite to prove Mark Twain was wrong when he said, "There’s no distinctively native American criminal class, except [perhaps for] Congress." And then there’s Microsoft’s illustrious CEO, Steve Ballmer, who put it so eloquently: "The most common format of music on an iPod is stolen." For a company that made its fortune on a product with more than a few "similarities" to the Mac (to which Microsoft had something akin to a source code license at the time), one might reasonably conclude that Mr. Ballmer certainly knows his subject matter. Finally, it’s worth recalling that no music was subject to federal copyright until 1971, long after the Beatles and Rolling Stones and Elton John had made their millions. Ask yourself this question: "Was there more music piracy in 1970 or today?" So we’re not quite sure all the legislating has really accomplished a lot … other than criminalizing the American public and lining the pockets of congressmen and recording industry moguls. Wink, Wink: They call them campaign contributions.

If Congress and the RIAA are serious about ending piracy, then a fresh, common sense approach seems long overdue. The new Napster To Go leasing model suggests that the RIAA is perfectly comfortable with a fee of $15 a month for an unlimited music collection. If we can all agree (1) that iPods and other music players only last for three or four years, (2) that you have to have a music player to play music, and (3) that less than one in a thousand listeners actually uses today’s Napster system, then it shouldn’t take a mathematics genius to figure out that some "Artists’ Fee" in the neighborhood of $100 could be added to the cost of every music player and, once such a player was purchased, the end user would be licensed to play any music the end user could get his or her hands on at no additional cost for as long as the music player would play. Why $100 and not $700 (the four-year cost of a Napster subscription)? If $700 is profitable for the RIAA and Napster with virtually no market share, then the basic laws of supply and demand suggest that increasing market share 1,000-fold should result in a cost reduction of at least 80% particularly where there are zero production and distribution costs in the pricing and sales model. And finally, limit payments from the Artists’ Fee fund to only those artists who distribute their music in unencrypted formats. Just my 2¢ worth.

That’s it for today. If you want to try out the product we’re going to be raving about in Part II, then download Rogue Amoeba’s Nicecast and have a blast until next week.

ISP-In-A-Box: The $500 Mac mini (HOW-TO Become A WordPress BlogMaster, Part II)

Using MySQL and PHP, we created a new WordPress blog on your Mac in our last installment. Today, we want to lock it down so that evil people don’t fill up your MySQL database tables with comments about Viagra and gambling casinos. We also want to show you a few tricks for customizing WordPress to better meet your needs and those of your readers. Comment spam has become the new cottage industry in the blog world, and it’s something you need to deal with up front, or you’ll be sorry within a few days of launching your new blog. There are some exhaustive articles on the tools that are available to assist you. But, let me save you a lot of time and disappointment. There’s one tool that really works, and it’s easy to install. My advice is simple: try my solution and look elsewhere only if you continue to see problems. Once you begin adding multiple filters, you have to worry about conflicts so, if one tool works, stick with one tool. WordPress HashCash works, period. It dynamically generates an MD5 hash each time a comment form is submitted. This effectively kills spambots dead in their tracks. If you want to read more about how it works, here’s the link that tells all. The hardest part is getting HashCash downloaded, but here’s how.

Downloading WordPress HashCash. Here’s the current link for WordPress HashCash. What used to be two files is now combined into the .php file. Read on before downloading. Because of the nature of this file, it doesn’t download in the usual way. Here are the steps to get the actual file. First, click on the link above. Then, read the information about the various versions and match the one you need to your version of WordPress. Once you select the correct link, scroll down to the bottom of the displayed web page. Next, Ctrl-Click (or right-click) on the link labeled "Plain Text." Choose Save Linked File As and provide the file names shown above to save each file to your Desktop. Using Finder, click on your local hard disk and move to the following folder: /Library/WebServer/Documents/blog/wp-content/plugins. Now click-and-drag each of the two downloaded files on your Desktop to the plugins folder. Finally, open the Admin section of WordPress: http://127.0.0.1/blog/wp-admin. Click on the Plugins tab and Activate WordPress HashCash by clicking on the appropriate link. Now you can sleep well knowing your WordPress blog is in good hands.

WordPress Beautification. WordPress 1.5 has only been in production a couple of weeks so the number of available skins (known as Themes in WordPress 1.5 lingo) to change the appearance of WordPress are not as numerous as with previous versions. But there are a number to choose from and most of them are available from Alex King’s web site. Installing them couldn’t be much easier. Go to the web site and view each of the various Themes by clicking on its name. Then click on the Download links for the Themes you like. Theme folders will be downloaded to your Desktop. Now repeat the steps shown above to navigate to /Library/WebServer/Documents/blog/wp-content/themes. Then click and drag the Themes folders on your Desktop to the themes folder for your blog. Choose the Theme you want to activate by opening the Admin section of WordPress (just as we did above). Click on the Presentation tab, and then click Select for the Theme you wish to make your default. Click View Site and your new Theme will appear for your very own blog. How simple is that?

Reader’s Choice. You may decide, as we have, that you’d like your visitors to be able to pick the Theme they prefer to read your blog. After all, the whole purpose of page layout is to enhance the viewing experience for readers, not for you. So why not make it easy for folks to choose a viewing style that is most comfortable for them. The default viewing theme gets saved as a cookie so the next time the person visits your site, they’ll see your blog in the Theme chosen on their last visit. With WordPress 1.5, implementing Theme Switching for your blog is a no-brainer. Go to boren.nu and download the Theme Switcher. This will download a file to your Desktop that will decompress into theme-switcher.php. Using the procedure we’ve used in the previous examples, click-and-drag this file into /Library/WebServer/Documents/blog/wp-content/plugins. Now open the Admin section of WordPress: http://127.0.0.1/blog/wp-admin. Click on the Plugins tab and Activate Theme Switcher by clicking on the corresponding activate link. With most of the new themes, your visitors will now get a listing from which to choose a preferred Theme to view your blog.

WordPress Configuration. There are a number of things you can control with your blog. If you haven’t figured it out already, you get to these settings using the Admin control panel of WordPress. To get you started, we’ve listed below some of the settings we use for Nerd Vittles. You may want to do other things with your blog which is perfectly fine. You always can change these settings as you get more comfortable with WordPress. But, the settings below will protect your blog from outsider control at least until you get your feet wet. As with any configuration changes, you’re better off making one or two adjustments at a time and viewing the results. Then, if something unexpected happens, it’s much easier to figure out what went wrong and fix it. Enjoy!

  • Options – GeneralUncheck both options under Membership and set your Time Zone
  • Options – ReadingChoose the number of blog entries which should appear when someone accesses your blog
  • Options – DiscussionCheck the third option only in Usual Settings; check both options in Email Me; check the first two options in Before A Comment Appears
  • Links – Manage LinksDecide which Links you want to retain and/or add to your Blogroll
  • ISP-In-A-Box: The $500 Mac mini (HOW-TO Become A WordPress BlogMaster, Part I)

    So you want to be a BlogMaster, but you want to host your blog on your very own Mac rather than paying a managed hosting service such as Blogger or TypePad. And you’ve elected to ignore our previous advice to use a hosting provider that offers MySQL database management, PHP, and blogging software as part of their feature set for free. Well, good for you! And you’re in luck because today, rejuvenated from our Spring Break cruise aboard the good ship Disney Wonder, we’re going to install the brand-new WordPress 1.5 on your Mac. This is the latest and greatest version of the blogging system that we use for Nerd Vittles which just happens to be what you’re reading now. In naming WordPress as the Web Application of the Year, ArsTechnica put it this way:


    Let’s face it. Blogs are in fashion, and why not? Vanity knows no bounds, and there are some people who actually do something productive with theirs. From the influence of blogs on the coverage of the US presidential elections to every random teenager who has problems with their partner/parent/teacher/cat, blogs are out there allowing your most intimate feelings to be shared with random people at wifi hotspots. WordPress is the most prominent rising star of weblog software, completely free and with a large and active community. Styles, plugins and hacks are readily available, with problems such as comment spamming being addressed far more rapidly than competing applications.

    We couldn’t have said it better. So let’s get started.

    Prerequisites. Before you can bring up WordPress and begin your blogging career, you first need to figure out what you want to write about. Hopefully, it will be something in which others have an interest. And with Dan Rather now retired, conservative bloggers will actually have to come up with something new to whine about. But, who cares, right? You can always change your mind tomorrow, and the next day, and the next if you install and manage your own blogging system. On the hardware and software side, you’ll need a Mac running Mac OS X v10.3, aka Panther. And you also will need to install and activate five of the applications we covered in previous sessions before you begin this installation. You’ll need the Apache Web Server, the Postfix SMTP mail server only, the MySQL database server, and PHP and PhpMyAdmin. Once you complete these tutorials, read on. Don’t attempt to install WordPress prematurely, or you’ll make a big mess, and we don’t provide mess cleanup tutorials! For a complete list of our HOW-TO articles and Mac mini resources on the Net, click here.

    Downloading WordPress. If you didn’t already know, WordPress is free for the taking, but you still have to download it from here. Just click on the Download .tar.gz link. This should download the software to your Desktop and automatically decompress it into a folder named wordpress. If you just end up with a .tar.gz file, simply double-click on it to decompress it into a folder. Now click once on the folder name and change the name of the folder to blog and press the return key. Next double-click on the folder to open it. Then double-click on wp-config-sample.php to open it with TextEdit. Look for the DB_USER line and change the word username to root. Now move down to the DB_PASSWORD line and delete the word password but leave the single quotes that were surrounding it. When you’re finished, it should show two single quotes with no spaces between them. Now press Command-S to save your changes. Close TextEdit, and then single-click on the filename wp-config-sample.php. Change the filename to wp-config.php and press the return key. Close the folder. Using Finder, click on the local hard disk, and move to the /Library/WebServer/Documents folder. Now click-and-drag the blog folder on your Desktop into the Documents folder. This will make your blog accessible at any of the following addresses: http://localhost/blog/ or http://127.0.0.1/blog/ or http://your.internal.ip.address/blog/ or http://your.Internet.ip.address/blog/ assuming you have activated the security settings set forth in our Network Security article. In addition, you can access your blog at http://yourdomain.com/blog/ if you have completed the domain registration steps outlined in our Domain Names article.

    Installing WordPress. Like many open source applications, WordPress is a PHP-driven application that stores its data in a MySQL database with numerous MySQL tables. So, in order to use WordPress, we first need to create a MySQL database named wordpress to house the data. We’ll do this using PhpMyAdmin. Open a web browser on your server and go to http://localhost/php/. At the top of the right frame is a field for Create new database for MySQL. Type wordpress in the space provided, change the collation sequence to ascii.bin, and click the Create button to create the new MySQL database. Close that browser window and open a new one. Now go to http://127.0.0.1/blog/wp-admin/install.php. The Welcome to WordPress screen will appear. Click on the First Step link. Fill in a title for your new blog and your email address, and then click Continue to Second Step. Surprise! The installation is complete. Just be sure you write down your username (admin) and the randomly generated password. We’ll change it in a minute.

    Configuring WordPress. Now click on the login link which will take you to the login screen: http://127.0.0.1/blog/wp-login.php. Type your username and password that you just wrote down. The Admin Dashboard will display with all sorts of information about WordPress. But let’s do first things first. Click on the Users tab at the top of the screen. Type in your name and any other desired extras you want to publish with your blog. Move to the two fields provided to change your password, and type your new permanent password twice. Then click the Update Profile button. Log out and back in just to be sure everything is working as it should. In a new browser window, go to http://127.0.0.1/blog/ and Voila. Welcome to Bloggerville! From your blog’s main page, you can return to the Admin program by clicking on the Admin link. You shouldn’t have to log in again assuming cookies are enabled and functioning properly on your system.

    From the Administration program, you add new articles to your blog by clicking on the Write tab. And you can View, Edit, or Delete articles by clicking on the appropriate link beside the article of interest using the Manage tab. That should be enough to get you started in your blogging career. In our next session, we’ll talk about Plugins and Templates and Themes as well as how to protect your blog from the bad guys. We’ll also go into further detail about many of the WordPress 1.5 features that have made it such a popular blogging system. Your homework is to pay a visit to Alex King’s incredible WordPress resource site. While you’re there, look through the Themes section and find a look you like for your new blog. Our personal favorite is Meadow (see inset above). We’ll walk you through installing it (or your personal favorite) in our next session. For now, get those creative juices flowing and blog your socks off!