Play audio stored on the desktop through an android device in the same WLAN

I want to keep the audio files on my desktop PC, as I do now, and be able to play them on an Android device (using this device’s speaker or a headphone connected to this device) connected to the same WLAN.

I thought I could achieve it by using MPD and MPDroid, but it turns out that this combination just makes the device into a kind of remote control, but the audio is played through the desktop speakers (unless I have set up something wrong).

Also, MPD has a big drawback for me that you can’t easily browse directories, it relies too much on tags, and I have a lot of mp3 files without any tags.

So, does anyone happen to know how one can play the files stored on the desktop through the Android device’s speaker? (preferably with something that can browse directories, but if worse comes to worst, MPD will do).

Hi. I’ve never tried it, but it seems that PulseAudio has some settings for that. See
https://wiki.archlinux.org/index.php/PulseAudio#Networked_audio

And here:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/

I would look into running a DLNA server (minidlna) on your laptop/desktop, for an app to connect to your files on android I have no idea (not running android)

1 Like

Hm, as far as I know, Andoid doesn’t use PulseAudio, does it? Even if recent versions do, then certainly not 4.04, which is on the phone that I’m going to use.

DLNA seems the way to go! I have tried miniDLNA on the desktop + ControlDLNA on the Android, and it is working. Unfortunately, since the device is so ancient (4.04), ControlDLNA seems to be the only available app with this functionality. I say “unfortunately” because while it allows to browse directories, the sorting order of files is very strange. But it’s better than nothing, so it will have to do.

Edit:

I was wrong, actually everything is right with the sorting order! It’s just ControlDLNA sorts the files by their names, but displays the title from mp3 tags, if there is one. And as it turned out, for testing I chose a directory where the files while not having any other tags, do have titles like “track 8” for example. And these titles are completely out of order with their actual order, i.e. with how the files are named. That is why I thought that the sorting order is strange, but actually, ControlDLNA does it completely right: regardless of the titles it sorts the files by their names. So it’s actually a PERFECT solution for me!

1 Like

I’ve just tried streaming audio with VLC (the second answer here: How to stream my GNU/Linux audio output to Android devices over WI-FI? - Super User). Seems to work fine and requires no complex configurations or exotic applications.
I use JuiceSSH on Android phone to connect to my PC and run mocp (Music on console player) and VLC to get audio from PC on the phone.

EDIT. It is possible to use nvlc with JuiceSSH instead mocp or any other console player.

1 Like

Interesting, thanks! However, on my desktop I have speakers inbuilt in the display, so when I want the sound turned off on the desktop, I mute it with pavucontrol, and that turns PulseAudio sound off completely, so this solution would stop working in such cases. Also, I edited my second post: as it turns out the sorting behavior of ControlDLNA is actually perfect for my usecase.

But I will keep in mind this alternative, also other people coming across this topic may like this solution better, so thanks for the advice!

1 Like

Maybe just set PC volume to 1% instead of complete mute would do?

Yes, that’s a way too, but pressing the mute key on the keyboard is faster: it’s right near Keypad Enter on my keyboard :slight_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.