You are not logged in.

#1 2010-12-31 06:20:03

StuMx
Member
Registered: 2010-02-07
Posts: 14
Website

Share sound over local network

I have a little trouble with an idea:

I have an old desktop pc so i decided to use my laptop as my main computer and use my desktop pc as server for storing files and music. As the laptop speakers sucks, instead of playing music directly from my laptop, i conect to my desktop trough ssh and play the music with moc. The problem is that when i want to play videogames or see a movie i have to use the laptop speakers since i dont have an amp (my old desktop pc has an internal amp).

What i want to do is to setup a server on my desktop pc, and connect to it from my laptop, then i want the server to play all the sounds from the client. I have tried making an audio stream from my laptop and then connected to it from my desktop, however the sound its laggy (it has like 2 seconds of delay) so it's not a good solution since i want it to play the sound from movies.

Do you know any other way of doin this?, i know that there are some very cheap amps and speakers but i would like to get this working, just for the lulz xD.

Thanks for your help, and sorry if i misspelled something, im not good with english.

EDIT: I have googled a bit more and found that this can be done using pulseaudio, however my laptop is a macbook and i didnt find any info about using pulse audio on a mac.

Last edited by StuMx (2010-12-31 07:06:30)


I know my english sucks

Offline

#2 2010-12-31 23:28:10

rowdog
Member
From: East Texas
Registered: 2009-08-19
Posts: 118

Re: Share sound over local network

I haven't used it in years but MPD will do what you ask. https://wiki.archlinux.org/index.php/Mpd

Offline

#3 2011-01-02 04:28:05

StuMx
Member
Registered: 2010-02-07
Posts: 14
Website

Re: Share sound over local network

I've been reading about mpd, but i cant find any way to play sound from a remote location. I installed and setup mpd following the archlinux wiki, but i didnt find info about playing the sound from another machine. After a quick search on google i found this http://mpd.wikia.com/wiki/Configuration#libao_.2F_JACK

If you want to play your music on another host (perhaps becuase the computer with the speakers doesn't have enough hard drive space for your music), this seems to work:

audio_output {
        type      "ao"
        driver    "esd"
        options   "host=jurp5-desktop:16001"
        name      "esd"
}

However i dont understand which host must be specified and how should i grab the audio from the client (the one that will be playing the music/video).

What i did and actually worked was mount a nfs and specify the music directory on it, but i dont want to play only music files, i want to play all the sound from the machine.

Last edited by StuMx (2011-01-02 04:28:36)


I know my english sucks

Offline

#4 2011-01-02 04:40:01

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: Share sound over local network

I am pretty sure with MPD it would only work with music, not other audio streams, though I could be wrong.  I know you can do it with Pulse audio though. 
https://wiki.archlinux.org/index.php/PulseAudio


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#5 2011-01-04 01:14:39

StuMx
Member
Registered: 2010-02-07
Posts: 14
Website

Re: Share sound over local network

I can't use PulseAudio since the machine playing de sound will be running OS X or Windows, the only machine using linux will be the one with the speakers.

After a little search i found a project on Google Code that seems to allow me to do what i want, but i haven't tried yet. I'll put it to test and tell you how it works.

EDIT: Forgot the link to the project xD http://code.google.com/p/speakershare/
EDIT2: After some tries i'm still getting a some lag in the audio stream, i guess that its not possible to get this to work without lag.

Last edited by StuMx (2011-01-09 17:46:46)


I know my english sucks

Offline

#6 2011-01-10 19:39:38

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: Share sound over local network

Shameless plug, you might consider using RSound. It supports servers and client on Windows, Linux, *BSD and Mac OSX. It has plugin for ALSA, patches for MPlayer, VLC and MPD. smile It works well with movies as well (as long as you're on LAN).

Offline

#7 2011-01-15 22:06:02

StuMx
Member
Registered: 2010-02-07
Posts: 14
Website

Re: Share sound over local network

Im trying to compile RSound, i had no trouble compiling on linux, but on os x i get this error:

gmake[1]: se ingresa al directorio `/Users/stumx/Downloads/rsound-1.0/src'
mkdir -p /usr/local/{lib/pkgconfig,include,share/man/man1}
install -m755 librsound/librsound.dylib /usr/local/lib
cp -P librsound/librsound.so librsound/librsound.so.2 /usr/local/lib
cp: librsound/librsound.so: No such file or directory
cp: librsound/librsound.so.2: No such file or directory
gmake[1]: *** [install-lib] Error 1
gmake[1]: se sale del directorio `/Users/stumx/Downloads/rsound-1.0/src'
gmake: *** [install] Error 2

I have tried with make and gmake, but i keep getting this error. Also i tried to search for help on the RSound web site but it seems to be down.


I know my english sucks

Offline

#8 2011-01-16 02:09:05

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: Share sound over local network

Ah, I see... Seems like the OSX port wasn't complete after all. I don't have access to an OSX machine so I couldn't test properly, but I pushed a fix to the git repo which should fix that specific install issue.

Offline

#9 2011-01-16 05:41:36

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: Share sound over local network

Maybe I'm missing something, but why not use Samba and expose your music to the LAN that way?


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#10 2011-01-17 21:56:09

StuMx
Member
Registered: 2010-02-07
Posts: 14
Website

Re: Share sound over local network

Because i don't want to share the music but the whole sound, for instance, i want to play a movie and hear its sound on the speakers attached to another PC.

I managed to compile RSound on OS X using the code on git, noy the problem is that i don't know how it works xD. I readed the man pages and made a pair of tries but it didn't work. Tonight ill be give it another chance.


I know my english sucks

Offline

#11 2011-01-19 19:20:26

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: Share sound over local network

If you will send audio from Linux to Mac, it can be done nicely.

In RSound folder, go to patches/alsa. make && sudo make install should install ALSA plugin for you. You can then set up a device like this in .asoundrc.

pcm.rsound {
  type rsound
  host "ip of your server"
}

Then it's just a matter of doing mplayer -ao alsa:device=rsound or something similiar.

If the server runs OSX you might want to check which audio driver you're using. The best choice would be to use OpenAL I suppose. Try to avoid libao driver if you can as it cannot measure latency (videos will be off-sync).

If you want to send audio from the Mac, you have to rely on per-app support. There is a buildable VLC plugin in patches/vlc, but I doubt it will compile as-is on Mac. Also, there is an mplayer patch in patches/.

Offline

#12 2011-01-21 23:38:56

StuMx
Member
Registered: 2010-02-07
Posts: 14
Website

Re: Share sound over local network

I want to send the sound from the mac to linux, i'm searching for a way to compile the VLC plugin on mac, i'll let you know if i can make it work.


I know my english sucks

Offline

#13 2011-01-29 00:00:34

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: Share sound over local network

Maybe you can set a linux system with pulseaudio in a VM on your mac?


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#14 2011-02-05 20:55:38

StuMx
Member
Registered: 2010-02-07
Posts: 14
Website

Re: Share sound over local network

The trouble with using a vm is that if i play a movie i'll to play it inside the virtual machine and it will run with few fps


I know my english sucks

Offline

Board footer

Powered by FluxBB