Loading ...
Sorry, an error occurred while loading the content.

[nslu2-general] Re: Play internet radio on slug audio dongle?

Expand Messages
  • Thomas Reitmayr
    Hi Graham, the configuration of MPD can be found in /etc/mpd.conf on your slug (at least for slugos). There you specify where your local music files can be
    Message 1 of 5 , Jan 17, 2009
    • 0 Attachment
      Hi Graham,
      the configuration of MPD can be found in /etc/mpd.conf on your slug (at least for slugos). There you specify where your local music files can be found (entry "music_directory") and the paths to various other files which you probably don't have to touch. Other important entries concern the audio card. I use ALSA (not OSS or PulseAudio), therefore the lines regarding the audio card look like:
      ################### VOLUME MIXER #########################
      mixer_type "alsa"
      mixer_device "hw:0,0"
      mixer_control "Speaker 1"
      ################## AUDIO OUTPUT ##########################
      audio_output {
      type "alsa"
      name "My ALSA Device"
      device "plughw:0" # optional
      #format "48000:16:2" # optional
      }
      Now you are good to rebuild the database and restart MPD:
      /etc/init.d/mpd stop
      mpd --create-db
      /etc/init.d/mpd start

      Then you need an MPD client to control MPD via a simple network protocol on port 6600. There is a detailed list at http://mpd.wikia.com/wiki/Clients , common clients are
      * a program running on some PC, eg. GMPC (Gnome Music Player Client), Sonata, ..., or
      * a client on your slug providing a web interface - this usually also requires a web server on the slug like lighttp. Here a client known to work is relaxx (see http://tech.groups.yahoo.com/group/nslu2-linux/message/22781 )
      * some scripts running on your slug forwarding commands from an IR receiver to MPD. These are usually some simple custom scripts, and I was just mentioning it to give a little background information about how my own system looks like and how it provides the feel of being an integral part of my stereo. If you want to know more about that I can tell you how to set it up.

      Using the client you can add URLs to audio streams, eg. "http://217.20.118.95:8388" for SomaFM's BeatBlender channel. This rather clunky address can be found by downloading the channel's playlist:
      links -source http://somafm.com/beatblender.pls
      You find various alternatives in that playlist, I just took the top entry. Other radio stations may use the m3u playlist format.

      Specifying these addresses works ok and you can start using your "internet radio receiver" like that. However I noticed that the addresses in the playlists occasionally change, so it would be better to always download the playlist and then take the current address of the stream. As MPD does not support such playlists podcast-bounce is required. It implements a simple web server and pretends to provide the audio stream (i.e. you specify its URL to MPD), but instead it downloads the playlist on-the-fly and redirects MPD's HTTP request to the top URL found in the playlist using a 302 response, similar to what tinyurl.com does with http://tinyurl.com/m5pr3 .
      The same can of course be done with podcast XML files, only the format of the "playlist" differs.

      Hope that answers most of your questions.
      -Thomas







      ________________________________
      Von: Graham <fgmarshall@...>
      An: nslu2-general@yahoogroups.com
      Gesendet: Freitag, den 16. Januar 2009, 18:25:12 Uhr
      Betreff: [nslu2-general] Re: Play internet radio on slug audio dongle?


      Many thanks - but I am new to Linux, Slug and such players.

      I loaded MPD by apt-get - no problem - now I am fighting the man pages.

      To confirm - I need to control the internet radio from a browser on an
      external PC? You talk about an IR control - is that to the Slug or the PC?

      Thanks for the Wiki - but like many such - a fair level linux
      experience is assumed!




      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.