Persistent VLC connection to OBS via JACK and Pipewire in Linux

I want to use VLC to play music into a separate audio channel for my The Industrious Rabbit streams. I wanted to use JACK as I’m running Pipewire. Here’s how I set it up:

  • Create a new JACK audio source in OBS for 2 channels.
  • Don’t enable JACK output in VLC. I use KDE, so if I keep it on Automatic, I believe it uses PulseAudio, which is what you want as it keeps the name of the JACK VLC instance the same between VLC executions.
  • Get QJackCtl running and open Graph. You should see the OBS JACK input.
  • Start a file playing in VLC. You should see VLC in the Graph.
  • Open Patchbay. Patchbay has always confused me until now.
  • Add an Output Socket/Plug:
    • For VLC
    • For the first two output channels
  • Add an Input Socket/Plug:
    • For the OBS JACK audio source
    • For the two channels
  • Drag from the VLC output to the JACK input. A green line will connect the two.
  • Save the Patchbay definition! This is the step I never realized I had to do. You can’t do the auto patching until it’s saved. I saved it to my home directory.
  • The Activate button will no longer be disabled. Click it.
  • Now, as long as it’s active in the QJackCtl patchbay, VLC will always be connected to OBS, and the connection will be restored if one or both go away and come back.
  • When you restart QJackCtl, that patchbay option should be there again.

One gotcha is that the volume of VLC will keep resetting to 100% with each track change. You’ll have to adjust the volume in OBS accordingly, or run it through some other JACK filter.