Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pulseaudio - whyyyyyy?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Sun Mar 20, 2016 10:33 am    Post subject: Pulseaudio - whyyyyyy? Reply with quote

EDIT: Changing thread title to reflect my issues here.

Hello!
Lately I discovered some items in my KDE network setting that are related to audio. After fiddling with network settings a bit, I saw even something related to Clementine (my favorite music player). Ever since, I wonder how or if it is possible to send music from my laptop to the PC that is hooked up to the PA? Pulseaudio seems to be capable of doing this, but I am seriously lost on how?
I followed the Wiki article regarding pulseaudio and have lots of weird audio devices now in the KDE audio setting (RTP, whatnot), but can't get sound out of any of them for the sake of it :)
Can anyone point me to the right direction? How's this supposed to work? Especially the RTP related stuff, I don't get it really. Thanks.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"


Last edited by Martux on Thu Mar 24, 2016 7:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Sun Mar 20, 2016 11:14 am    Post subject: Reply with quote

I never have done this.

But lets assume you provide some streaming services

and on the receving end use smoething like

cvlc and the url to the streaming device

Serve streams audio which you have to set up, cvlc or vlc can decode it and plays it.

"just set up" an internet radio ...

usually those radio stations have m3u or wma ending, i think m3u is the way to go
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Sun Mar 20, 2016 3:40 pm    Post subject: Reply with quote

I use mpd to stream music, and have it output a vorbis encoded stream to port 8000.

From /etc/mpd.conf on the host/server machine (named "involute" on the local network) ...

Code:
audio_output {
        type           "httpd"
        name          "My HTTP Stream"
        encoder      "vorbis"
        port            "8000"
        bind_to_address "0.0.0.0"
        bitrate         "128"
        format         "44100:16:1"
#       max_clients     "0"
}


If I put "involute:8000" in the address box of a browser in the client/remote machine, I can hear the stream.

Controlling the playlist is a separate activity. There are many ways to do this, but I don;t have any useful experience in that area.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Mar 20, 2016 3:42 pm    Post subject: Re: Can I play audio from one linux machine to another? Reply with quote

Martux wrote:
Hello!
Lately I discovered some items in my KDE network setting that are related to audio. After fiddling with network settings a bit, I saw even something related to Clementine (my favorite music player). Ever since, I wonder how or if it is possible to send music from my laptop to the PC that is hooked up to the PA? Pulseaudio seems to be capable of doing this, but I am seriously lost on how?

Load module-zeroconf-publish on the PC, module-zeroconf-discover on the laptop, then the PC should show up as a device in the laptop's audio settings.

If you want to keep the setup then copy /etc/pulse/default.pa to ~/.config/pulse/ and add the load-module command to the bottom.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Mon Mar 21, 2016 9:54 pm    Post subject: Reply with quote

Thanks Ant P. for the suggestions.
I found a very good guide at the Arch Wiki.
Nevertheless, I cannot get sound out of it.
These are the packages:
Code:

[ebuild   R    ] media-sound/pulseaudio-8.0::gentoo  USE="X alsa alsa-plugin asyncns bluetooth caps dbus gdbm glib gnome orc qt4 ssl systemd tcpd udev webrtc-aec zeroconf -doc -equalizer -gtk -ipv6 -jack -libressl -libsamplerate -lirc -native-headset (-neon) -ofono-headset (-oss) -realtime (-selinux) -sox (-system-wide) {-test} -xen" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ] media-sound/paprefs-0.9.10::gentoo  USE="nls" 0 KiB
[ebuild   R    ] media-libs/phonon-4.8.3-r1::gentoo  USE="designer pulseaudio qt4 qt5 vlc (-aqua) -debug -gstreamer (-zeitgeist)" ABI_X86="32 (64) (-x32)"

If I run pacmd load-module load-module module-zeroconf-publish on the server, I only get the message that Module load failed.
Also on the server side, the only audio device I can see in KDE audio settings (under Audio and Video » device priority) is "Pulse Audio SoundServer", whereas on the client side I don't see any audio devices at all anymore, but there's still sound! Also on the client under output devices, On the client side, I can see internal audio analog stereo@server, but it is greyed out. Weird, actually.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
kazdva
n00b
n00b


Joined: 14 Mar 2016
Posts: 26

PostPosted: Tue Mar 22, 2016 11:41 am    Post subject: Re: Can I play audio from one linux machine to another? Reply with quote

Martux wrote:
Clementine (my favorite music player)

My response is not on the topic, but it may interest you. Clementine has a smartphone app that allows you to control Clementine from your phone, both over WAN and LAN. I know it's available in Play Store for Android, but I don't know about Apple.

https://play.google.com/store/apps/details?id=de.qspool.clementineremote&hl=en
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Tue Mar 22, 2016 12:15 pm    Post subject: Reply with quote

Yep, that's a nice remote control app :)
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Mar 22, 2016 7:24 pm    Post subject: Reply with quote

Martux wrote:
If I run pacmd load-module load-module module-zeroconf-publish on the server, I only get the message that Module load failed.
Also on the server side, the only audio device I can see in KDE audio settings (under Audio and Video » device priority) is "Pulse Audio SoundServer", whereas on the client side I don't see any audio devices at all anymore, but there's still sound! Also on the client under output devices, On the client side, I can see internal audio analog stereo@server, but it is greyed out. Weird, actually.

That's pretty confusing... maybe the failure message was because it was already loaded; I think PA outputs error messages to syslog so check there too. Also, `pacmd list-sinks` on the client should show for certain if it can see the server or not.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Tue Mar 22, 2016 8:03 pm    Post subject: Reply with quote

I will have time to systematically investigate this further on the weekend only. Hope I can make it work. Actually, Pulseaudios capabilities read awesome!
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Thu Mar 24, 2016 5:54 pm    Post subject: Reply with quote

Wew, this is so messed up! I managed to get sound out of it generally... BUT the lag/stuttering is horrible over WIFI.
Jesus, I consider this completely non-functional for now. Too bad, but I really tried everything I could imagine.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Mar 24, 2016 6:14 pm    Post subject: Reply with quote

Huh, the only time I've had a problem with stuttering was when I tried streaming from phone -> bluetooth -> laptop -> wifi -> desktop. It does send uncompressed audio though, maybe you have a bandwidth problem...
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Thu Mar 24, 2016 7:29 pm    Post subject: Reply with quote

Wow, that's not funny. I am streaming directly from one i7 to another over a 5Ghz WIFI which. easily transfers like 15 to 20 MB/s over NFS. Both computers have perfectly working Intel WIFI NICs (7260 and 8260) and there's no load on the network when I am trying pulseaudio. I have all relevant protocols/software installed. Basically it should "just work". Maybe I am going to try to get rid of all pulseaudio stuff and start all over again.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Thu Mar 24, 2016 7:44 pm    Post subject: Reply with quote

The part of just works is more of an assumption that pulseaudio works as we'd think it would (which I've find is actually not what the devs think). Then you get into the issue that pulseaudio's documentation is really crappy in general. A proper test on streaming the audio to another host, would be trying through a regular wired connection, trying to assume streaming anything over WIFI is not a good thing to do, as WIFI is a slow medium where as a wired connection is much faster.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Thu Mar 24, 2016 7:49 pm    Post subject: Reply with quote

You're probably right. What confuses me as well is this: there seems to be no transparent way to set any buffering latency whatsoever. MY problem is, one machine is an ultrabook and can't even be connected to a wired connection. Maybe I will hook up the other one just to see if it improves anything.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Thu Mar 24, 2016 10:15 pm    Post subject: Reply with quote

Ugh, I remember trying to get this to work with VNC to transport sound to the remote terminal; Gave up after I started seriously considering stabbing myself in the eyes after so much reading to try and figure out why it wasn't working!

I can only wish you better luck than I had!
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Sat Mar 26, 2016 5:00 pm    Post subject: Reply with quote

To conclude my horrorful journey, here's what I tried:
Realizing that the stuttering might come from quite long ping times in my LAN (~500 -1000 ms at times), I optimized my WIFI and adjusted the channel. THat made things better, but even from 200 ms onwards, stuttering occured.
nother thing that drove me completely mad was this:
Setup consists of loading module-tcp-native on both machines and zeroconf-publish on the server, zeroconf-discover on the client respectively. And copying the cookie. So far, so simple. Only that nothing could make zeroconf-discover on the client load. Like nothing.
Anyways... It is a good idea, but the concept seems fundamentally flawed or even broken for now. I can't spare more time on this. Thanks to everyone who helped with this.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Mar 26, 2016 6:47 pm    Post subject: Reply with quote

Copying cookies shouldn't be necessary, neither should manually loading nodule-native-protocol-tcp... the zeroconf module does that for you (that's why it's called zeroconf!). Are you sure there's nothing in the logs saying why it wouldn't load?
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Sat Mar 26, 2016 6:50 pm    Post subject: Reply with quote

You mean the system's log?
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Sat Mar 26, 2016 9:04 pm    Post subject: Reply with quote

Deleted last post because error message was caused by a typo.
I got zeroconf-discover/publish now loaded correctly on the server/client. Trying to make it as basic as possible, this is without anything else set in /etc/pulse/default.pa. I can see the card from the server now in Audio settings of KDE (on the client). Something like alsa_output_pci analog stereo (192.168.x.x:4713). But they are greyed out... Pulse Audio Volume Control doesn't mention them at all, nor does pacmd list-sinks or pacmd list-cards. Avahi is of course loaded on both machines.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Mar 27, 2016 4:30 pm    Post subject: Reply with quote

I think that might be a result of KDE "remembering" the last time it saw the card... pacmd is pretty much authoritative here.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum