[kde-linux] Sound over ssh?
blade.alslayer at gmail.com
Thu Sep 28 19:03:48 UTC 2006
On 28.9.2006 13:24, Boyan Tabakov wrote:
> Hi again,
> So here's what I found. The keywords here are 'streaming' and 'tunneling'.
> To tunnel something over ssh, this means that there is some other
> client-server connection that is just tunneled through ssh. Now for
> streaming, you need to set up 'some kind' of server (not neccesserily a
> monster like apache). Found a little how-to here:
It appears that you can use 'cat' as your little server:) Sounds amazing, but
I am actually listening to some music this way now:) It is basic, of course -
no advanced controls - just play music. You don't actually forward the sound
but rather the mp3 stream...
Here's what I did (right according to the how-to I sen't you):
On the client machine get some mp3 player that can play it's standard input
(mpg123 for example) and use this command as backbone:
$ ssh me at myhome cat myfile.mp3 | mpg123 -
I am now playing an entire collection of files this way:
$ ssh me at myhome "find /media/SoulMusic -wholename \*Dreamquest\*.mp3 -print0 \
xargs -p0 cat" | mpg123 -
You may be prompted for the password if you don't use other authentication
methods like public key authentication, but this is quite ok - it won't taint
your mpg123's input.
This plays all mp3 files that have "Dreamquest" in the path. (-print0 and -0
are options that allow files with spaces in the names to be handled
What surprised me most is not that the sound is played, but that 'cat' doesn't
through the file's contents all at once, but rather stream them over time. I
am not sure how this actually happens. Maybe because there are pipes used and
they have limited capacity. But the result is continuous audio stream!
There are many limitations of this method - including you can't skip files,
but at least it works.
Note that this streaming will result in as much traffic as if you downloaded
the files, so you might consoder that too, because you'll be able to play
them in a better player (long live amarok!). As I mentioned in my previous
mail, you can also forward a connection to your home apache server, and that
way, you could again use amarok to stream the file.
Thanks for making me try this:) It was a real pleasure to actually see this
works:) Now you have some options to chose from. Good luck!
Blade hails you...
A moment for the poet's play
Until there's nothing left to say
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-linux