dimtpap / obs-pipewire-audio-capture

🔊 Audio device and application capture for OBS Studio using PipeWire
https://obsproject.com/forum/resources/pipewire-audio-capture.1458/
GNU General Public License v2.0
298 stars 9 forks source link

"pw_stream_set_active" Errors appearing in log, unable to select filter chain again. #33

Closed KynikossDragonn closed 10 months ago

KynikossDragonn commented 10 months ago

Using PipeWire 0.3.77 and OBS 29.1.3

I can't select my filter chain anymore. The plugin instead grabs the raw microphone device and the following shows in the terminal:

info: User added source 'Microphone' (pipewire_audio_input_capture) to scene 'Main'
*** pw_stream_set_active called from wrong context, check thread and locking: Operation not permitted
info: [pipewire] 0x562987edcec0 Got format: rate 48000 - channels 1 - format 8
*** pw_stream_set_active called from wrong context, check thread and locking: Device or resource busy
*** pw_stream_set_active called from wrong context, check thread and locking: Operation not permitted
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Microphone)

info: [pipewire] 0x562987edcec0 streaming from 59
*** pw_stream_set_active called from wrong context, check thread and locking: Operation not permitted
*** pw_stream_set_active called from wrong context, check thread and locking: Operation not permitted
info: [pipewire] 0x562987edcec0 Got format: rate 48000 - channels 1 - format 8
*** pw_stream_set_active called from wrong context, check thread and locking: Operation not permitted
*** pw_stream_set_active called from wrong context, check thread and locking: Operation not permitted
*** pw_stream_set_active called from wrong context, check thread and locking: Operation not permitted
info: User Removed source 'Microphone' (pipewire_audio_input_capture) from scene 'Main'

My filter chain conf: voicemod.conf.gz

Additionally; the plugin doesn't load if placed in ~/.config/obs-studio/plugins/ and only seems to load if placed in /usr/lib/obs-plugins/ but I can't find any reasoning for why this is occurring anywhere in the official documentation.

dimtpap commented 10 months ago

Could you try 8d72644?
linux-pipewire-audio-8d72644.zip

KynikossDragonn commented 10 months ago

That commit seems to fix the error messages, but it still wont connect to the filter-chain:

It sees the chain in the device list and let's me select it: Screenshot_2023-08-22_06-00-04

Helvum shows otherwise, the plugin is going directly to the microphone itself and not the filter chain: Screenshot_2023-08-22_06-00-16

Even when I change it back and forth from "Blue Snowball" to "Voice Modulation Source" it's reflected in the log, but it's constantly being forced to the wrong device anyways:

info: [pipewire] Created stream 0x55bff8e3eef0
info: [pipewire] 0x55bff8e3eef0 streaming from 47
info: User added source 'Microphone' (pipewire_audio_input_capture) to scene 'Main'
info: [pipewire] 0x55bff8e3eef0 Got format: rate 48000 - channels 1 - format 8
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Microphone)
info: [pipewire] 0x55bff8e3eef0 streaming from 59
info: [pipewire] 0x55bff8e3eef0 streaming from 47
info: [pipewire] 0x55bff8e3eef0 streaming from 59
info: [pipewire] 0x55bff8e3eef0 Got format: rate 48000 - channels 1 - format 8
info: [pipewire] 0x55bff8e3eef0 streaming from 47
info: [pipewire] 0x55bff8e3eef0 Got format: rate 48000 - channels 1 - format 8
info: [pipewire] 0x55bff8e3eef0 streaming from 59
info: [pipewire] 0x55bff8e3eef0 Got format: rate 48000 - channels 1 - format 8
info: [pipewire] 0x55bff8e3eef0 streaming from 47
info: [pipewire] 0x55bff8e3eef0 Got format: rate 48000 - channels 1 - format 8
info: [pipewire] 0x55bff8e3eef0 streaming from 59
info: [pipewire] 0x55bff8e3eef0 Got format: rate 48000 - channels 1 - format 8

This used to work perfectly fine so I don't know what changed or what's going on. Other PipeWire things I've been using have been able to properly select the filter chain, and it's properly selectable in OBS's PulseAudio backend (but it used to crash wireplumber entirely when I tried back then)

Do I need to change something in my filter chain configuration file? Does anything in this block look incorrect?

capture.props = {
    target.object = "alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201606-00.mono-fallback"
    audio.position = [ MONO ]
    audio.channels = 1
    node.name = "effect_input.filter-chain-voicemod"
    node.passive = true
}
playback.props = {
    audio.position = [ MONO ]
    audio.channels = 1
    node.name = "effect_output.filter-chain-voicemod"
    stream.dont-remix = true
    media.class = Audio/Source
}