You are not logged in.

#1 2025-08-19 10:12:25

ntonino
Member
Registered: 2025-08-19
Posts: 5

Discord does not share the audio of PipeWire applications

Running KDE Plasma under Wayland and a stock configuration of PipeWire (as in, no setting touched, no thinkering, etc.). When trying to screen-share on Discord, the users could only "selectively" hear the audio coming from different applications.

After some troubleshooting, and thinking this was an issue with Wayland rather than with the sound server, I switched to PulseAudio and noticed how audio-sharing worked as intended. From this comes the assumption that Discord shares audio from applications that still use the PulseAudio server (e.g. Firefox), while refuses to share the audio from applications that directly use the PipeWire server (e.g. Telegram).

An example of this can be reproduced with MPV. By default, MPV uses PipeWire as its audio server (making its audio inaudible by the voice-chat members on Discord); if appending the following to MPV:

mpv --ao=pulse

then the different members of the voice-chat can hear the audio coming from from the player. Obviously, if switching to PulseAudio, all applications are forced to use the PulseAudio server, making their audio listenable on a Discord audio-share.

For the time being, I'm sticking to PulseAudio, but knowing that it's prone to be replaced by PipeWire in all occasions, I'd like to get the latter working as usual.
Considering what said above, is it possible to get the audio of all applications piped to Discord (if that's even the correct wording) on PipeWire?

Last edited by ntonino (2025-08-19 10:15:58)

Offline

#2 2025-08-19 11:26:05

StarWolf3000
Member
Registered: 2025-06-23
Posts: 43

Re: Discord does not share the audio of PipeWire applications

Try

# pacman -S pipewire-pulse

while pipewire is installed, and pulseaudio is not installed.


Mainboard: GIGABYTE B550 AORUS ELITE V2 | CPU: Ryzen 7 5800X | RAM: 32 GB
GPU: GeForce RTX 4060 8 GB (580.119.02 proprietary) | Display: BenQ BL2405 1920x1080
Kernel: 6.18.1 stable | Boot Manager: GRUB2 | DE: KDE Plasma | Login Manager: SDDM | Compositor: KWin

Offline

#3 2025-08-19 11:58:22

ntonino
Member
Registered: 2025-08-19
Posts: 5

Re: Discord does not share the audio of PipeWire applications

Thanks for the reply. I've moved back to PipeWire to confirm this, and I have achieved the same results, that consists on the other end only hearing applications running under PulseAudio.

Made sure that the package you've mentioned is installed:

[ant@ant ~]$ sudo pacman -Q pipewire-pulse 
pipewire-pulse 1:1.4.7-1

...and that PulseAudio was not installed:

[ant@ant ~]$ sudo pacman -Q pulseaudio
error: package 'pulseaudio' was not found

Offline

#4 2025-08-19 12:10:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,960

Re: Discord does not share the audio of PipeWire applications

Pretty sure that pipewire should expose pipewire clients to pulse clients. If you compare stuff like

pactl list sinks
pw-dump

what differences do you see?

Other than that it should be quite possible to force all those applications to their pulse backend while still remaining on pipewire.

Offline

#5 2025-08-19 12:23:23

ntonino
Member
Registered: 2025-08-19
Posts: 5

Re: Discord does not share the audio of PipeWire applications

Considering you said "PulseAudio clients", was I supposed to run

pactl list clients

instead of checking the sinks? In that case, yes, I do notice that the PipeWire client (in this case, an MPV video) gets passed through PulseAudio. Here are the differences between the two:

PipeWire
  {
    "id": 72,
    "type": "PipeWire:Interface:Node",
    "version": 3,
    "permissions": [ "r", "w", "x", "m" ],
    "info": {
      "max-input-ports": 0,
      "max-output-ports": 65,
      "change-mask": [ "input-ports", "output-ports", "state", "props", "params" ],
      "n-input-ports": 0,
      "n-output-ports": 2,
      "state": "running",
      "error": null,
      "props": {
        "adapt.follower.spa-node": "",
        "application.icon-name": "mpv",
        "application.id": "mpv",
        "application.name": "mpv",
        "client.id": 112,
        "clock.quantum-limit": 8192,
        "factory.id": 9,
        "library.name": "audioconvert/libspa-audioconvert",
        "media.category": "Playback",
        "media.class": "Stream/Output/Audio",
        "media.name": "test.mp4 - mpv",
        "media.role": "Movie",
        "media.type": "Audio",
        "node.always-process": true,
        "node.autoconnect": true,
        "node.description": "mpv",
        "node.driver-id": 58,
        "node.loop.name": "data-loop.0",
        "node.name": "mpv",
        "node.rate": "1/44100",
        "node.want-driver": true,
        "object.id": 72,
        "object.register": false,
        "object.serial": 584,
        "port.group": "stream.0",
        "stream.is-live": true
      },
PulseAudio
Client #583
        Driver: PipeWire
        Owner Module: 2
        Properties:
                pipewire.protocol = "protocol-native"
                core.name = "pipewire-ant-5327"
                pipewire.sec.socket = "pipewire-0"
                pipewire.sec.pid = "5327"
                pipewire.sec.uid = "1000"
                pipewire.sec.gid = "1000"
                module.id = "2"
                object.id = "112"
                object.serial = "583"
                application.name = "mpv"
                application.process.binary = "mpv"
                application.language = "en_US.UTF-8"
                application.process.id = "5327"
                application.process.user = "ant"
                application.process.host = "ant"
                application.process.session_id = "1"
                window.x11.display = ":1"
                log.level = "0"
                cpu.max-align = "32"
                default.clock.rate = "48000"
                default.clock.quantum = "1024"
                default.clock.min-quantum = "32"
                default.clock.max-quantum = "2048"
                default.clock.quantum-limit = "8192"
                default.clock.quantum-floor = "4"
                default.video.width = "640"
                default.video.height = "480"
                default.video.rate.num = "25"
                default.video.rate.denom = "1"
                clock.power-of-two-quantum = "true"
                link.max-buffers = "64"
                mem.warn-mlock = "false"
                mem.allow-mlock = "true"
                settings.check-quantum = "false"
                settings.check-rate = "false"
                core.version = "1.4.7"
                pipewire.access = "unrestricted"

Let me know if I've confused things and was intended to share something else. I apologize if I just did so.

Last edited by ntonino (2025-08-19 12:23:39)

Offline

#6 2025-08-19 12:46:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,960

Re: Discord does not share the audio of PipeWire applications

I'm expecting something that talks pipewire to still appear in

pactl list sink-inputs

(a whoops there I flubbed, but apparently clients shows those as well? but yes I meant sink-inputs not sinks ) in which case it should show up in stuff that wants to share audio from there as well.

Offline

#7 2025-08-19 12:54:19

ntonino
Member
Registered: 2025-08-19
Posts: 5

Re: Discord does not share the audio of PipeWire applications

By checking that, I've noticed that Chromium's WEBRTC VoiceEngine (which is basically the audio-sharing and screen-sharing done by Discord) appears on PulseAudio, while on PipeWire it only appears as "Chromium"
Actually, after re-checking things, I've noticed that Discord's screen-share (supposedly, 'discord_capture'), is running under 'pipewire-pulse' as per the output below:

PipeWire
Client #132
        Driver: PipeWire
        Owner Module: 2
        Properties:
                pipewire.protocol = "protocol-native"
                core.name = "pipewire-ant-652"
                pipewire.sec.socket = "pipewire-0"
                pipewire.sec.pid = "652"
                pipewire.sec.uid = "1000"
                pipewire.sec.gid = "1000"
                module.id = "2"
                object.id = "99"
                object.serial = "132"
                client.api = "pipewire-pulse"
                pulse.server.type = "unix"
                application.name = "discord_capture"
                application.process.id = "1550"
                application.process.user = "ant"
                application.process.host = "ant"
                application.process.binary = "Discord"
                application.language = "en_US.UTF-8"
                window.x11.display = ":1"
                application.process.machine_id = "b2c110c531024ec3899946d846539a98"
                application.process.session_id = "1"
                config.name = "pipewire-pulse.conf"
                cpu.max-align = "32"
                default.clock.rate = "48000"
                default.clock.quantum = "1024"
                default.clock.min-quantum = "32"
                default.clock.max-quantum = "2048"
                default.clock.quantum-limit = "8192"
                default.clock.quantum-floor = "4"
                default.video.width = "640"
                default.video.height = "480"
                default.video.rate.num = "25"
                default.video.rate.denom = "1"
                log.level = "2"
                clock.power-of-two-quantum = "true"
                link.max-buffers = "64"
                mem.warn-mlock = "false"
                mem.allow-mlock = "true"
                settings.check-quantum = "false"
                settings.check-rate = "false"
                core.version = "1.4.7"
                pipewire.access = "unrestricted"
PulseAudio
Sink Input #808
        Driver: PipeWire
        Owner Module: n/a
        Client: 72
        Sink: 58
        Sample Specification: s16le 2ch 48000Hz
        Channel Map: front-left,front-right
        Format: pcm, format.sample_format = "\"s16le\""  format.rate = "48000"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
        Corked: no
        Mute: no
        Volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        Buffer Latency: 0 usec
        Sink Latency: 0 usec
        Resample method: PipeWire
        Properties:
                client.api = "pipewire-pulse"
                pulse.server.type = "unix"
                application.name = "WEBRTC VoiceEngine"
                application.process.id = "1550"
                application.process.user = "ant"
                application.process.host = "ant"
                application.process.binary = "Discord"
                application.language = "en_US.UTF-8"
                window.x11.display = ":1"
                application.process.machine_id = "b2c110c531024ec3899946d846539a98"
                application.process.session_id = "1"
                media.name = "playStream"
                pulse.corked = "false"
                node.rate = "1/48000"
                node.latency = "360/48000"
                stream.is-live = "true"
                node.name = "WEBRTC VoiceEngine"
                node.want-driver = "true"
                node.autoconnect = "true"
                media.class = "Stream/Output/Audio"
                port.group = "stream.0"
                adapt.follower.spa-node = ""
                object.register = "false"
                factory.id = "7"
                clock.quantum-limit = "8192"
                node.loop.name = "data-loop.0"
                library.name = "audioconvert/libspa-audioconvert"
                client.id = "66"
                object.id = "74"
                object.serial = "808"
                node.driver-id = "58"
                pulse.attr.maxlength = "4194304"
                pulse.attr.tlength = "4320"
                pulse.attr.prebuf = "2884"
                pulse.attr.minreq = "1440"
                module-stream-restore.id = "sink-input-by-application-name:WEBRTC VoiceEngine"

Last edited by ntonino (2025-08-19 13:01:20)

Offline

#8 2025-08-19 12:56:23

ntonino
Member
Registered: 2025-08-19
Posts: 5

Re: Discord does not share the audio of PipeWire applications

Also, to make things more clear, here's the difference when running the command you gave me between an application running under PipeWire and one running under PulseAudio:

Telegram (running under PipeWire)
Sink Input #890
        Driver: PipeWire
        Owner Module: n/a
        Client: 889
        Sink: 58
        Sample Specification: float32le 2ch 48000Hz
        Channel Map: front-left,front-right
        Format: pcm, format.sample_format = "\"float32ne\""  format.rate = "48000"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
        Corked: no
        Mute: no
        Volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        Buffer Latency: 0 usec
        Sink Latency: 0 usec
        Resample method: PipeWire
        Properties:
                node.name = "Telegram"
                device.description = "Telegram"
                media.type = "Audio"
                media.category = "Playback"
                media.role = "game"
                node.always-process = "true"
                node.latency = "960/48000"
                node.rate = "1/48000"
                target.object = "58"
                media.name = "Playback Stream"
                stream.is-live = "true"
                node.want-driver = "true"
                node.autoconnect = "true"
                node.loop.class = "main"
                node.async = "true"
                media.class = "Stream/Output/Audio"
                port.group = "stream.0"
                adapt.follower.spa-node = ""
                object.register = "false"
                factory.id = "9"
                clock.quantum-limit = "8192"
                node.loop.name = "ALSoftP7"
                library.name = "audioconvert/libspa-audioconvert"
                client.id = "118"
                object.id = "123"
                object.serial = "890"
                node.driver-id = "58"
                module-stream-restore.id = "sink-input-by-media-role:game"
mpv (running under PulseAudio)
Sink Input #856
        Driver: PipeWire
        Owner Module: n/a
        Client: 855
        Sink: 58
        Sample Specification: float32le 2ch 44100Hz
        Channel Map: front-left,front-right
        Format: pcm, format.sample_format = "\"float32le\""  format.rate = "44100"  format.channels = "2"  format.chann
el_map = "\"front-left,front-right\""
        Corked: no
        Mute: no
        Volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        Buffer Latency: 0 usec
        Sink Latency: 0 usec
        Resample method: PipeWire
        Properties:
                client.api = "pipewire-pulse"
                pulse.server.type = "unix"
                application.name = "mpv"
                application.process.id = "9249"
                application.process.user = "ant"
                application.process.host = "ant"
                application.process.binary = "mpv"
                application.language = "C"
                window.x11.display = ":1"
                application.process.machine_id = "b2c110c531024ec3899946d846539a98"
                application.process.session_id = "1"
                media.icon_name = "mpv"
                media.name = "test.mp4 - mpv"
                pulse.corked = "false"
                node.rate = "1/44100"
                node.latency = "2646/44100"
                stream.is-live = "true"
                node.name = "mpv"
                node.want-driver = "true"
                node.autoconnect = "true"
                media.class = "Stream/Output/Audio"
                port.group = "stream.0"
                adapt.follower.spa-node = ""
                object.register = "false"
                factory.id = "7"
                clock.quantum-limit = "8192"
                node.loop.name = "data-loop.0"
                library.name = "audioconvert/libspa-audioconvert"
                client.id = "85"
                object.id = "111"
                object.serial = "856"
                pulse.attr.maxlength = "4194304"
                pulse.attr.tlength = "35280"
                pulse.attr.prebuf = "0"
                pulse.attr.minreq = "7056"
                node.driver-id = "58"
                module-stream-restore.id = "sink-input-by-application-name:mpv"

Last edited by ntonino (2025-08-19 12:56:39)

Offline

Board footer

Powered by FluxBB