Streaming Audio
From MtdWiki
| Table of contents |
Streaming Audio HOWTO
This is a quick guide on how to streaming audio on mt-daapd. This guide assumes you are using 0.2.1 final, or cvs snapshots after 2004-11-04.
Overview
Each radio station is set up in a separate text file with an extension of .url. The reason I chose to set it up this way rather than using either http:// paths to a .pls file or the .pls file itself is that by using a separate type of file, I can (eventaully) get more information about the radio station. Eventually, I hope to have a format that will allow classification of the radio stations into Genre, or adding arbitrary tags to show up in iTunes.
The other reason I chose to use a file to represent a radio station is that it makes it easy to set up a static playlists of those files. Format The format of the .url file is simple. It's a text file with one line of data, with three fields separated by a comma. The first field is bitrate, the second field is the name of the radio station, and the third field is the http url to the stream.
For example, the .URL file I use for NPR in Austin is looks like this:
64,KUT - NPR Austin,http://pubint.sc.llnwd.net:9005/
It shows up in iTunes (or the Roku SoundBridge) as a 64K stream with a title of "KUT - NPR Austin".
Config Changes
To make mt-daapd scan for .url files, you'll have to edit your mt-daapd conf and add ".url" to your extensions.
For example, after you've changed it, it will probably look something like this:
extensions .m4a,.m4p,.mp3,.url
Without adding .url to your extensions, mt-daapd won't scan it, and it won't appear in an iTunes client.
Smart Playlists
In addition to putting .url files in static .m3u playlists, you can also add them to dynamic playlists. The best flag to use to discriminate between streaming audio and regular music files is the "type" field. For a MP3 file, the "type" will be "MP3 Audio File". For a streaming audio file, the "type" will be "Playlist URL".
So a smart playlist that contains all radio stations might look like this:
"Streaming Audio" {
type includes "URL"
}
