IceDBorn / pipewire-screenaudio

Extension to passthrough pipewire audio to WebRTC Screenshare
https://addons.mozilla.org/firefox/addon/pipewire-screenaudio/
GNU General Public License v3.0
165 stars 5 forks source link

Virtmic outputs audio to yourself #79

Open Eetrexx opened 11 months ago

Eetrexx commented 11 months ago

Hello,

It seems that while streaming, you can hear the audio of the stream, resulting in hearing the application you are streaming twice (with a small delay).

Current system:

Void Linux (kernel 6.5.12) Pipewire 0.3.85 Firefox 120 Xorg server 21.1.9 KDE Plasma 5.27

IceDBorn commented 11 months ago

A screenshot of helvum would be helpful.

Eetrexx commented 11 months ago

image This is an example of me streaming the sound of a game (Halls of Torment in this case)

If the image is not clear enough I can get another screenshot

pallaswept commented 11 months ago

I can't replicate this issue, using discord. In your case, the audio is not coming from the addon, it is being sent back out from firefox, so it will be whatever chat software you are using.

IceDBorn commented 11 months ago

Can you test this on Wayland?

pallaswept commented 11 months ago

I had a shot at #82 tonight, which meant I had to use nightly so I could use unsigned addons, and guess what bug I had?

Are you SURE you're using 120 there, OP? Because 120 doesn't do this but nightly does.

Eetrexx commented 11 months ago

@pallaswept yes, thats the version I was using when the bug happened. At least on X it is happening.

@IceDBorn I tested this on wayland, and the problem doesn't exists there

Here is helvum on wayland

image

I've tried to test on Google Meet but I couldn't manage to use the extension there.

Sorry for the long delay.

pallaswept commented 11 months ago

That's bizarre, I was using Wayland when I got it. We can reproduce the same bug, only under opposite circumstances. Weird!

IceDBorn commented 11 months ago

That's bizarre, I was using Wayland when I got it. We can reproduce the same bug, only under opposite circumstances. Weird!

And that's why we hate dealing with Discord...

IceDBorn commented 2 months ago

Is this still an issue?

Eetrexx commented 2 months ago

Please forgive my absence, I ended up forgetting the issue after I started using recent versions of Vesktop. (ADHD brain)

Yes, it happens.

https://github.com/user-attachments/assets/96c7fe19-f7ca-4ec4-b38a-49b381f99356

This is an example of it happening (the audio repeats itself). In this video I open qpwgraph to see the nodes involved. I can disconnect the nodes from the source stream to the speakers, and it kinda works, but lags

However it is inconsistent. A linux-native game seems to work:

https://github.com/user-attachments/assets/efa6404c-9a7f-4090-a3ed-4e2613bcc3d3

(I played just a tiny bit here to try to notice the problem, thinking it could be repeating the audio but being well synced).

This is how qpwgraph looks in the second example:

pwgraph

Both cases I started sharing the audio in the extension, then started the stream on a Discord tab in Firefox.

I tested this on Plasma 6 Wayland. I could try X and other WM/DEs. It seems weird to me that on the patchbay graph there doesn't seem to be a difference in the audio stream nodes between the example that works and the one that does not.

pallaswept commented 2 months ago

I wasn't able to reproduce this just now, but, obviously that might not be trivial, so it's quite possible I can, but I don't know how.

there doesn't seem to be a difference in the audio stream nodes between the example that works and the one that does not.

When I did see the bug, I noticed this, too.