Redirecting audio to a remote host using esddsp

There are situations where you might want to redirect some audio you're playing on your local computer to another computer's speakers, potentially in a different room, or even anywhere on the Internet.

One of many possibilities to do that is to use the Enlightened Sound Daemon (EsoundD, or esd). It ships with a program called esddsp (apt-get install esound-clients) which can redirect various audio sources.

First, you have to start the esd daemon on a console on the remote host (the one which should output the audio on some speaker, for example e.g. like this:

  $ esd -public -nobeeps -tcp

You can do this as regular user (no need to be root) if you have the proper permissions. You also need to allow connections on port 16001 in your firewall settings. Then you can redirect audio to that daemon from another computer. In this example I'm redirecting some music using various players:

  $ esddsp -s mpg321 -o esd foo.mp3
  $ esddsp -s mplayer -ao esd foo.mp3
  $ esddsp -s ogg123 -d esd foo.ogg

This also works fine for videos, in which case you can redirect the audio (but not video):

  $ esddsp -s mplayer -ao esd foo.mp4

For the video player Miro, I've recently documented this in the Debian package's README.Debian file. Basically you have to edit ~/.xine/config and enable audio.driver:esd there, then start Miro with

  $ esddsp -s miro

Audio will be emitted on the remote host, video remains on your local PC.

Some programs may also support esd natively, in which case esddsp is not required, e.g.

  $ ogg123 -d esd -o host: foo.ogg

Updated Miro (previously Democracy Player) packages in Debian unstable

Miro screenshot

FYI, my new Miro packages (formerly known as Democracy Player) have now reached unstable.

After lots of ugly, ugly trouble with even getting a successful build (boost/python/dbus related, you don't want to know) the packages are back in shape now, with tons of fixed (or no longer reproducible) bugs and lots of upstream impovements and new features.

If you reported a bug against Democracy Player, please try the latest Miro package and check if it still occurs, thanks!

The upgrade should be seamless, your existing config and videos will be migrated from ~/.democracyplayer to ~/.miro automatically upon the first start of Miro.

Some of the new/fixed things in this release include:

  • HTTP proxy support (uses the GNOME proxy settings, use gconf-editor to change them).
  • Flash videos now play fine (non-jerky) and with sound!
  • You can search various video sites (Youtube, Google video, etc.) online, and even save searches as channels.
  • You can export your channel list into an OPML file (and also import OPML files, of course). I've been waiting for this for a very long time (it's a good way to backup your channel list, or move it to another machine)...
  • Lots and lots of bugfixes and small enhancements, as usual.

Playing audio on the NSLU2

3D Sound USB Audio Device

I'm a happy NSLU2 user since a few months now, and I'm using it for all kinds of things, e.g. as a 24/7 remote ssh server at home (using DynDNS and the ddclient Debian package), as IRC logger (screen + irssi), etc. etc.

I was considering multiple options as to where/how to install the slug (USB thumb drive, Compact Flash, disk drive, ...) but I settled with a full Debian install on an 1 GB USB thumb drive for now. I implemented some measures to maximize the life time of the USB thumb drive, maybe I'll post some info on that later...

One new thing I've been trying lately is to use the slug as an audio player.

As it doesn't come with an integrated sound card, you have to use an external USB audio device. I've got mine (see photo) from eBay for ca. 5 Euro (+ shipping) and it works out of the box with Linux 2.6.18 using the snd_usb_audio kernel module. You simply attach it via USB (the module is automatically loaded) and then attach external speakers to it. Here's an lsusb of the device:

Bus 001 Device 011: ID 1130:f211 Tenx Technology, Inc.

One problem with playing audio on the slug is the slow CPU. At 266 MHz (and without FPU!) playing audio with "normal" audio players such as mplayer or mpg321 is not possible. But there are several ways to make the slug play your favorite music. Here's a list of players I tested and a status report of whether they work at all. If yes, I listed a rough percentage of CPU load resulting from playing the music.

  • MP3:
    • mplayer, mpg321, aplay, playsound, and splay don't work.
    • $ madplay foo.mp3: 17% CPU load
  • Ogg vorbis:
    • mplayer, aplay, playsound, and ogg123 don't work.
    • $ apt-get install libvorbisidec-dev
      $ cd /usr/share/doc/libvorbisidec-dev/examples
      $ make
      $ cat foo.ogg | ./ivorbisfile_example | aplay -f cd

      Result: 40% CPU load

  • MOD, XM, S3M, IT, etc.:
    • $ mikmod foo.mod: 10% CPU load (even with compressed MOD files)
  • WAV:
  • FLAC:
  • SPEEX:
    • $ speexdec foo.spx: doesn't work, 100% CPU load. Any known alternatives?
  • AU:
    • $ cat > /dev/dsp: 3% CPU load (but sounds crappy)
    • $ cat > /dev/audio: 3% CPU load (sounds better)
    • $ mplayer 5% CPU load
    • $ aplay 5% CPU load
    • $ playsound 5% CPU load
  • AIFF:
    • $ sox foo.aiff -t wav - | aplay: 50% CPU load (a bit stupid, but it works)
  • Streaming MP3:
    • $ mplayer doesn't work, 100% CPU load.
    • $ wget -O - | madplay - : 17% CPU load
  • Streaming Ogg Vorbis:
    • $ cd /usr/share/doc/libvorbisidec-dev/examples
      $ wget -O - | ./ivorbisfile_example | aplay -f cd
      : 40% CPU load

The SlugAsAudioPlayer page in the NSLU2-Linux wiki might have further information on this topic.

Feel free to add comments if you know of other audio types which can be played on an NSLU2.

22C3 videos finally available

Weee! The long awaited video recordings of last year's Chaos Communication Congress (22C3) are finally available via Bittorrent.

There is a full mirror available, and others may soon appear in the 22C3 wiki.


Syndicate content