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

[Bug] <Screenshare when selecting "Entire System" as audio source sometimes doesn't stream audio> #29

Open Jayacheal opened 2 months ago

Jayacheal commented 2 months ago

Discord Account

jayache

Operating System

Kubuntu 24.04.1 LTS

Linux Only ~ Desktop Environment

KDE Plasma 5.27

Package Type

Flatpak and Deb

What happens when the bug or crash occurs?

When screensharing while audio source is set to "Entire System" the audio sometimes doesn't work, when I pause and unpause what I wanted to show the audio returns or goes away, this doesn't happen when I select a single audio source

What is the expected behaviour?

I expect Vesktop to stream audio normally even when it's streaming audio from the entire system

How do you recreate this bug or crash?

  1. Click on Screenshare and select the whole screen instead of a single app;
  2. Choose "Entire System" as Audio Source;
  3. Stream a Youtube video or anything that produces sound and ask a friend on call if he can hear it;
  4. If he can or can't hear it pause and unpause the video and ask again if he can now hear it or not.

Debug Logs

[2024-09-15 02:20:46.269] [venmic] [info] [patchbay] (get) running venmic 6.1.0
[2024-09-15 02:20:51.844] [venmic] [info] [patchbay] (create_mic) created: 113
[45:0915/022101.632302:ERROR:vaapi_wrapper.cc(1585)] Could not get a valid VA display
[45:0915/022101.632701:ERROR:vaapi_video_encode_accelerator.cc(1162)] Calling NotifyErrorStatus(7), message=Failed initializing VAAPI for profile h264 baseline
[45:0915/022101.632774:ERROR:mojo_video_encode_accelerator_service.cc(361)] Call NotifyErrorStatus(): code=7, message=Failed initializing VAAPI for profile h264 baseline
[45:0915/022105.651072:ERROR:vaapi_wrapper.cc(1585)] Could not get a valid VA display
[45:0915/022105.651282:ERROR:vaapi_video_encode_accelerator.cc(1162)] Calling NotifyErrorStatus(7), message=Failed initializing VAAPI for profile h264 baseline
[45:0915/022105.651363:ERROR:mojo_video_encode_accelerator_service.cc(361)] Call NotifyErrorStatus(): code=7, message=Failed initializing VAAPI for profile h264 baseline
[45:0915/022111.700123:ERROR:vaapi_wrapper.cc(1585)] Could not get a valid VA display
[45:0915/022111.700448:ERROR:vaapi_video_encode_accelerator.cc(1162)] Calling NotifyErrorStatus(7), message=Failed initializing VAAPI for profile h264 baseline
[45:0915/022111.700564:ERROR:mojo_video_encode_accelerator_service.cc(361)] Call NotifyErrorStatus(): code=7, message=Failed initializing VAAPI for profile h264 baseline
[2024-09-15 02:22:10.380] [venmic] [warning] [patchbay] (map_ports) 100 has no ports
[2024-09-15 02:22:10.382] [venmic] [warning] [patchbay] (map_ports) 100 has no ports
[2024-09-15 02:22:21.860] [venmic] [warning] [patchbay] (map_ports) 0 has no ports
[2024-09-15 02:22:21.860] [venmic] [warning] [patchbay] (map_ports) 0 has no ports
[2024-09-15 02:22:45.490] [venmic] [warning] [patchbay] (map_ports) 100 has no ports
[2024-09-15 02:22:45.490] [venmic] [warning] [patchbay] (map_ports) 100 has no ports

Request Agreement

Curve commented 2 months ago

Does this only happen after the first time audio is shared or does it also happen after you shared audio several times?

Jayacheal commented 2 months ago

there is always a change this happens when I play an audio on my screen, unless the audio source is set to a single app like Firefox.

Curve commented 2 months ago

Interesting - Looks like pipewire is notifying venmic of the available ports too late - I'll see what I can do

Jayacheal commented 3 weeks ago

so, I'm still having this same problem, is there anything I can do as a temporary solution? it's pretty annoying having to select an specific audio source every time I want to screenshare. also I've recently switched to Wayland but that hasn't changed anything.

Curve commented 3 weeks ago

Upon receiving information on a new port venmic already retries to link the parent node, so it should work - not sure why it wouldn't. Can you try adjusting the Venmic settings (you can tweak them before starting a stream) to see if tweaking them helps?