Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to stream my audio output over the network (Wi-Fi) to my Android devices. I'm not looking for a music/video streaming solution, but I would stream any audio output of my GNU/Linux desktop to my Android work like a bluetooth headphone.

My GNU/Linux desktop is Debian Wheezy and the sound is provided by pulseaudio.

I've tried Pulseaudio's raop module (and enabled it on paprefs) + Android's AirBuddle app, but the audio is not streamed (pulseaudio seens connect to AirBuddle, but the sound is not reproduced, there is a connection failure in some softwares, in some other softwares the sound is stucked).

share|improve this question

There is a very simple solution because PulseAudio already has all the necessary tools.

  1. Get your source device name with command pactl list | grep Name
  2. Create the following script named pashare:

    #!/bin/sh
    case "$1" in
      start)
        $0 stop 
        pactl load-module module-simple-protocol-tcp rate=48000 format=s16le channels=2 source=<source_name_here> record=true port=8000
        ;;
      stop)
        pactl unload-module `pactl list | grep tcp -B1 | grep M | sed 's/[^0-9]//g'`
        ;;
      *)
        echo "Usage: $0 start|stop" >&2
        ;;
    esac
    
  3. Make some checks and preparations (to allow script execution and check if the port successfully opened):

    chmod 755 pashare
    ./pashare start
    netstat -nlt | grep 8000 
    telnet 127.0.0.1 8000
    
  4. Download and install PulseDroid.apk

  5. Launch app on your phone; set the IP address to your computer and the port to 8000.

P.S. You can also check this Wiki page for general information on Pulseaudio network streaming, and this Wiki page about RTP streaming. Don't expect too much from streaming raw audio over WiFi; it takes enormous gobs of bandwidth. Even with a high-end wireless router/AP with a powerful signal I haven't been able to get more than stuttering audio out of it. Your best bet is probably to setup a proper media server (like Rygel, which works well with Pulseaudio) to transcode the raw audio to something like MP3 and stream that instead.

share|improve this answer
2  
This also works perfectly with this Android App: Simple Protocol Player play.google.com/store/apps/… Note that this defaults to rate=44100 however, so you might want to use that. – Jannes Apr 20 '15 at 0:42

To stream audio output over wifi to your android phone you need to install server software, that sends audio, on PC and client software on Android device. Available options are

WiFi Audio Wireless Speaker

Run WiFi Audio Android App and Press start, you will see IP address of mobile device in the bottom after that run Windows/Linux application and put mobile device's IP address in the IP address field and then press start on PC application. Now all audio coming out from PC will be send to mobile device and you will hear audio on mobile device.
Download

SoundWire

Wirelessly transmit any music or audio from your PC to your Android phone, tablet, or other PCs
Home page Also see

Other useful links
XBMC android SE

share|improve this answer
    
SoundWire lags by 1-2 sec – gaurav gupta Jul 6 at 19:29

You can use VLC to serve a MP3 stream of pulseaudio's output via HTTP.
The main advantage is that you don't need to install any special software on your remote device, a web browser (or music player) is all you need to play the stream.

  1. Find pulseaudio's output name with:

    pactl list | grep "Monitor Source" 
    
  2. Start the VLC http server, replacing XXXX by your output name:

    cvlc -vvv pulse://XXXX --sout '#transcode{acodec=mp3,ab=128,channels=2}:standard{access=http,dst=0.0.0.0:8888/pc.mp3}'
    
  3. If needed, find your local IP address with ifconfig

  4. On your remote device, point the browser (or audio streaming app) to:

    http://your.local.ip.address:8888/pc.mp3
    

Note: The stream isn't affected by the volume set on the server, unless you totally mute it. If needed, you can keep the level just a tiny bit above 0 to only hear the remote device.

share|improve this answer

Wow this is old...

Anyway, use VLC. Pretty GUIs all the way.

  • Fire up VLC on your desktop.
  • Hit Stream, select the file (add how ever many files you want), hit stream.
  • 'Next' if it's all correct.
  • For New Destination select "http" (or whatever you want to use). Select Display locally if you want to play it on the machine you're streaming from too. The next few dialogues are all self-explanatory.

Fire up VLC on your Android device. Hit the icon next to the search button (the arrow pointing to the dot). type in http://<IP ADDRESS O OF THE MACHINE RUNNING VLC>:8080/ for me this was http://xxx.ca:8080/

Tested and working. Now, could one do this in the ancient time of Jun 9'13? Maybe, but I'm too lazy to check VLC's commmit logs ;)

share|improve this answer
3  
He's not looking for a music/video streaming solution. – Cristian Ciupitu Apr 24 '14 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .