Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

Audio share doesn't work properly #28

Closed
AleMarigliano16 opened this issue Jul 31, 2022 · 18 comments
Closed

Audio share doesn't work properly #28

AleMarigliano16 opened this issue Jul 31, 2022 · 18 comments
Labels
bug Something isn't working

Comments

@AleMarigliano16
Copy link

Whenever I try to share audio, the audio actually shared is my mic. No matter what I choose. So the other person in call hears me twice.
I tried changing the audio input in discord settings to vmic and it shares the audio of the application but it won't get my mic anymore.
I tried both the AUR and Flatpak versions. Same issue

@MrKingMichael
Copy link

A workaround: Open Pavucontrol > Recording > Change input device of bottom Chromium input process to "discord-screenaudio-virtmic".

@maltejur maltejur added the bug Something isn't working label Jul 31, 2022
@maltejur
Copy link
Owner

Hm this is not the first time I heard of this issue, but I never had it myself. Can you share steps to reproduce this in a VM?

@maltejur
Copy link
Owner

maltejur commented Aug 1, 2022

Maybe relevant issue: edisionnano/Screenshare-with-audio-on-Discord-with-Linux#21

Are you both using Wireplumber?

@StayBlue
Copy link

StayBlue commented Aug 1, 2022

Maybe relevant issue: edisionnano/Screenshare-with-audio-on-Discord-with-Linux#21

Are you both using Wireplumber?

I am having the same issue on X11 using Wireplumber, but either way, pipewire-media-session has been superseded by Wireplumber, and pipewire-media-session hasn't been updated in almost three months.

I am not sure how this application works, but from what I see, the application you are screen sharing feeds into virt-mic, but the audio from it doesn't get fed into anything.

My temporary solution is to unpipe the application I am trying to screen share from the virt-mic and instead pipe it directly into the chromium input for the stream (I also unpipe the stream from my microphone, so people don't hear me twice)

Image of the problem:
image

Image of my solution:
image

@bbaster
Copy link

bbaster commented Aug 1, 2022

@maltejur After some testing I have concluded that a similar issue (one of the Chromium input RecordStreams being set to "Usb Audio Device Mono" and another being set to "discord-screenaudio-virtmic") happens with media-session too, hovewer switching back and forth between "Usb Audio Device Mono" and "discord-screenaudio-virtmic" in the input settings in Discord fixes it, setting both Chromium input RecordStreams to "discord-screenaudio-virtmic", while with Wireplumber they just seem to switch order for some reason.

@maltejur
Copy link
Owner

maltejur commented Aug 1, 2022

Hm ok after checking I am also using wireplumber and everything works fine for me. Can one of you send me an exact setup where I can reproduce the issue?

@ianlhicks
Copy link

I have a similar issue, but only with Wine/DXVK games. I believe this is due to XWayland, as I do not experience it in native running games that I've tested as well as streaming browser videos.

I'm going to try wine-wayland and see if I encounter similar issues, and I'll report back.

For reference, I'm using Garuda Linux with GNOME Wayland and PipeWire.

@bbaster
Copy link

bbaster commented Aug 1, 2022

@maltejur When you open Pavucontrol right after starting the stream are both Chromium inputs in the Recording tab set to "discord-screenaudio-virtmic"?

@maltejur
Copy link
Owner

maltejur commented Aug 1, 2022

Okay the same thing now also happens to me, but only some times. Well at least I can play arround with it now and see if I can find any fix

When you open Pavucontrol right after starting the stream are both Chromium inputs in the Recording tab set to "discord-screenaudio-virtmic"?

Now yes

@maltejur
Copy link
Owner

maltejur commented Aug 1, 2022

Okay I have found a potential fix, just waiting at one point for all audio devices to come available. It fixed the issue for me, but it also worked flawlessly for me before so not sure if this really is the solution. Could one of the people who had this issue consistently test the changes I pushed to master?

@bbaster
Copy link

bbaster commented Aug 1, 2022

@maltejur I have built and tested master, sadly the top input right after starting a stream is set to "Usb Audio Device Mono":

Screenshot_20220801_232248

Luckily now changing the input device in Discord to "Usb Audio Device Mono" and then back to "discord-screenaudio-virtmic" fixes this issue:

Screenshot_20220801_232513

@maltejur
Copy link
Owner

maltejur commented Aug 1, 2022

sadly the top input right after starting a stream is set to "Usb Audio Device Mono"

Isnt that how you would want it to be? The top one is the microphone and the bottom one is the stream (at least I think this is the case here)

@AleMarigliano16
Copy link
Author

Okay I have found a potential fix, just waiting at one point for all audio devices to come available. It fixed the issue for me, but it also worked flawlessly for me before so not sure if this really is the solution. Could one of the people who had this issue consistently test the changes I pushed to master?

It seems to work! Just tested it. Thanks.

@edisionnano
Copy link
Contributor

Okay I have found a potential fix, just waiting at one point for all audio devices to come available. It fixed the issue for me, but it also worked flawlessly for me before so not sure if this really is the solution. Could one of the people who had this issue consistently test the changes I pushed to master?

Since you only have discord-screenaudio-virtmic it would probably be a better idea to poll enumerateDevices until said device shows up

@maltejur
Copy link
Owner

maltejur commented Aug 2, 2022

it would probably be a better idea to poll enumerateDevices until said device shows up

good idea, I did that now

@bbaster
Copy link

bbaster commented Aug 2, 2022

Isnt that how you would want it to be? The top one is the microphone and the bottom one is the stream (at least I think this is the case here)

Really? I had no idea this project allowed proper audio share not through the microphone, will certainly need to do some more testing

@StayBlue
Copy link

StayBlue commented Aug 3, 2022

Can confirm that the recent commits fixed the no sound issue on my stream.

@maltejur
Copy link
Owner

maltejur commented Aug 3, 2022

Great to hear, I'll close this then

@maltejur maltejur closed this as completed Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants