Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is a rather crazy idea.

I am planing to set up a configuration that would send audio being played on my laptop to my home server via local network so that the sound is played on the server connected to a hi-fi with good speakers.

It's supposed to serve the purpose of watching movies on the laptop with sound on the speakers without rearanging cables.

I suppose it can be done similarly to writing text to a file mounted via sftp, but with the /dev/audio or /dev/mixer

But I have no idea how to intercept the audio output.

Looking forward to tips from Pros ;)

share|improve this question
    
All solutions that I investigated a while back had a latency issue.... so probably not so good for movies... –  xenoterracide Sep 11 '10 at 18:21
    
You guys are great! I'll have a project for a few weeks of my after-work-and-no-wife-in-range-free-time :D –  naugtur Sep 11 '10 at 21:17
    
@xenoterracide: this is not an insurmountable problem when dealing with predetermined content such as movies; it's mostly a matter of buffering and of arranging things so that the latency is known and accounted for. –  SamB Dec 19 '10 at 6:41
add comment

5 Answers

up vote 7 down vote accepted

As Gilles said, you're best of looking into updating your soundserver config.

You can use pulseaudio to listen to a TCP port. Be sure to check padevchooser, which is a GUI frontend to update your config.

You can find a tutorial on http://wiki.archlinux.org/index.php/PulseAudio#PulseAudio_over_network

share|improve this answer
add comment

What you're looking for is a sound server. These programs send sound over the network. Choices include JACK, NAS, Pulseaudio and more.

Pulseaudio is the default audio system on Ubuntu and is widely available on Unix. JACK is widely available on desktop operating systems and prides itself on its low latency. I'd try these two first.

To play music on a different computer, any of these programs would do as long as you manage to install the same program on both machines (they use incompatible protocols, though some have translation modules). But when playing movies, you may have trouble because forwarding sound over the network introduces perceptible latency. Some movie players allow you to fine-tune the alignment between audio and video, you may need to play with this setting.

share|improve this answer
    
I tried audio streaming over the network with JACK some time ago and didn't have any problems. –  echox Sep 11 '10 at 20:49
add comment

Your best bet is probably VLC/VLS, but expect some nasty problems with synchronization drift as it is hard to keep video playing here in lockstep with audio data playing there.

share|improve this answer
add comment

MPD allow for streaming audio over http, just not setup by default. The limitation is that MPD streams from your MPD audio library, where as a sound server will allow you to stream any audio on the computer.

share|improve this answer
    
It's a bit silly to repeat my comment from one post below, but here it goes paraphrased: It doesn't seem to be possible to send sound from a movie through mpd... –  naugtur Nov 24 '10 at 11:58
add comment

Use MPD on your laptop to stream the music to your computer at home.

I suggest, however, that you run MPD on the computer at home, and just connect to MPD with your Client from your laptop (I suggest GMPC).

It is how I listen to music all the time, I have just one computer with music on it, and clients on my laptop and other computers.

MPD can stream the music through network, so you can feed that to a server or directly play it with mplayer.

share|improve this answer
    
I'm not sure if You're adressing my case... I was asking about sending sound over network, not setting up a server with a player. And Yes - MPD would be my choice too. –  naugtur Sep 11 '10 at 21:16
    
Yes. "Sending Sound" means streaming music. If you're adamant about streaming from laptop to desktop: Install MPD and GMPC on your laptop. Enable a network stream on MPD. Start playing music and start mplayer on the desktop, that plays the stream you create with MPD on your laptop. –  polemon Sep 12 '10 at 1:03
1  
MPD allows for remote control of a music player, not remotely stream music. –  Hugo Sep 12 '10 at 19:13
1  
but I can't send all my sound output to another machine this way. What if I watch a movie and want to send the signal? –  naugtur Nov 24 '10 at 11:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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