Vencord / venmic

linux audio screenshare for discord (or any electron app) via pipewire
https://www.npmjs.com/package/@vencord/venmic
Mozilla Public License 2.0
86 stars 5 forks source link

No sound gets shared in screenshare #34

Open milantonin opened 3 weeks ago

milantonin commented 3 weeks ago

✍️ Bug Description

In my screenshare, people cant hear my systems sound but instead my microphone(i tried the Venmic setting(Microphone Workaround)) it doesnt matter if audio source is set to only browser (or any other application) or entire system. so the problem is Venmic

🔁 Steps to reproduce

im not 100% sure if that recreates it

click on [share your screen]
chose an application
set audio source to [Entire System]
click on [Open Audio Settings]
mark/unmark [Microphone Workaround]

🗒️ Debug Output

[2024-11-09 15:02:00.378] [venmic] [warning] [patchbay] (link) failed to link 159 (mic) -> 59 (node): link-factory: can't link ports 59 and 159: File exists
[2024-11-09 15:02:00.379] [venmic] [warning] [patchbay] (link) failed to link 107 (mic) -> 58 (node): link-factory: can't link ports 58 and 107: File exists
[2024-11-09 15:02:00.380] [venmic] [warning] [patchbay] (link) failed to link 159 (mic) -> 77 (node): link-factory: can't link ports 77 and 159: File exists
[2024-11-09 15:02:00.380] [venmic] [warning] [patchbay] (link) failed to link 107 (mic) -> 76 (node): link-factory: can't link ports 76 and 107: File exists
[2024-11-09 15:02:00.381] [venmic] [warning] [patchbay] (link) failed to link 159 (mic) -> 140 (node): link-factory: can't link ports 140 and 159: File exists
[2024-11-09 15:02:00.382] [venmic] [warning] [patchbay] (link) failed to link 107 (mic) -> 137 (node): link-factory: can't link ports 137 and 107: File exists
[2024-11-09 15:02:00.383] [venmic] [warning] [patchbay] (link) failed to link 159 (mic) -> 152 (node): link-factory: can't link ports 152 and 159: File exists
[2024-11-09 15:02:00.383] [venmic] [warning] [patchbay] (link) failed to link 107 (mic) -> 136 (node): link-factory: can't link ports 136 and 107: File exists
[2024-11-09 15:02:00.384] [venmic] [warning] [patchbay] (link) failed to link 159 (mic) -> 143 (node): link-factory: can't link ports 143 and 159: File exists
[2024-11-09 15:02:00.385] [venmic] [warning] [patchbay] (link) failed to link 107 (mic) -> 145 (node): link-factory: can't link ports 145 and 107: File exists

❔ Expected behavior

I expect it to capture my systems sound and output that sound the the screenshare instead of outputting my microphone sound (I expect the Microphone Workaround to work)

👀 Screenshots

Screenshot from 2024-11-09 14-47-59

📦 Vesktop Version

1.5.3

🖥️ Distribution

Zorin OS 17.2

✅ I confirm that...

Curve commented 2 weeks ago

Please attach the full debug log - not only a portion of it.

Also, was the provided screenshot captured with the "microphone workaround" setting turned on?

milantonin commented 2 weeks ago

Please attach the full debug log - not only a portion of it.

Also, was the provided screenshot captured with the "microphone workaround" setting turned on?

this should be the full log venmic1.log

this one is with Microphone workaround turned off micWAoff

this one is with Microphone workaround turned on micWAon

Curve commented 2 weeks ago

Can you also share a screenshot of the venmic settings you are using (as found in the screenshare modal)?

The linking of all these capture ports shouldn't happen (those from the t-bone microphone). The workaround seems to be applied correctly, however, it seems like your audio setup does not respect the pipewire properties set here... I'll have to try to reproduce this.

milantonin commented 2 weeks ago

Can you also share a screenshot of the venmic settings you are using (as seen in the screenshare modal)?

The linking of all these capture ports shouldn't happen (those from the t-bone microphone). The workaround seems to be applied correctly, however, it seems like your audio setup does not respect the pipewire properties set here... I'll have to try to reproduce this.

right now these Screenshot from 2024-11-10 15-09-58

Curve commented 2 weeks ago

Ah, Ignore Devices and Ignore Inputs being turned off explains why the microphone is included - can you check if turning that on prevents the microphone from being linked to venmic? As for the workaround not working, I'll have to investigate

milantonin commented 2 weeks ago

turning Ignore Devices and Ignore inputs on disconnects my microphone but in my stream other still hear it Screenshot from 2024-11-10 15-21-08

milantonin commented 2 weeks ago

Ok, so i tried some thing and the Chromium input-1 [RecordStream] seems to be the reason why my microphone still outputs in to the screenshare

with this others can hear me MicOutputinstream1

with this not MicOutputinstream0

Curve commented 2 weeks ago

turning Ignore Devices and Ignore inputs on disconnects my microphone but in my stream other still hear it

It correctly prevents the microphone from being linked to the venmic node - which is something you'd want in most cases.
The bigger issue at hand is that the microphone workaround doesn't work on your configuration, which results in Chromium incorrectly linking against the system microphone instead of the correct node, which in this case would be the venmic one.

This is usually fixed by telling pipewire to force the chromium node to connect to venmic. However, that doesn't seem to work on your system.

milantonin commented 2 weeks ago

If i connect the [media output node] with the Chromium input-1 [RecordStream] it works (makes sense but didnt thought of it yesterday) but i dont wanna use this as a workaround forever since it has to be done manually every time you start a screenshare. I'll try to automate it, but would be nice if you could tell me your thoughts on it since im not that experienced. image

Curve commented 2 weeks ago

As I said earlier, I know what the issue is and I will investigate this. Just be patient, I have a lot of things to do this week, I'll get to it soon