Rabu, 25 Januari 2012

Stream Your Music Online

Stream Your Music Online

From Wired How-To Wiki

Jump to: navigation, search
Vintage radio photo by monogatari via Flickr
Vintage radio photo by monogatari via Flickr
You've spent a lot of time and money collecting digital music. And by now, you have a pretty sweet library of MP3s and AACs to show for the effort.
But let's say you want to take that library to go? Before you start carrying around a huge hard drive, you might want to try streaming your tunes online instead. All it takes to start streaming your music over the internet is a playlist, a server with some storage space, and a software player that can open and play an internet stream.
This article is a wiki. Got extra advice? Log in and add it.


Contents

[hide]

Step 1: Host it somewhere

Most web hosts offer data plans around $10 per month that come with plenty of storage and bandwidth to hold and serve your music. The rates get steeper once you want to store more than 200 or 300 gigabytes. Also, when you're streaming, you're paying for bandwidth. So, if you're looking to share your collection with your friends as a stream, you'll have to monitor your usage more closely or else end up paying through the nose.
Besides the cost, you trade off a good deal of control over the data because it resides on some machine out there in the ether.
Hosting music on your own computer using a broadband connection is a preferable option, especially since you know exactly where it is and there's is no need to transfer your music anywhere. However, unless you have a static IP address, finding your computer (and your music) in the vast expanse of the internet can be a hassle. If your network provider keeps changing your IP address on you, try setting up Dynamic DNS using a service like DynDNS.
Tip: Webmonkey.com has an excellent introduction to using Dynamic DNS.
Tip: Dan Hilgert also has an explanation of his Dynamic DNS setup and streaming music guide.

Step 2: Create a playlist

Perhaps the easiest way to get your music online is to use your favorite music player. Most music players, including iTunes, Windows Media Player and WinAmp all use common playlist formats to play music online.
A playlist contains the names and location of your music files. It is downloaded and used by your media player to play the music files as a stream. It works pretty well, although the music players don't allow skipping, fast forwarding or rewinding.
The most-used music file formats are MP3, Windows Media Player's WMA and Apple's mp4 (also known as AAC). We recommend using only these player files for universality. If you're not sure which format to use, we'd recommend you default to MP3 to ensure the ultimate in compatibility.


Extended M3U

The easiest and most reliable method for streaming is to use M3U playlist files in conjunction with iTunes or Windows Media Player. Open a streaming URL by pressing Control-U (or Command-U for Mac) in either program.
An extended M3U file format looks like this:
#EXTM3U

#EXTINF:Birds In The Belly http://www.soundsofarcadio.com/mp3/BirdsintheBelly.mp3

#EXTINF:Hock It Like You Own It http://www.soundsofarcadio.com/mp3/HockItLikeYouOwnIt.mp3

#EXTINF:Kid I Know http://www.soundsofarcadio.com/mp3/AKidIKnow.mp3

You can follow the format shown above. Open the code up in a text editor and just paste in your own song info and URLs. When you're done building your list, save the result as a .m3u file and open it up in your player.
If you're a Windows user, you can download M3U Creator. The free desktop application will let you create and edit .m3u playlists in an easy-to-use interface.

XSPF

Another common playlist format is XSPF (pronounced "spiff"). This method is more practical for streaming music via a web page or Flash-based players, though many third-party applications support XSPF. For example, Yahoo Music Jukebox uses XSPF as its default playlist format.
The XSPF format is below. Note the "L" in "trackList" needs to be capitalized for it to be recognized by players.
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
     <trackList>

       <track>
         <location>http://www.soundsofarcadio.com/mp3/BirdsintheBelly.mp3</location>
         <creator>Arcadio</creator>
         <album>Early Demo</album>
         <title>Birds in the Belly</title>
       </track>

       <track>
         <location>http://www.soundsofarcadio.com/mp3/HockItLikeYouOwnIt.mp3</location>
         <creator>Arcadio</creator>
         <album>Early Demo</album>
         <title>Hock It Like You Own It</title>
       </track>

       <track>
         <location>http://www.soundsofarcadio.com/mp3/AKidIKnow.mp3</location>
         <creator>Arcadio</creator>
         <album>Early Demo</album>
         <title>A Kid I Know</title>
       </track>

     </trackList>
</playlist>


Again, to make your own playlist file, just copy this code into a text editor, change the song info and the URLs, and save the results with the extension .xspf.
For a list of players and uses for XSPF files, visit the XSPF applications page. Included in the list is an M3U to XSPF file converter and some command line tools used to generate XSPF files from various music libraries online.
There are also some handy validation tools to make sure your spiffs are well-formed.

PLS

The PLS format is another streaming playlist option, and used mostly by professional online radio broadcasts. You'll find a good deal of PLS-streaming music stations on Shoutcast.
The PLS file format looks like this:
[playlist]
NumberOfEntries=3

File1=http://www.soundsofarcadio.com/mp3/BirdsintheBelly.mp3
Title1=Birds in the Belly
Length1=-1

File2=http://www.soundsofarcadio.com/mp3/HockItLikeYouOwnIt.mp3
Title2=Hock It Like You Own It
Length2=-1

File3=http://www.soundsofarcadio.com/mp3/AKidIKnow.mp3
Title3=A Kid I Know
Length3=-1

Version=2


Length refers to the length of the song. Use -1 to have the music player ignore it entirely.

Download Software to Do It For You

Icecast is an open source music broadcasting solution. The player is available for Windows or Linux. If you are uploading your tracks to a web host, and depending on how accommodating your web host is, you might find Icecast the perfect solution for setting up your internet radio station.
Otherwise, you might want to give Shoutcast's broadcasting tools a try. Shoutcast's tools are extensions built on the Windows-only WinAmp music player, but some broadcasting tools for Mac and Linux are also available.
If you already have WinAmp, Spacial Audio Solutions offers a plugin to turn it into an internet radio station. Spacial also has software for the enthusiastic amateur and professional: SimpleCast and SAM Broadcaster.
iRadeo is a free streaming audio platform that allows anyone to start an online radio station. Once installed, iRadeo will automatically detect and stream any MP3 or WAV file formats that has been uploaded to the specified directory.
Finally, Peercast provides both direct and P2P streaming at the same time, allowing you to stream music online anonymously.

Don't Feed the Lawyers

You could be fined for broadcasting music you don't own the copyright to, and in most cases the penalties are pretty severe. There are also plenty of rabid music industry lawyers with a history of going to great lengths to prosecute copyright violators. That said, be careful how you distribute your streams.
Some of the software solutions listed here have built-in password protection. Otherwise, you'll have to know some SSL and/or password protection web hosting configurations to lock down your stream.
Your other option -- and probably the safest -- is to just keep your station under wraps. You can listen to it freely, but don't go spreading the word. Remember, the internet has ears!

This page was last modified 18:43, 3 July 2009 by hacknskate. Based on work by dnynumberone, iradeo, dhilgert, kdardis, snackfight and howto_admin.

http://howto.wired.com/wiki/Stream_Your_Music_Online

Tidak ada komentar:

Posting Komentar