Q: What is it / what can it do? A: The litestream distribution includes several programs which work together or can be used separately. "source" acts as a streaming source, playing MP3s off of a local filesystem and streaming the digital audio data to a streaming server. "litestream" acts as a streaming server, allowing many clients (or other repeaters) to connect to a single stream. It basically waits for you to push a stream at it with stream, and lets clients pull copies of that stream out of it with their MP3 client apps. "literestream" acts as a repeater for streaming servers, connecting to a streaming server and re-broadcasting that one stream to many more clients. It pulls a stream from litestream (or another streaming MP3 server) and lets other clients pull copies of that stream with their MP3 client apps.
For example, if you wanted an all-litestream setup to support 100 users, you might set up stream and litestream on one server (where all the MP3 files are) configured to allow 10 clients total, and then have 10 copies of literestream configured to restream 10 streams each. So the litestream server would only serve literestream clients, and actual MP3 players would all connect to the literestream servers.
Q: I downloaded and uncompressed it, now what? A: cd to the directory where it unpacked (there should be a Makefile in that directory), and type "make" and hit return. It should build itself. Now create a playlist, and start stream and litestream (these are documented in the MAKEITGO file in the same directory). You should be able to point a client at litestream and hear your stream.
Q: What's the deal with this YP thing? A: That's so other people can find your server. If you don't want to advertise your server on one of the MP3 radio station finder web sites out there (shoutcast.com, etc.) don't bother.
Q: Can I see your server startup script? A: I thought you'd never ask. I've changed my real hostname to "my.server.hostname". Here it is.
Q: When I try to connect with a client other than Winamp or XMMS, it connects for an instant and then stops, and never plays anything. A: That's because of the hackish way that litestream decides whether you're a web browser hoping to get the stats page (try opening your stream URL with a browser to see what I mean), or a playlist (try asking for http://my.server.hostname:9876/play.pls etc. from a browser). It looks at the HTTP request header named User-Agent, and if it doesn't see a value of "Winamp" or "XMMS" or "Litestream", it returns HTML instead of an MP3 stream. So to add support for other clients, hack source.c to add the right user agent strings. Have a look at my hacked copy. Note the changes are labelled "hacked by Jamie".
Q: Playback skips every 10 to 20 seconds, and there's no server, client, or network performance bottleneck that I can think of... A: I have a theory about this, and a fix that seems to work. It seems that the bitrate that you advertise with litestream (128, 160, or whatever) needs to be more than the maximum you're going to stream, or bad things happen. I upped mine from 128 to 160 and the problem went away.
Copyright (c) 2000 by Jamie Flournoy. This document may be distributed under the terms set forth in the LDP license at sunsite.unc.edu/LDP/COPYRIGHT.html.
This FAQ is free documentation; you can redistribute it and/or modify it under the terms of the LDP license. This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the LDP license for more details.