Page 1 of 3 123 LastLast
Results 1 to 10 of 105

Thread: How to stream mp3 to an airport express using only open source

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Beans
    23

    How to stream mp3 to an airport express using only open source

    First of all, all the credits go to Jon Lech Johansen, aka DVD Jon, who released JustePort, a tool which lets you stream MPEG4 Apple Lossless files and RAW audio files to your AirPort Express. More info in his blog: http://nanocrew.net/index.php?s=justeport
    (He accepts donations )

    This is the only open source tool I've found to stream audio via wi-fi to the Airport Extreme base station.

    What you can do with this How-to:

    It's pretty basic, you can stream wirelessly single mp3 files or all the files in a given folder to your Airport Express base station (pretty basic AirTunes functionality). Hopefully this will inspire other people to make xmms/amarok/vlc plugins to accomplish more advanced functionalities.

    What you need:
    Mono:
    Code:
    sudo apt-get install mono mono-gmcs
    JustePort.exe: Download JustePort-0.2.tar.gz from http://nanocrew.net/sw/justeport/JustePort-0.2.tar.gz. Extract the contents somewhere, open a terminal, navigate to the folder you just extracted and compile JustePort with mono typing the following command:
    Code:
    mcs -out:JustePort.exe *.cs
    That will make a file named JustePort.exe that you'll have to move to /usr/bin/ to make it available as a shell command:
    Code:
    sudo cp JustePort.exe /usr/bin/
    lame (free mp3 codec): If you're able to play mp3s chances are that you have it already installed, otherwhise type the following command in a terminal:
    Code:
    sudo apt-get install lame
    The command:
    Ok, once you're ready, you can type the following command in a terminal to play a single mp3 file (assuming the mp3 file is in the current directory and its name is file.mp3 and that the IP address of your airport express base station is 10.0.1.1):
    Code:
    lame --decode file.mp3 - | JustePort.exe - 10.0.1.1
    On step further: to play all the mp3 files in a given folder, open the terminal, navigate to the folder containing the mp3s, and type the following command:
    Code:
    cat *.mp3 | lame --mp3input --decode - | JustePort.exe - 10.0.1.1
    Note: you can simplify it a little bit by making an alias (for example, "playall"). Again, in a terminal type:
    Code:
    alias playall="cat *.mp3 | lame --mp3input --decode - | JustePort.exe - 10.0.1.1"
    Now, to play all the mp3s in your current folder you just have to type playall.
    EDIT: Aliases defined like this will be valid only for your current session (if you log out or reboot they disappear). If you want to make your alias permanent open the file .bashrc located in your home directory:
    Code:
    gedit ~.bashrc
    and add the alias to that file.

    That's it for the moment, but you basically can stream any audio format if you have the right tool (for example, to stream ogg you'd type: oggdec -Q -R -o - file.ogg | JustePort.exe - 10.0.1.1). Just try things and if they work post them here.

    Again, thanks to DVD Jon for making this possible.
    Last edited by darkvad0r; June 9th, 2006 at 03:02 PM.

  2. #2
    Join Date
    Dec 2005
    Beans
    51

    Re: How to stream mp3 to an airport express using only open source

    have you or anyone else tried raop-play.
    http://raop-play.sourceforge.net/

    also, is anyone working on implimenting this functionality in rhythmbox/banshee/amarok
    Last edited by spanella47; June 11th, 2006 at 09:26 PM.

  3. #3
    Join Date
    Apr 2005
    Location
    Melbourne, Australia
    Beans
    721
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: How to stream mp3 to an airport express using only open source

    Quote Originally Posted by spanella47
    have you or anyone else tried raop-play.
    http://raop-play.sourceforge.net/

    also, is anyone working on implimenting this functionality in rhythmbox/banshee/amarok
    I've tried raop-play, and it's a little lacking.

    1. It buffers for 20 sec (!!!!) before sending to the airport. That means and stop/play/pause/track change operations take 20 seconds to come through.

    2. When not playing, but still running, it will continuosly flood the airport with empty packets. Anyone sharing the airport with you might be a little annoyed at that

    I'd like to know how well JustePort works compared to this. I'll have to wait until I visit a friend with an Airport first.

    L.

  4. #4
    Join Date
    Jun 2005
    Beans
    23

    Re: How to stream mp3 to an airport express using only open source

    This worked first try. Impressive. However there are a few flaws:

    - Volume is VERY low.
    - Music cuts out for ~1 second every 10 seconds, before resuming at the same spot.

    Anyone else having issues like these?

  5. #5
    Join Date
    Apr 2006
    Beans
    23

    Re: How to stream mp3 to an airport express using only open source

    Well the volume can be set with the initial command. As I no longer have an Airport Extreme I don't remember how to do it, just check DVD Jon's website: http://nanocrew.net/index.php?s=justeport

    As for the cuts everu 10 seconds I couldn't help you, I never experienced those.

    Cheers

  6. #6
    Join Date
    Jan 2006
    Beans
    38

    Re: How to stream mp3 to an airport express using only open source

    Hi - if anyone's still reading this thread, you should take a look at

    http://www.jroller.com/page/nwinkler...irport_express

    for a way to get raop-play to convince Amarok to stream music to the airport express. I haven't tried it yet, but it might be fun if you've got the time or the desire.

  7. #7
    Join Date
    Nov 2005
    Location
    Santa Cruz, CA
    Beans
    43
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How to stream mp3 to an airport express using only open source

    Quote Originally Posted by darkvad0r
    Extract the contents somewhere, open a terminal, navigate to the folder you just extracted and compile JustePort with mono typing the following command:
    Code:
    mcs -out:JustePort.exe *.cs
    OK, so I got this far, but when I issue the above command, I get this:

    Code:
    mcs -out:JustePort.exe *.cs
    bash: mcs: command not found
    UPDATE:

    The correct command to use is:

    Code:
    gmcs -out:JustePort.exe *.cs
    Otherwise, this seems to be working like a charm.

    THANKS!!!!
    Last edited by russbuss; June 20th, 2006 at 05:52 AM.

  8. #8
    Join Date
    Nov 2007
    Location
    'rado
    Beans
    19
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: How to stream mp3 to an airport express using only open source

    I've tried both methods in gutsy and failed miserably early on. Has anyone tried this in gutsy?

  9. #9
    Join Date
    Mar 2006
    Location
    San Francisco Bay Area
    Beans
    371
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to stream mp3 to an airport express using only open source

    Yes, Nils Winkler's howto still works, with a couple of caveats on Ubuntu 7.10. I will summarize the steps he has there:

    1. Download raop-play source: http://prdownloads.sourceforge.net/r...ar.gz?download

    2. extract to a directory.

    3. cd to the driver directory (e.g. raop_play-0.5.1/drivers/)

    4. Download the patch for alsa_raoppcm.c: http://sourceforge.net/tracker/downl...76&aid=1756825

    5. Apply the patch with
    Code:
    patch -p0 < fix-typedefs.patch
    6. Edit alsa_raoppcm.c and change #include <linux/config.h> to #include <linux/autoconf.h>

    7. Install dependecies. I needed:
    libssl-dev
    libsamplerate0-dev
    libfltk1.1
    libfltk1.1-dev
    libid3tag0-dev
    fluid
    libgtk2.0-dev
    in addition to build-essential

    *fluid is the tricky one, because ./configure won't tell you that it's missing but you'll get an error: aexcl_gui.cxx: No such file or directory.

    8. Compile the driver:
    Code:
    cd cd raop_play-0.5.1/drivers
    ./configure
    make
    sudo make install
    9. Compile raop-play:
    Code:
    cd raop_play-0.5.1
    ./configure
    make
    sudo make install
    10. Create three scripts:
    load_airport_express_driver
    Code:
    #!/bin/sh
    module=alsa_raoppcm
    devnode=/tmp/pcmout
    if ! grep "^$module" /proc/modules > /dev/null; then
        /sbin/modprobe alsa_raoppcm
    fi
    major=`sed -n -r "s/(^[0-9]+) pcmout/\\1/p" /proc/devices`
    if [ -c $devnode ]; then
        rm -f $devnode;
    fi
    mknod $devnode c $major 0
    start_airport_express
    Code:
    #!/bin/bash
    sudo load_airport_express_driver
    raop_play airport /tmp/pcmout &
    stop_airport_express
    Code:
    #!/bin/bash
    killall -9 raop_play
    11. Make them executable with chmod +x and copy them to somewhere in your executable path, like /use/bin.

    12. Type:
    Code:
    cat /proc/asound/cards
    to get the number of your last sound card, and add 1 to know what raoppcm will be, or just run start_airport_express first. That will be the nuber to use for ALSA device configuration in Configure-Amarok->Engine->Configure Xine Engine->ALSA Device Configuiration->Mono and Stereo. In my case it was hw:2,0, since I had ): On-board sound and 2: Modem.

    13. Append a line in /etc/hosts for 'airport':
    Code:
    91.189.94.186    airport
    Use the actual IP of your AirPort Express.

    14. Run sudo start_airport_express after connecting to the network with your AirPort Express.

    15. Play music via Amarok!

    The sound is great, although you will notice an almost 10 second delay before it gets to your speaker. It's a welcome trade-off to not listen via headphones or the PC speaker. You don't have to connect directly to the AirPort express. Mine is configured as a station joined to my main wireless router. You could connect over ethernet too. Whatever works for you.

    Many thanks to Shiro Ninomiya, and Nils Winkler

  10. #10
    Join Date
    Nov 2007
    Location
    NYC
    Beans
    66

    Re: How to stream mp3 to an airport express using only open source

    elamericano- Thanks a ton for this! I spent most of this morning trying to get this damn thing to work. I was shocked - shocked! - when my stereo speaker by my right ear started playing music.

    But does anyone know why the audio output through the stereo is choppy for about 10 seconds when first starting to play it?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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