obs-pipewire-audio-capture
obs-pipewire-audio-capture copied to clipboard
REQ: Allow multiple apps to be excluded from Application Audio Capture (PipeWire)
Thank you very much for obs-pipewire-audio-capture 🙇 It has resolved several audio-related issues in my OBS Studio setup and helped simplify my scene/source composition.
Feature Request
When adding an Application Audio Capture (PipeWire) source, include the capability to Capture all apps but exclude multiple apps.
Rationale
With this capability added it would be possible to:
- Add an
Application Audio Capture (PipeWire)and exclude Spotify and Discord. - Spotify and Discord can then be added as discrete
Application Audio Capture (PipeWire)sources and managed via OBS independently of all other audio output.
Audio Input/Output captures stream directly from the devices. What you really want is the App Capture to be able to exclude multiple apps
I've updated the issue accordingly.
Turns out OBS's API doesn't allow for an easy way to create a nice interface for this. I've pushed what I've come up with so far on the multiple-apps-per-source branch.
⚠️ Before proceeding, please backup your scenes/sources, existing app captures may break
You can do this in OBS Studio by going on Scene Collection, then Export
Use Import to restore your backup.
Here's a build for you to try out
Thank you for working on this 🙇
I've updated PipeWire to 0.3.63 on Ubuntu 22.04.1 because I read #17
I run my own from source OBS Studio, so I've built 29.0.0 and built your plugin from the multiple-apps-per-source branch.
I created a simple scene based on my original feature request.
- Audio Input Capture (PipeWire) - Mic
- Audio Application Capture - Capture all applications except for
spotifyandDiscord - Audio Application Capture - Target
spotify - Audio Application Capture - Target
Discord - Camera
I've tested local recordings only and just for a few minutes, and it works perfectly ⭐ Each audio source can be manipulated independently and I haven't encountered any audio distortion/corruption. I'll update my usual streaming setup and test it for real in the next few days and report back.
But thank you, this is ace!
No issues during a 2-hour live stream using multiple instances of Audio Application Capture without and with exceptions applied.
I've streamed several times now, and sadly, this branch of the plugin is introducing audio distortion that manifests as clicks and stutters. I'm aware of the expander/limiter bug in upstream OBS 29 and applied the patches; it is not that.
I am using a build of this plugin from the tip of the main branch 32889fc1a0af5e31bd2eb5f1ab45a9c5368ddd4e, and I haven't encountered any audio distortion.
That's interesting, no audio related changes were made. Do you have a clip where the distortions occur?
@dimtpap It might be PipeWire itself, as I do hear the clicks in the regular version of the PipeWire Plugin too. Using PulseAudio Input Capture for my Mic in OBS seems to clear things up.
I'm at conferences for the next several days, but I will do some thorough testing and report back.
The feature branch was actually created after I made some audio related changes to the plugin. I'd assume either https://github.com/dimtpap/obs-pipewire-audio-capture/commit/ff03b02dd1b364ccce4689a637cfc3cc9fabed96 or https://github.com/dimtpap/obs-pipewire-audio-capture/commit/91b71f1201ca77ace5085ac17acb2c3bbb4290a9 is responsible for the sound glitches but I cannot reproduce them. If you find that the plugin is indeed responsible for the glitches open another issue and as a workaround use the latest (1.0.5) release as it was published before the audio changes.
@dimtpap can you add option to see all application in list for chooseing source, some games disable sound when switching to obs for configuration. And maybe multiple list for apps with more 2 sound streams or for other apps.
I'd love to try this out, but I need some features from 1.1.0 — can the feature branch be rebased?
Rebased linux-pipewire-audio-b59f1d5.zip
@dimtpap excellent build. It is works for me. I can add application by his execute name and more than one.
@dimtpap Sorry for the long delay in getting back to you on this. It has been a few months since I've been not streaming to prioritise work and home life.
- This feature works great. Thank you! 🙇
- I've tested
obs-pipewire-audio-capturev1.1.1 with OBS 29.1.3 and 30.0.0-beta on Pipewire 0.3.71
- I've tested
- The audio distortion/clicks I reported are not related to
obs-pipewire-audio-capture- After tweaking Pipewire quantum clocks, audio glitches are cleared up.
Thank you for working on this feature and for your patience in waiting for my feedback.
@dimtpap
Rebased linux-pipewire-audio-b59f1d5.zip
can you update this build with new feature for showing paused sources or merge builds with option for extended config
can you update this build with new feature for showing paused sources
linux-pipewire-audio-71fdfdd.zip
I don't know if enough people need this to justify making the workflow harder for those that only capture single apps
@dimtpap please update again this build, this is very comfortable for me
linux-pipewire-audio-c35fb3c.tar.gz
You can also find builds for any new commit here, under the "Artifacts" section of any entry.
Hey, the multiple-apps-per-source branch is amazing!
Sadly the associated program names are not saved for me when I quit OBS, otherwise it's working great!
I've installed the latest artifact version on OBS 30.1.0-1.
Are there any significant drawbacks to the "normal" version, which is why you don't want to merge it into the base branch yet?
I don't see any reason anybody would want less freedom for routing audio and I don't find the UI more complicated at all
Using this branch of the plugin I can separate Browser, Discord & Spotify into different channels and lump everything else (any arbitrary game and whatever is left) together, while also bypassing my EasyEffects EQ (capturing desktop audio was otherwise full of artifacts).
I couldn't do that without this branch of the plugin and it has been quite the gamechanger for me.
Sadly the associated program names are not saved for me when I quit OBS
I'll look into that
Are there any significant drawbacks to the "normal" version, which is why you don't want to merge it into the base branch yet? I don't see any reason anybody would want less freedom for routing audio and I don't find the UI more complicated at all
I think finding the app in the list, clicking on it, then clicking a button is more complicated than just finding and clicking the app in the list, especially when most users want to capture a single app (just a guess). Here is my comparison
Single app:
- Less clutter in the source properties
- Per-app audio control (per-source filters and mixer entries) - Why I think the single app mode is better and more widely used
Multiple apps:
- Less PipeWire nodes - Probably less stress put on PipeWire, but not enough for this point to be that good.
- Ability to exclude multiple applications (what the original issue was made for) - This is probably the best reason to consider supporting multiple apps as a main feature, but makes it useless to have multiple sources in the same scene, unless you're using them to switch between sets of applications to exclude I guess
So the obvious way forward is to provide a mode drop-down, so that users can choose what trade-offs they'd rather make. I'll work on this and see how it goes (scared of complexity and feature creep)
Thanks for the response! Yeah, I guess three clicks is more than two :'D
A setting to have both options would be better of course and would allow you to have one code base instead of two.
I get the fear of feature creep, I have experienced the same in multiple projects but I think selecting multiple sources is quite a fundamental and powerful feature and is worth it to implement.
Btw one thing I noticed - the plugin saves the last selected item in the dropdown menu, it just does not save what I put into the list.
I can second the need for it, it makes recording universal audio and removing music and discord MUCH nicer. The alternative would be making 50 billion unnecessary audio captures for everything I want audio for and that would be absurdly annoying. Before this branch I was genuinely considering never listening to music while playing games again just to get around the issue.
Thanks for the response! Yeah, I guess three clicks is more than two :'D A setting to have both options would be better of course and would allow you to have one code base instead of two.
I get the fear of feature creep, I have experienced the same in multiple projects but I think selecting multiple sources is quite a fundamental and powerful feature and is worth it to implement.
Btw one thing I noticed - the plugin saves the last selected item in the dropdown menu, it just does not save what I put into the list.
Big issue right now. Any updates on this? 🙏
This branch is critical for my workflow, would love to see updates on this. Only thing that isn't working for me is my selections are not saving between obs restarts.
Edit: Sorry, I meant they are not saving when I use the drop down. Typing them in manually seems to be a workaround.
Branch was rebased and built for OBS 30.2 as well to work with Flatpak.
I want to apologize for no progress on making this a main feature. I'll take a look into making this a main feature again but I can't say an ETA yet, thanks for understanding.
Posting artifacts from this CI run because they expire
Idk why, or if I am doing anything wrong. But I cannot for the life of me get this to work correctly. I have installed it, the sources show up, but it all displays like the normal version. Regardless of if I build from source or use the tar.gz you provided. I'll try and report back a fix if I find one...
@EmersonBiggons sounds like you've installed the regular version somewhere else and it loads that one
@EmersonBiggons sounds like you've installed the regular version somewhere else and it loads that one
Apparently, due to how Nobara 40 installs OBS it gets a little confused. It comes with main PAC as a package, so I disabled that and deleted it, then built the Multiple Apps per Source from the repo, and it went back to default.
So I just went to every part of OBS that had Pipewire Audio Capture and deleted all of it. Then I started OBS to make sure it was gone, and it was. Then I downloaded the linux-pipewire-audio-add302b-30.2.0.tar.gz and then I popped that into the .config folder for OBS and bamb it works.
It is very strange tho, when I tried various version of the MAPS builds none of them worked until I went scorched earth and started from step one again. Annoying, but it works. Thank you!