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

Re: Play internet radio on slug audio dongle?

Expand Messages
  • Graham
    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
    Message 1 of 5 , Jan 16, 2009
    • 0 Attachment
      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!

      --- In nslu2-general@yahoogroups.com, Thomas Reitmayr <treitmayr@...>
      wrote:
      >
      > Sorry, the link was distorted by yahoo mail, it is:
      > http://mpd.wikia com/wiki/ Hack:podcast- bounce (without the dot)
      > And - with "not supports playlists" I meant that although MPD itself
      organizes the songs to play in a local playlist (of course), an
      external playlist (m3u,pls,...) cannot be added as one of the entries
      in its playlist. Hope that explains why the trick with HTTP forwarding
      is done via podcast-bounce.
      > -Thomas
      >
      >
      >
      >
      > ________________________________
      > Von: Thomas Reitmayr <treitmayr@...>
      > An: nslu2-general@yahoogroups.com; Graham <fgmarshall@...>
      > Gesendet: Freitag, den 16. Januar 2009, 14:38:18 Uhr
      > Betreff: Re: [nslu2-general] Play internet radio on slug audio dongle?
      >
      >
      > Hi Graham,
      > aside from calling mplayer (or vlc) directly from the command line,
      you can use MusicPD to play audio directly on the slug. There are
      various frontends to control MPD from your PC.
      > There is just one thing to note - MPD does not really support
      playlists (like m3u, pls) which are usually used by internet radios.
      So you either have to enter the URL of the real audio stream (usually
      containing a numeric IP address) or you could use my "podcast-bounce"
      script to automatically forward accesses from a playlist to its first
      entry. The added value is that you can also play the top entry of
      podcasts or access lastfm via lastfm-proxy - that's documented in the
      README. See http://mpd.wikia com/wiki/ Hack:podcast- bounce.
      > This setup works fine for me just like a regular radio.
      > Regards,
      > -Thomas
      >
      > ____________ _________ _________ __
      > Von: Graham <fgmarshall@sunspot. co.uk>
      > An: nslu2-general@ yahoogroups. com
      > Gesendet: Freitag, den 16. Januar 2009, 11:37:32 Uhr
      > Betreff: [nslu2-general] Play internet radio on slug audio dongle?
      >
      > I see various media servers that let you serve audio to a remote player.
      > Is there any app that lets you play internet radio on the Slug itself?
      > I run Debian with a cheap USB sound dongle that work very well with
      > Madplayer
      >
      > http://www.sunspot co.uk/Projects/ SWEEX/slug/ Sound/sound. html
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • 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 2 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.