I’m trying to wrap my head around the pipewire ecosystem. I think it’s great that we’re getting a fully featured audio system with all the upsides of pulseaudio and jack, and none of the downsides (that I know of), plus a bunch of completely new features. However, I can’t help but think it could have used a little more vision in its interface (or maybe just qpwGraph).

From what I’ve read, my mental model is that pipewire holds the graph, while a “session manager” manipulates it (create/modify/remove new nodes/ports/links/etc). That’s fine. I also understand that wireplumber is such a session manager, and despite having a really convoluted config syntax, it does its job (I assume).

As a simpleton, though, I’m drawn to the wysiwyg interface of qpwGraph, but it’s not clear to me how it’s supposed to fit into pipewire’s vision or how it interacts with wireplumber. It seems to render the current pipewire graph as it is, it can create/remove links between ports, but also it’s not a session manager (right?).

I suspect that whatever I can do in qpwGraph I could also do using just wireplumber via conf files and the cli. But dragging my mouse between nodes is so much easier than learning a new syntax. But then I also don’t understand what “Active” and “Exclusive” mean. I’m guessing that if Active isn’t checked, it won’t do anything at all, but if Exclusive isn’t checked then…maybe wireplumber can override it? Does that mean if Exclusive IS checked it’s able to override wireplumber (look at me, I am the session manager now)? Is that why, if I have a qpwgraph active that links VLC to both OBS and my headset, I hear/see a delay of the link to my headset when a VLC process launches? First wireplumber decides where it should link, and then qpwGraph modifies it several ms after?

I feel like it’s currently not clear what qpwGraph is in pipewire terms, but it’s also clearly the most intuitive way for someone to use pipewire right now. I think it would be best if qpwGraph was either a standalone, fully featured session manager (not to be used in combination with wireplumber) or just a front end for wireplumber rather than talking to pipewire directly.

Thoughts? Anyone else confused? Am I missing a piece to the puzzle?

  • bluGill@kbin.social
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    If you are like most people you have speakers attached to your computer and sometimes you plug in headphones and use them instead. For this wireplumver automatically does the right thing and you get sound where you want it. Easy and magic.

    The other case is you have a studio and you constantly change where you want your sound to go. This can’t be automated, as it changes constantly. Qpwgragg works for you giving you the control you need.

    The use cases are very different.

    • teawrecks@sopuli.xyzOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      I have two usecases that complicate my workflow:

      • discord: supports streaming video (webcam or screenshare) but not audio (aside from your one mic). I sometimes use qpwGraph to pipe the audio of an app I’m streaming into my mic mix. It sucks that my friends can’t adjust the volume of it separately from me, but it also sucks that everyone uses discord.
      • clipping game video+audio and discord audio: I use OBS replay buffer with jack audio nodes to capture the last 1m of gameplay along with separate audio channels for the game I’m playing, my own discord audio, and the audio of anyone else in discord.

      So I get pretty good use out of qpwGraph, but sometimes it seems to interact in non-obvious ways with wireplumber I think.

      Edit: oh, and a 3rd case:

      • Running my mic input through librnnoise
      • jaykstah@waveform.social
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        For the second part, using separate audio tracks in OBS, I’ve had a good time just using pactl commands to create the virtual devices, route it in qpwgraph and then save that as a preset. When qpwgraph launches at startup it loads that routing how I left it.

        For discord screensharing there’s alternatives like discord-screenaudio and webcord (which has a flag you can use to enable audio sharing). Both of those are able to send audio to the proper stream audio through discord so your friends don’t hear it through your mic, but they have to be based on the web version of discord so there’s no hardware encoding. If your plan is to stream games and stuff, fast motion will cause the stream to be very choppy for viewers. So in that case using the native discord app and routing audio through your mic source is kinda the only way to do it as of now, unfortunately.

        • jaykstah@waveform.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I should also mention that for creating the pactl virtual sinks and sources, I just have a simple bash script that runs the pactl commands when I log in so that it happens automatically, that way I dont have to manually create them every time I boot up my computer.

          • teawrecks@sopuli.xyzOP
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Oh cool, didn’t know discord-screenaudio and webcord were options. Thanks!

            Btw, there is an official way to run pactl commands on login by putting them in .config/pulse/default.pa. Maybe that’s what you mean.

            I used to do this, but when I switched to pipewire I also tried to eliminate pa/jack from my workflow. I still use OBS jack nodes because when I first configured it, the OBS pipewire support was flimsy and the jack nodes show up with consistent names in qpwGraph.

    • Aki@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Considering I have like 4 audio devices connected, I think using qpwgraph on top of pipewire+wireplumber I think is intended, especially since pipewire comes installed with wireplumber as pipewire’s defacto session manager on pacman.

  • Scraft161@iusearchlinux.fyi
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Pipewire is the audio server

    Wireplumber manages your interfaces and their connections automatically

    Qpwgraph let’s you view and modify these interfaces and connections manually

    Bot wireplumber and qpwgraph talk to pipewire to change the state of your interfaces, but they are unaware of each other. Theoretically this means you can forgo either qpwgraph or wireplumber, but you don’t really want to go without wireplumber as that would mean you have to configure every interface and connection manually.

    • teawrecks@sopuli.xyzOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I don’t think I can forego wireplumber can I? qpwGraph won’t create new nodes. I guess I would be creating every node/port in pipewire directly, and then linking them using qpwGraph? But yeah, for every device I connect I would need to manually create a pipewire node?

      So does that mean qpwGraph is a sort of minimal “session manager”?

      • Scraft161@iusearchlinux.fyi
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Sort of, that said I rarely pull open qpwgraph (and I didn’t configure wireplumber yet either) and it’s been pretty ok for me.

        Also remember that all these nodes correspond to some input or output stream (good chance it might be gstreamer or ffmpeg doing this) and from what I think is happening is that these are created by these programs through the pipewire API or the one from the other audio servers it’s faking and wireplumber merely hides them using some flag.

        That said, I have not dug I to the pipewire documentation so this is a guess on my part.