Would love to see it. What platform?
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Niek
Sent: Monday, August 16, 2004 7:48 PM
To: discuss (AT) lists (DOT) slimdevices.com
Subject: [slim] AlienStream modifications
I've been tinkering with AlienStream. In a previous post I detailed some
issues regarding WMA streams and hangs of the slimserver daemon. I
the process a bit and got rid of the two pipes in /tmp. It now uses a
daemon process that listens for alien stream requests.
The original AlienStream plugin works something like this:
- The AlienStream helper app is started, and it connects to the alien
stream via a URL. The output is WAV, which is put in a named pipe
- A lame process is started, that reads from that named pipe (and thus
reads the WAV data), and puts an encoded stream (MP3) in a second
- The slimserver then reads the second pipe (the MP3 data).
This process is somewhat cumbersome. If anything goes awry (for
if the AlienStream helper or lame dies prematurely), the server gets
stuck reading a "dead" pipe. Furthermore, this scheme can get difficult
to implement on other non-*ix platforms.
My version works like this:
- I don't use a plugin at all. Instead, I use some special formatting
for a playlist file. An example (which will connect to a WMA stream
of a Dutch radio station):
- When played by the server, this will connect to localhost on port
and start a program which takes care of connecting to the "real" URL
(obviously the part starting with "mms://"). The program will
the URL, connect to the stream, decode/encode to MP3, and return the
MP3 data to slimserver. At the moment this program is just a shell
script containing a modified alienstream helper and lame.
Upside is that if anything goes wrong, the daemon process quits, and the
slimserver won't hang up. Since there are no named pipes, portability
_could_ be better (I'm no Windows jockey...). And you could even run the
alienstream/lame stuff on another machine if your server is cpu bound,
use the very same daemon to play WMA streams using a pure MP3 player
For this to work (and to get rid of these pipes) I had to tickle the
Xine libs just a little to let it output WAV to stdout instead of to a
file. 3 extra lines of code in a Xine source file, and set the
XINE_WAVE_OUTPUT environment variable to "1".
If anyone is interested, let me know. It's not polished code yet, but
it works (for me).
Results 1 to 2 of 2
Thread: AlienStream modifications
2004-08-16, 11:57 #1Meshoulam, ArnonGuest
2004-08-16, 22:19 #2Niek JongeriusGuest
>> I've been tinkering with AlienStream. In a previous post I detailed some
>> issues regarding WMA streams and hangs of the slimserver daemon. I
>> the process a bit and got rid of the two pipes in /tmp. It now uses a
>> daemon process that listens for alien stream requests.
> Would love to see it. What platform?
This version runs on Lunix. Bottleneck for other platforms will be
getting the alienstream helper app (actually, the Xine libs it uses)
to compile. There was some talk about people trying to compile the libs
on new Macs, dunno how far they got.