Building My Internet Radio Station

Streaming services are everywhere these days. Pandora, Spotify, Google Play, YouTube, etc. – the list goes on and on. At first, I was happy just being able to tune in to Pandora and listening to what they would deliver.

Customizing the music Pandora delivers is fairly limited, and often entertaining because it introduced me to music I’d never heard before. But that’s the limitation – I couldn’t control much else. I was at the mercy of Pandora’s selections, even though I could pay a monthly fee and have some additional control. I didn’t feel paying for a music service was in my best interest, so I began to research other options.

I wanted total control of my music, and have the ability to:

  1. Listen to it anywhere as long as I was able to get internet access.
  2. Listen on any device; PC, laptop, phone, tablet, iPad, iPhone.
  3. Control the playlist and deliver content as I wanted in the order I wanted to deliver it.
  4. Have the ability to broadcast “Live”, and be able to talk over the music, or provide a narrative, much like that of a real radio station.
  5. Share my broadcast with anyone, and eventually host broadcasts with other like-minded people interested in doing a live broadcast.
  6. Be able to broadcast a live event, like a band playing a concert.

With all that in mind, I began to research options to do these things. I quickly discovered several free, open source options. The first I came across was twitch.tv — it allowed you to stream from your computer, and share it to others, but it required visitors going to twitch.tv’s site, and contained advertisements, and other panels of distraction – no good for me.

Next, I tried Airtime – a free software which provided the ability to schedule play of mp3 files, but lacked the flexibility I wanted in control. Also, no live broadcasting was possible.

Finally, after hours of research, questions in forums, and google searches, I found the solid solution – build it yourself from scratch! I dug into How-To’s and assorted StackOverflow discussions in my quest to have my own live radio show streaming on the internet. With the excitement of a 12-year old with his first Playboy mag, I started compiling the list of things I would need to have to build a basic streaming server. I created a list of ‘must-haves’ in order to achieve my objective.

  • Linux based – fast and open source operating system (free)
  • Secure, and efficient, fast and reliable.
  • Flexible and dynamic to allow for growth

So, my first step was to get a linux server. I created an AWS account, and created an EC-2 Instance running amazon-linux. I shelled in and began the build.

Shoutcast server

This link outlines the process of installing the shoutcast server.

With that done, I then set out to find a suitable client software which I could publish my stream to the shoutcast server.

Mixxx dj software

Mixxx is free ( I like that ). It does amazing things that DJ’s need to provide a great product. Excellent management of files and meta data of the tracks as well the ability to perform live broadcasts to my shoutcast server! I was thrilled to learn of it’s capabilities, and then amazed at all the wild features it has. Number one was the Auto DJ function which plays a list of songs, and gives me the ability to patch in a microphone and talk during the broadcast! After gathering up a PC, installing the software, and connecting it through a mixer, I was up and running! I now had a source to get my stream out there, and a url to connect to it. But I wasn’t done yet.

Web stream interface

In order to listen to my stream, I needed to connect to it from anywhere and from any device I wanted. I could download the m3u file and play it in iTunes, or VLC or some other app, but I wasn’t happy with that, because not everyone in the circle of friends/world knew how to handle an .m3u file. It had to be simpler than that for everyone else to access the station.

I sat down and began researching it – quickly learned the code required to connect to the stream. Here it is:

<audio id="MediaPlayer1" src="http://hawkwynd.com:8000/;" controls="controls"></audio>

 

It was the beginning of a project which would be weeks in the making. With each revision of my code, I built more and more into it. A curiosity became an obsession, and I was heads-down on my way to building my interface for a web-based streaming client! Giddy as a school-boy, I created my “wish-list” of features for my web client:

  1. Display the artist and track name on the application.
  2. Display the album and display it’s picture on the application.
  3. Display the year the album was released, and the label it was released on.
  4. Display a history of songs played in the last hour or so.
  5. Show some information about the artist/band being played to provide interactive reading for the user.
  6. Dig down deep and find some other useful tidbits of information for reading to teach users a bit of history factoids about members, etc.
  7. A way to easily share the link to social media (facebook) so others could easily join in the broadcast and spread the word of my newfound obsession.
  8. Lastly, show some ‘nerdly’ statistics, and provide a status of the stream, including who else was listening to the broadcast.
  9. Code it all in php with some jQuery to make it truly dynamic.

I figured #1 and #2 was quite the list, so I decided to ‘keep it simple’. Yeah, right. It quickly spiraled into the 9 items listed above, and the more I built, the more I wasn’t satisfied with the features! This went on night after night – I’d come home from work and jump right on the computer to pick up coding where I left off, all the while listening to my playlist (another story on how that evolved and continues to evolve another time).

After 3 weeks, I was ready to release it to a few test subjects. It was received with fair feedback, which told me I might be trying to re-invent the wheel. Why would anyone want this when they’re already using iTunes, and other shit stored on their phones, listening to their playlists? What could I offer that they don’t already have?

What indeed. I started to become despondent. Was I wasting my time?

If you build it – they will come

To this day, I continue to share, stream and once a week on Friday night, I host a live broadcast from 9pm to 1am. I remain vigilant to share the link on social media, and try to encourage my friends to listen in. Rome wasn’t built in a day. I get excited when I see 3 listeners and I’m not one of them. Some day, my little project will have a following, so I will work on honing my broadcast “radio voice” and hopefully will find a niche that will attract listeners who share in my love of find music.

http://stream.hawkwynd.com

Hope to see you online!

Building The New Site

The new installation of wordpress was a breeze, and is up and running (because you’re seeing this).  The main reason for this whole project is to have a place where I can share wordpress development strategies, helpful tips and leave myself a breadcrumb trail to look back at work I’ve performed and be able to revisit it again later. As the great Gary Hornbuckle once stated “Its called being kind to your future self.”

I’ve selected AWS as my hosting provider, and while there is so much to learn about it, I’ve learned enough to get things rolling in a secure and safe environment, as my previous hosting provider limited me to just a few tools.

So, now that the site is up, it’s time to apply some styling and design the layout, fonts, images, and all the other web developer things that require making a well rounded website which visitors can enjoy.

More soon!

Sometimes I feel as if I’m being watched…

Dr. Doolitlle