Remote PulseAudio Setup












1















I want to send sound over the network. I have managed to do this with setting the environment variable PULSE_SERVER=$IP on the client.
On the server side, I ran paprefs and enabled network access to global sound devices.



This pretty much worked out of the box and made sense to me - I'm just forwarding the sound to a remote socket instead of a local socket.



Yet, in various tutorials the general setup seems to be to have a pulseaudio instance running on the client as well:




  • https://manurevah.com/blah/en/p/PulseAudio-Sound-over-the-network

  • https://www.willprice.org/2013/05/10/pulseaudio-network-streaming.html


Can anyone explain the differences between the two setups? What are the advantages and disadvantages?










share|improve this question





























    1















    I want to send sound over the network. I have managed to do this with setting the environment variable PULSE_SERVER=$IP on the client.
    On the server side, I ran paprefs and enabled network access to global sound devices.



    This pretty much worked out of the box and made sense to me - I'm just forwarding the sound to a remote socket instead of a local socket.



    Yet, in various tutorials the general setup seems to be to have a pulseaudio instance running on the client as well:




    • https://manurevah.com/blah/en/p/PulseAudio-Sound-over-the-network

    • https://www.willprice.org/2013/05/10/pulseaudio-network-streaming.html


    Can anyone explain the differences between the two setups? What are the advantages and disadvantages?










    share|improve this question



























      1












      1








      1








      I want to send sound over the network. I have managed to do this with setting the environment variable PULSE_SERVER=$IP on the client.
      On the server side, I ran paprefs and enabled network access to global sound devices.



      This pretty much worked out of the box and made sense to me - I'm just forwarding the sound to a remote socket instead of a local socket.



      Yet, in various tutorials the general setup seems to be to have a pulseaudio instance running on the client as well:




      • https://manurevah.com/blah/en/p/PulseAudio-Sound-over-the-network

      • https://www.willprice.org/2013/05/10/pulseaudio-network-streaming.html


      Can anyone explain the differences between the two setups? What are the advantages and disadvantages?










      share|improve this question
















      I want to send sound over the network. I have managed to do this with setting the environment variable PULSE_SERVER=$IP on the client.
      On the server side, I ran paprefs and enabled network access to global sound devices.



      This pretty much worked out of the box and made sense to me - I'm just forwarding the sound to a remote socket instead of a local socket.



      Yet, in various tutorials the general setup seems to be to have a pulseaudio instance running on the client as well:




      • https://manurevah.com/blah/en/p/PulseAudio-Sound-over-the-network

      • https://www.willprice.org/2013/05/10/pulseaudio-network-streaming.html


      Can anyone explain the differences between the two setups? What are the advantages and disadvantages?







      pulse-audio






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 7 at 11:06







      Fang

















      asked Feb 7 at 10:59









      FangFang

      190111




      190111






















          1 Answer
          1






          active

          oldest

          votes


















          1














          As far as I understand it:




          • Having a local server lets you use different transports (anything that pulseaudio has a module for – e.g. you can load the RTP or AirPlay modules for compressed audio), while libpulse itself is limited to the uncompressed "native" PulseAudio protocol.


          • Having a local server lets you transparently switch between local and remote outputs. You can add a remote sink on the fly, without needing to restart programs with the new $PULSE_SERVER set. I think you can even use module-combine-sink to output the same audio through both devices (if it can cope with the differences in latency, that is).


          • For that matter, the local server can even automatically discover remote sinks via Avahi (mDNS) – you enable it and they just show up on the list.


          • Having a local server lets you choose which device should run CPU-intensive filters (equalizer, effect modules, etc.) – you can load them locally if streaming to a Raspberry Potato, instead of having the receiver do all the work.


          • Having a local server might also improve program performance as some libpulse operations receive local responses instead of having to wait for the remote server. (That said, I'm not sure which operations would be affected in reality. But I think it might make a very noticeable difference when the server goes down.)



          It's similar to using Xpra or RDP/VNC versus raw X11 forwarding. Having an intermediate X server on the "remote" side allows it to be smarter about network conditions (e.g. Xpra dynamically enables JPEG compression when it detects lag), provide error recovery and on-demand detach/reattach, and even GPU acceleration; whereas directly pointing $DISPLAY to another host means transferring huge raw pixmaps and crashing & burning every time the connection is interrupted.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403076%2fremote-pulseaudio-setup%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            As far as I understand it:




            • Having a local server lets you use different transports (anything that pulseaudio has a module for – e.g. you can load the RTP or AirPlay modules for compressed audio), while libpulse itself is limited to the uncompressed "native" PulseAudio protocol.


            • Having a local server lets you transparently switch between local and remote outputs. You can add a remote sink on the fly, without needing to restart programs with the new $PULSE_SERVER set. I think you can even use module-combine-sink to output the same audio through both devices (if it can cope with the differences in latency, that is).


            • For that matter, the local server can even automatically discover remote sinks via Avahi (mDNS) – you enable it and they just show up on the list.


            • Having a local server lets you choose which device should run CPU-intensive filters (equalizer, effect modules, etc.) – you can load them locally if streaming to a Raspberry Potato, instead of having the receiver do all the work.


            • Having a local server might also improve program performance as some libpulse operations receive local responses instead of having to wait for the remote server. (That said, I'm not sure which operations would be affected in reality. But I think it might make a very noticeable difference when the server goes down.)



            It's similar to using Xpra or RDP/VNC versus raw X11 forwarding. Having an intermediate X server on the "remote" side allows it to be smarter about network conditions (e.g. Xpra dynamically enables JPEG compression when it detects lag), provide error recovery and on-demand detach/reattach, and even GPU acceleration; whereas directly pointing $DISPLAY to another host means transferring huge raw pixmaps and crashing & burning every time the connection is interrupted.






            share|improve this answer






























              1














              As far as I understand it:




              • Having a local server lets you use different transports (anything that pulseaudio has a module for – e.g. you can load the RTP or AirPlay modules for compressed audio), while libpulse itself is limited to the uncompressed "native" PulseAudio protocol.


              • Having a local server lets you transparently switch between local and remote outputs. You can add a remote sink on the fly, without needing to restart programs with the new $PULSE_SERVER set. I think you can even use module-combine-sink to output the same audio through both devices (if it can cope with the differences in latency, that is).


              • For that matter, the local server can even automatically discover remote sinks via Avahi (mDNS) – you enable it and they just show up on the list.


              • Having a local server lets you choose which device should run CPU-intensive filters (equalizer, effect modules, etc.) – you can load them locally if streaming to a Raspberry Potato, instead of having the receiver do all the work.


              • Having a local server might also improve program performance as some libpulse operations receive local responses instead of having to wait for the remote server. (That said, I'm not sure which operations would be affected in reality. But I think it might make a very noticeable difference when the server goes down.)



              It's similar to using Xpra or RDP/VNC versus raw X11 forwarding. Having an intermediate X server on the "remote" side allows it to be smarter about network conditions (e.g. Xpra dynamically enables JPEG compression when it detects lag), provide error recovery and on-demand detach/reattach, and even GPU acceleration; whereas directly pointing $DISPLAY to another host means transferring huge raw pixmaps and crashing & burning every time the connection is interrupted.






              share|improve this answer




























                1












                1








                1







                As far as I understand it:




                • Having a local server lets you use different transports (anything that pulseaudio has a module for – e.g. you can load the RTP or AirPlay modules for compressed audio), while libpulse itself is limited to the uncompressed "native" PulseAudio protocol.


                • Having a local server lets you transparently switch between local and remote outputs. You can add a remote sink on the fly, without needing to restart programs with the new $PULSE_SERVER set. I think you can even use module-combine-sink to output the same audio through both devices (if it can cope with the differences in latency, that is).


                • For that matter, the local server can even automatically discover remote sinks via Avahi (mDNS) – you enable it and they just show up on the list.


                • Having a local server lets you choose which device should run CPU-intensive filters (equalizer, effect modules, etc.) – you can load them locally if streaming to a Raspberry Potato, instead of having the receiver do all the work.


                • Having a local server might also improve program performance as some libpulse operations receive local responses instead of having to wait for the remote server. (That said, I'm not sure which operations would be affected in reality. But I think it might make a very noticeable difference when the server goes down.)



                It's similar to using Xpra or RDP/VNC versus raw X11 forwarding. Having an intermediate X server on the "remote" side allows it to be smarter about network conditions (e.g. Xpra dynamically enables JPEG compression when it detects lag), provide error recovery and on-demand detach/reattach, and even GPU acceleration; whereas directly pointing $DISPLAY to another host means transferring huge raw pixmaps and crashing & burning every time the connection is interrupted.






                share|improve this answer















                As far as I understand it:




                • Having a local server lets you use different transports (anything that pulseaudio has a module for – e.g. you can load the RTP or AirPlay modules for compressed audio), while libpulse itself is limited to the uncompressed "native" PulseAudio protocol.


                • Having a local server lets you transparently switch between local and remote outputs. You can add a remote sink on the fly, without needing to restart programs with the new $PULSE_SERVER set. I think you can even use module-combine-sink to output the same audio through both devices (if it can cope with the differences in latency, that is).


                • For that matter, the local server can even automatically discover remote sinks via Avahi (mDNS) – you enable it and they just show up on the list.


                • Having a local server lets you choose which device should run CPU-intensive filters (equalizer, effect modules, etc.) – you can load them locally if streaming to a Raspberry Potato, instead of having the receiver do all the work.


                • Having a local server might also improve program performance as some libpulse operations receive local responses instead of having to wait for the remote server. (That said, I'm not sure which operations would be affected in reality. But I think it might make a very noticeable difference when the server goes down.)



                It's similar to using Xpra or RDP/VNC versus raw X11 forwarding. Having an intermediate X server on the "remote" side allows it to be smarter about network conditions (e.g. Xpra dynamically enables JPEG compression when it detects lag), provide error recovery and on-demand detach/reattach, and even GPU acceleration; whereas directly pointing $DISPLAY to another host means transferring huge raw pixmaps and crashing & burning every time the connection is interrupted.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 7 at 11:19

























                answered Feb 7 at 11:08









                grawitygrawity

                240k37508561




                240k37508561






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403076%2fremote-pulseaudio-setup%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Probability when a professor distributes a quiz and homework assignment to a class of n students.

                    Aardman Animations

                    Are they similar matrix