11

I have seen a lot of apps and solutions online to receive audio from a desktop to an android phone. I also know how to stream audio from one desktop to another, using paprefs and pavucontrol.

What I want is to be able to stream from my Android phone to pulseaudio. There are individual apps with chromecast support, but then you're stuck with the app, and you need to be running something like Kodi on the desktop to receive it.

When you connect to a bluetooth audio source from Android, it just streams all outgoing audio. This is what I want to do over wi-fi, to pulseaudio. How can it be done?

3

This can not be done

Don't read below if you are not interested in a solution for using DLNA-streams from Android to Ubuntu.


To send audio via a network connection from Android to Ubuntu you always need a renderer on your Ubuntu desktop and a streaming application on the android device. Android does not use pulseaudio as a sound server. We therefore depend on an additional app to send audio to the desktop.

There are several applications that can do this. I tested this successfully with gmediarender on the Ubuntu side and BubbleUpnp for Android.

  1. Install and run gmediarender on Ubuntu from the command line.

    sudo apt install gmediarender
    gmediarender -f <Name>
    

    Consult the manpage for more options.

  2. Install and run Bubble UPnP on the Android device.

  3. Search for the renderer name you gave in Bubble UPnP > Local Renderer

    enter image description here

  4. Select tracks to play on the Android device and listen to them on the Ubuntu machine.

    enter image description here

Note that this will also work for photos or video content you can stream to your computer using Bubble UPnP.

| improve this answer | |
  • 1
    Thanks for the reply, but this doesn't resolve the issue that you're still stuck with the app. I'm looking for something that will stream all outgoing audio, like it would if you were streaming to bluetooth. – 3x5 Nov 7 '17 at 19:22
  • You will always need an app for that - neither Android nor Ubuntu can do this without. – Takkat Nov 7 '17 at 19:30
  • 2
    Ubuntu actually can. You can set up a Pulseaudio server on one computer, and sink on the other, and all audio from one will stream to the other. – 3x5 Nov 7 '17 at 23:08
  • While it is true that gmediarender + BubbleUPNP combination will work, the questions was clearly about any audio. – AtomHeartFather Sep 7 '18 at 15:30
  • @AtomHeartFather: see edit. I'd be more than interested if you had a solution for this. – Takkat Sep 7 '18 at 15:55
1

I think a way better trade-off than the enormous stress with BubbleUpnp would be SoundWire. This will not stream to pulseaudio but to SoundWire server running on your Computer. But it will stream all audio from your Android device to it after and it can run in the background.

An alternative may be AirAudio but it needs root and it did not work for me even with Magisk...

| improve this answer | |
  • just successfully used your mentioned "AirAudio" and works fine [on Magisk ROOTED Android]. Important comment for others - it is not free; either you have to live with some beeps after 5min or spent ~4€ in PlayStore (just did it my self). Sound streaming from Android to VLC seems more HiFi-ish than streaming audio to BlueTooth sink on Ubuntu. – linolino Jan 8 at 17:25
  • SoundWire only passes audio from the PC to the Android device (at least the free version in Oct 2020, and given the documentation, likely the payfer too). – Jonathan Sambrook Oct 26 at 10:03
0

sndcpy, it's like scrcpy, but for audio.

It's not ALL audio but it's close enough.

It works on adb, so any way you can get a connection through adb, i.e. USB and wifi.

It has some buffering issues which makes unusable for me (once in a while it skips a few words on my audiobook), and has a high delay even on USB, but on some cases that doesn't matter. I have just tried it.

| improve this answer | |
New contributor
riklabel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.