Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 2 of 2
  1. #1
    Meshoulam, Arnon
    Guest

    AlienStream modifications

    Would love to see it. What platform?

    -----Original Message-----
    From: discuss-bounces (AT) lists (DOT) slimdevices.com
    [mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Niek
    Jongerius
    Sent: Monday, August 16, 2004 7:48 PM
    To: discuss (AT) lists (DOT) slimdevices.com
    Subject: [slim] AlienStream modifications

    Hi list,

    I've been tinkering with AlienStream. In a previous post I detailed some
    issues regarding WMA streams and hangs of the slimserver daemon. I
    changed
    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
    under /tmp.
    - 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
    pipe.
    - The slimserver then reads the second pipe (the MP3 data).

    This process is somewhat cumbersome. If anything goes awry (for
    instance,
    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):
    http://localhost:668/mms://livemedia...nl/radio3-smal
    - When played by the server, this will connect to localhost on port
    668
    and start a program which takes care of connecting to the "real" URL
    (obviously the part starting with "mms://"). The program will
    extract
    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,
    or
    use the very same daemon to play WMA streams using a pure MP3 player
    like
    mpg123.

    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).

    Regards, Niek.

  2. #2
    Niek Jongerius
    Guest

    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
    >> changed
    >> 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.

    Regards, Niek.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •