1

Goal: I want my kids to be able to use the raspberry pi (raspbian) hooked up to the TV as a computer terminal to run educational websites and applications (from my desktop via ssh).

Problem: The raspberry pi is Sloooow! Running applications on my Rpi through ssh -X from my desktop is much faster then running applications locally, plus with this method flash works. However getting the audio to stream over to the pi is tricky.

What I've tried: I have setup pulseaudio to basically allow any computer on my network to play any sound it wants to on the pi. I have icons on the Rpi desktop that open ssh connections and run applications from my desktop on the Pi, while forwarding the audio to the Pi's pulse port 4713.

An example script run from an icon:

#!/bin/bash
ssh -XC -c blowfish-cbc,arcfour child@desktop
PULSE_SERVER=Raspberrypi:4713 google-chrome

This opens up google-chrome from the desktop on to the Raspberry Pi's display and sends its audio output to the raspberry pi. If my Pi is connected with a network cable this works perfectly! It plays the kid's application sounds on the TV, while letting me hear my applications on the desktop. Multi user networked audio, it's amazing!

However I read that pulseaudio over wifi is hit or miss depending on your router, and unfortunately it is a miss for me. It plays from 2 seconds to 200 seconds of audio before it cuts out, depending on how congested the airwaves are, what phase the moon is in etc.

I don't intend to have a cable sprawled across my living room, and I really hoped my wall fishing days were over. Is there a better alternative for my purposes than pulseaudio that will allow me to send ANY audio from my desktop to the pi over wifi? I briefly looked into dlna, but it seems like it's more for sending media files, instead of raw output. Please let me know if I am wrong. Also, might there be some settings I can fix in my router to allow pulseaudio to work better?

  • X over ssh will be always slow, so much more in limited devices. Google NoMachine. – Rui F Ribeiro Oct 21 '16 at 14:58
  • Well in this case, X over ssh it runs applications faster than the local versions run. Because the raspberry pi is so slow, using my desktop to take some of the load is a big help. But that's not really what the question is about, is it? – Quetzal Dragon Oct 21 '16 at 18:02
  • Google NoMachine... – Rui F Ribeiro Oct 21 '16 at 18:51
  • You are directly using the remote pulseaudio server on the RaspPi. A better setup may be user "proper" audio streaming via RTP with module-rtp-send for a "sink to RaspPi" on your desktop and module-rtp-receive on the RaspPi. That way, if the stream interrupts, it can pickup again after the interrupt. It's still hit-or-miss over wifi, especially if you are forwarding X as well. Both need quite a bit of bandwidth together. – dirkt Oct 22 '16 at 6:29
  • You can script all this using pacmd, and use pavucontrol to control it with a GUI. – dirkt Oct 22 '16 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.