obs-pipewire-audio-capture icon indicating copy to clipboard operation
obs-pipewire-audio-capture copied to clipboard

sound disappearing

Open VladimirMrzv opened this issue 1 year ago • 19 comments

I am streaming video from games. Before i used virtual card from pipewire. Now trying this plugin, but after 3:30 minutes sound disappearing.

https://www.twitch.tv/videos/1533647249?t=0h3m17s from 3:30 no sound

Trying change input source, but not help. And no indication for sound in mixer.

VladimirMrzv avatar Jul 17 '22 05:07 VladimirMrzv

This may take a while to fix because it's happened to me before but it's very hard to reproduce since it's rare and random. What version of PipeWire are you running?

dimtpap avatar Jul 17 '22 15:07 dimtpap

I am on Ubuntu 22.04 pipewire 0.3.55 from https://launchpad.net/~pipewire-debian/+archive/ubuntu/pipewire-upstream

VladimirMrzv avatar Jul 17 '22 15:07 VladimirMrzv

I can help to reproduce it and save log. Write please how to do it.

VladimirMrzv avatar Jul 18 '22 10:07 VladimirMrzv

I generated a 3 hour audio file and let it run in its entirety two times, the stream never stopped. If you can reproduce it run pw-dump > pw-dump.log in a terminal and upload the pw-dump.log file here, thank you

dimtpap avatar Jul 18 '22 10:07 dimtpap

Here's my pw-dump.log after the same issue. I can't reproduce it at will but it only takes a couple of minutes to happen on my PC so if there's something else I can do identify the issue let me know.

pw-dump.log

New sources work, but the one that has this issue stops doing anything, even after changing the application or checking "Capture all apps except this one".

I'm running Pop!_OS 22.04 LTS, OBS 27.2.4, pipewire 0.3.53 and version 1.0.4 of the plugin.

Heliozoa avatar Jul 18 '22 12:07 Heliozoa

What are the outputs of journalctl -e --user-unit pipewire and journalctl -e --user-unit wireplumber? Also does it occur consistently after a few minutes?

dimtpap avatar Jul 18 '22 13:07 dimtpap

I forgot to mention it in the first post, but I think I've only tried using the plugin with games using Steam Proton so far. The application is wine64-preloader, which all Steam games seem to show up as when running them through Proton. The game the OP was playing doesn't have a native linux version, so I believe they were using Proton as well.

For today, the first is

-- Boot 20c48f78746748a19eb15919084990aa --
heinä 18 14:25:23 pop-os systemd[3225]: Started PipeWire Multimedia Service.

and the second

-- Boot 20c48f78746748a19eb15919084990aa --
heinä 18 14:25:23 pop-os systemd[3225]: Started Multimedia Service Session Manager.
heinä 18 14:25:23 pop-os wireplumber[3243]: Failed to set scheduler settings: Operation not permitted
heinä 18 14:25:24 pop-os wireplumber[3243]: <WpSiAudioAdapter:0x56094ab490b0> Object activation aborted: proxy destroyed
heinä 18 14:25:24 pop-os wireplumber[3243]: <WpSiAudioAdapter:0x56094ab490b0> failed to activate item: Object activation aborted: proxy destroyed

I've triggered the issue today twice around 1-2 hours after the latest timestamps in the logs. It seems relatively consistent, I have not had it working continuously for more than maybe 10 minutes.

Heliozoa avatar Jul 18 '22 13:07 Heliozoa

I've had it happen with native programs like Firefox and Discord so Proton/Wine is not related. Whenever you can, run OBS through a terminal using this command PIPEWIRE_DEBUG=5 PIPEWIRE_LOG=pwlog.txt obs --verbose. When the sound stops, post the pwlog.txt file, it will be in the directory you ran the command in

dimtpap avatar Jul 18 '22 13:07 dimtpap

my files pw-dump.log pwlog1.txt pwlog2.txt

I run game from steam in proton. Reproducing in Dying Light 2.

VladimirMrzv avatar Jul 18 '22 14:07 VladimirMrzv

This isn't guaranteed to fix the problem since it's so annoyingly random, but see if this build fixes it. Install it like you would install a regular release, replacing the installed version you have

Edit: If you want to manually build it here is the patch

dimtpap avatar Jul 18 '22 15:07 dimtpap

sad, but not helped

New logs pw-dump2.log pwlog6.txt pwlog5.txt

in file 5, after start no sound and plugin not work

VladimirMrzv avatar Jul 19 '22 15:07 VladimirMrzv

Hard to say for sure if something's fixed for sure with a random issue like this, but I had the plugin running using the build above without issues for 4 hours, compared to before where it would consistently stop working within 10 minutes.

edit: Nevermind, it broke again with a different game. It almost feels like it works for hours with some applications and breaks in minutes with others. Here's my pwlog.txt

Heliozoa avatar Jul 19 '22 16:07 Heliozoa

Try on another game and it works 3-4 hours. Maybe something go wrong with Dying Light 2.

VladimirMrzv avatar Aug 02 '22 13:08 VladimirMrzv

Hello here! I'm facing the same trouble too. Also using wine but other sounds sources vanish after some time too (firefox & discord already experienced). Will try to generate log on a future session.

aeris avatar Aug 29 '22 08:08 aeris

Playing around with the properties and taking a look at PipeWire's source code I could get the stream to not process when ALWAYS_PROCESS was set to true. From some quick and dirty searches on their GitLab it looked like these options just affected which driver the stream was set to follow. Setting both this and WANT_DRIVER to false hopefully prevents this behavior.

Try this build from commit 0b895f5

dimtpap avatar Sep 04 '22 14:09 dimtpap

Nice, i will try that soon!

aeris avatar Sep 04 '22 14:09 aeris

After update pipewire and today plugin it works better, but sound continue disappearing in DayingLight2. Now disappear after 1 hour and 25 minutes, it happened two times - 5 days ago and today.

VladimirMrzv avatar Sep 13 '22 18:09 VladimirMrzv

Let me know if this is happening with PipeWire 0.3.59

dimtpap avatar Oct 02 '22 23:10 dimtpap

No trouble here since last release and during 4-5h session. Will try it soon with 0.3.59.

aeris avatar Oct 03 '22 08:10 aeris

OBS 28.1.2, obs-pipewire-audio-capture 1.0.5, Pipewire 0.3.60 from the Fedora repos Application Audio Capture with Monster Hunter Rise (wine64-preloader selected) is consistently losing audio. Haven't tried anything else yet. Here's a log but I likely didn't catch it exactly after it happened. pwlog.txt

DonKatsu avatar Nov 27 '22 12:11 DonKatsu

Great news, after narrowing down the issue and reporting it to PipeWire it got resolved rather fast. I'll test it and I will close this if it's fixed. Thanks everybody for your help!

dimtpap avatar Dec 04 '22 13:12 dimtpap

All good! I'm expecting the fix to be included in the next PipeWire release, 0.3.62

dimtpap avatar Dec 04 '22 13:12 dimtpap

Thank you so much! I'm very glad it got solved

luni3359 avatar Dec 04 '22 16:12 luni3359