Sound loopback doesn't work on Pipewire :/
See original GitHub issueThe sound loopback used to work perfectly until I upgraded from native Pulseaudio to Pipewire 😕 Is this expected behavior and is a potential fix a possibility?
$ mon2cam -s -v
DEBUG Starting Mon2Cam with the following options: Options {
framerate: 60,
device: 50,
resolution: "",
ffmpeg: [],
border: false,
sound: true,
wayland: false,
loggerOptions: { verbose: true },
execOptions: { verbose: true, output: 3 }
}
DEBUG Checking if V4L2 device exists
DEBUG V4L2 device found with id 50
Exec Context: 38548766-b69b-4cc7-9edd-e041e0058458
Exec Options: { verbose: true, output: 3 }
Exec Command: pactl list sink-inputs
Exec Command Splits: [pactl,list,sink-inputs]
Exec Result: { code: 0, success: true },
output: "Sink Input #64
Driver: PipeWire
Owner Module: n/a
Client: 63
Sink: 103
Sample Specification: float32le 2ch 44100Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = "\"float32le\"" format.rate = "44100" format.channels = "2" format.channel_map = "\"front-left,front-right\""
Corked: no
Mute: no
Volume: front-left: 47141 / 72% / -8.58 dB, front-right: 47141 / 72% / -8.58 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 0 usec
Resample method: PipeWire
Properties:
client.api = "pipewire-pulse"
application.name = "spotify"
application.process.id = "2393"
application.process.user = "kevin"
application.process.host = "omega"
application.process.binary = "spotify"
application.language = "en_US.UTF-8"
window.x11.display = ":1"
application.process.machine_id = "2479c9f40b6842b28210235e67424972"
media.role = "music"
media.name = "Spotify"
stream.is-live = "true"
node.name = "spotify"
node.autoconnect = "true"
media.class = "Stream/Output/Audio"
adapt.follower.node = ""
factory.id = "6"
audio.adapt.follower = ""
factory.mode = "split"
library.name = "audioconvert/libspa-audioconvert"
object.id = "64"
client.id = "63"
node.latency = "43218/44100"
pulse.attr.maxlength = "4194304"
pulse.attr.tlength = "705600"
pulse.attr.prebuf = "0"
pulse.attr.minreq = "7056"
module-stream-restore.id = "sink-input-by-media-role:music""
Exec Context: 38548766-b69b-4cc7-9edd-e041e0058458
64: spotify
Choose which applications you want to route(space separated list):
64
Exec Context: d375d829-bf0c-4d1e-836e-8ca1c362b430
Exec Options: { verbose: true, output: 3 }
Exec Command: pactl list sources
Exec Command Splits: [pactl,list,sources]
Exec Result: { code: 0, success: true },
output: "Source #65581
State: SUSPENDED
Name: alsa_output.pci-0000_0a_00.3.iec958-stereo.monitor
Description: Monitor of Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: yes
Volume: front-left: 64695 / 99% / -0.34 dB, front-right: 64695 / 99% / -0.34 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: alsa_output.pci-0000_0a_00.3.iec958-stereo
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY
Properties:
object.path = "alsa:pcm:2:iec958:2:playback"
api.alsa.path = "iec958:2"
api.alsa.pcm.card = "2"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
device.routes = "1"
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC887-VD Digital"
alsa.id = "ALC887-VD Digital"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "1"
alsa.card = "2"
alsa.card_name = "HD-Audio Generic"
alsa.long_card_name = "HD-Audio Generic at 0xf6700000 irq 67"
alsa.driver_name = "snd_hda_intel"
device.profile.name = "iec958-stereo"
device.profile.description = "Digital Stereo (IEC958)"
card.profile.device = "6"
device.id = "41"
factory.name = "api.alsa.pcm.sink"
priority.driver = "608"
priority.session = "608"
media.class = "Audio/Sink"
node.nick = "HD-Audio Generic"
node.name = "alsa_output.pci-0000_0a_00.3.iec958-stereo"
device.description = "Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)"
node.pause-on-idle = "false"
factory.id = "18"
client.id = "30"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "45"
Formats:
pcm
Source #65639
State: RUNNING
Name: alsa_output.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo.monitor
Description: Monitor of UMC202HD 192k Digital Stereo (IEC958)
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 64143 / 98% / -0.56 dB, front-right: 64438 / 98% / -0.44 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: alsa_output.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
object.path = "alsa:pcm:0:iec958:0:playback"
api.alsa.path = "iec958:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
device.routes = "1"
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "UMC202HD 192k"
alsa.long_card_name = "BEHRINGER UMC202HD 192k at usb-0000:02:00.0-7, high speed"
alsa.driver_name = "snd_usb_audio"
device.profile.name = "iec958-stereo"
device.profile.description = "Digital Stereo (IEC958)"
card.profile.device = "5"
device.id = "97"
factory.name = "api.alsa.pcm.sink"
priority.driver = "1008"
priority.session = "1008"
media.class = "Audio/Sink"
node.nick = "UMC202HD 192k"
node.name = "alsa_output.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo"
device.description = "UMC202HD 192k Digital Stereo (IEC958)"
node.pause-on-idle = "false"
factory.id = "18"
client.id = "30"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "103"
node.max-latency = "32768/48000"
Formats:
pcm
Source #82
State: SUSPENDED
Name: alsa_input.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo
Description: UMC202HD 192k Digital Stereo (IEC958)
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
object.path = "alsa:pcm:0:iec958:0:capture"
api.alsa.path = "iec958:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "capture"
audio.channels = "2"
audio.position = "FL,FR"
device.routes = "1"
alsa.resolution_bits = "32"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "UMC202HD 192k"
alsa.long_card_name = "BEHRINGER UMC202HD 192k at usb-0000:02:00.0-7, high speed"
alsa.driver_name = "snd_usb_audio"
device.profile.name = "iec958-stereo"
device.profile.description = "Digital Stereo (IEC958)"
card.profile.device = "3"
device.id = "97"
factory.name = "api.alsa.pcm.source"
priority.driver = "2008"
priority.session = "2008"
media.class = "Audio/Source"
node.nick = "UMC202HD 192k"
node.name = "alsa_input.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo"
device.description = "UMC202HD 192k Digital Stereo (IEC958)"
node.pause-on-idle = "false"
factory.id = "18"
client.id = "30"
node.driver = "true"
factory.mode = "split"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "82"
node.max-latency = "32768/48000"
Ports:
iec958-stereo-input: Digital Input (S/PDIF) (type: SPDIF, priority: 0, availability unknown)
Active Port: iec958-stereo-input
Formats:
pcm
Source #65580
State: SUSPENDED
Name: alsa_output.pci-0000_08_00.1.hdmi-stereo.monitor
Description: Monitor of GP104 High Definition Audio Controller Digital Stereo (HDMI)
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 48287 / 74% / -7.96 dB, front-right: 48287 / 74% / -7.96 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: alsa_output.pci-0000_08_00.1.hdmi-stereo
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
object.path = "alsa:pcm:1:hdmi:1:playback"
api.alsa.path = "hdmi:1"
api.alsa.pcm.card = "1"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
device.routes = "1"
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "HDMI 0"
alsa.id = "HDMI 0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "3"
alsa.card = "1"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xf6080000 irq 65"
alsa.driver_name = "snd_hda_intel"
device.profile.name = "hdmi-stereo"
device.profile.description = "Digital Stereo (HDMI)"
card.profile.device = "7"
device.id = "40"
factory.name = "api.alsa.pcm.sink"
priority.driver = "632"
priority.session = "632"
media.class = "Audio/Sink"
node.nick = "HDA NVidia"
node.name = "alsa_output.pci-0000_08_00.1.hdmi-stereo"
device.description = "GP104 High Definition Audio Controller Digital Stereo (HDMI)"
node.pause-on-idle = "false"
factory.id = "18"
client.id = "30"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "44"
Formats:
pcm"
Exec Context: d375d829-bf0c-4d1e-836e-8ca1c362b430
ParsedOutputElement { index: -1, arguments: {}, properties: {} }
ParsedOutputElement {
index: 65581,
arguments: {
State: "SUSPENDED",
Name: "alsa_output.pci-0000_0a_00.3.iec958-stereo.monitor",
Description: "Monitor of Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)",
Driver: "PipeWire",
"Sample Specification": "s32le 2ch 48000Hz",
"Channel Map": "front-left,front-right",
"Owner Module": "4294967295",
Mute: "yes",
Volume: "front-left",
"Base Volume": "65536 / 100% / 0.00 dB",
"Monitor of Sink": "alsa_output.pci-0000_0a_00.3.iec958-stereo",
Latency: "0 usec, configured 0 usec"
},
properties: {
"object.path": '"alsa:pcm:2:iec958:2:playback"',
"api.alsa.path": '"iec958:2"',
"api.alsa.pcm.card": '"2"',
"api.alsa.pcm.stream": '"playback"',
"audio.channels": '"2"',
"audio.position": '"FL,FR"',
"device.routes": '"1"',
"alsa.resolution_bits": '"16"',
"device.api": '"alsa"',
"device.class": '"sound"',
"alsa.class": '"generic"',
"alsa.subclass": '"generic-mix"',
"alsa.name": '"ALC887-VD Digital"',
"alsa.id": '"ALC887-VD Digital"',
"alsa.subdevice": '"0"',
"alsa.subdevice_name": '"subdevice #0"',
"alsa.device": '"1"',
"alsa.card": '"2"',
"alsa.card_name": '"HD-Audio Generic"',
"alsa.long_card_name": '"HD-Audio Generic at 0xf6700000 irq 67"',
"alsa.driver_name": '"snd_hda_intel"',
"device.profile.name": '"iec958-stereo"',
"device.profile.description": '"Digital Stereo (IEC958)"',
"card.profile.device": '"6"',
"device.id": '"41"',
"factory.name": '"api.alsa.pcm.sink"',
"priority.driver": '"608"',
"priority.session": '"608"',
"media.class": '"Audio/Sink"',
"node.nick": '"HD-Audio Generic"',
"node.name": '"alsa_output.pci-0000_0a_00.3.iec958-stereo"',
"device.description": '"Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)"',
"node.pause-on-idle": '"false"',
"factory.id": '"18"',
"client.id": '"30"',
"node.driver": '"true"',
"factory.mode": '"merge"',
"audio.adapt.follower": '""',
"library.name": '"audioconvert/libspa-audioconvert"',
"object.id": '"45"'
}
}
ParsedOutputElement {
index: 65639,
arguments: {
State: "RUNNING",
Name: "alsa_output.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo.monitor",
Description: "Monitor of UMC202HD 192k Digital Stereo (IEC958)",
Driver: "PipeWire",
"Sample Specification": "s32le 2ch 48000Hz",
"Channel Map": "front-left,front-right",
"Owner Module": "4294967295",
Mute: "no",
Volume: "front-left",
"Base Volume": "65536 / 100% / 0.00 dB",
"Monitor of Sink": "alsa_output.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo",
Latency: "0 usec, configured 0 usec"
},
properties: {
"object.path": '"alsa:pcm:0:iec958:0:playback"',
"api.alsa.path": '"iec958:0"',
"api.alsa.pcm.card": '"0"',
"api.alsa.pcm.stream": '"playback"',
"audio.channels": '"2"',
"audio.position": '"FL,FR"',
"device.routes": '"1"',
"alsa.resolution_bits": '"16"',
"device.api": '"alsa"',
"device.class": '"sound"',
"alsa.class": '"generic"',
"alsa.subclass": '"generic-mix"',
"alsa.name": '"USB Audio"',
"alsa.id": '"USB Audio"',
"alsa.subdevice": '"0"',
"alsa.subdevice_name": '"subdevice #0"',
"alsa.device": '"0"',
"alsa.card": '"0"',
"alsa.card_name": '"UMC202HD 192k"',
"alsa.long_card_name": '"BEHRINGER UMC202HD 192k at usb-0000:02:00.0-7, high speed"',
"alsa.driver_name": '"snd_usb_audio"',
"device.profile.name": '"iec958-stereo"',
"device.profile.description": '"Digital Stereo (IEC958)"',
"card.profile.device": '"5"',
"device.id": '"97"',
"factory.name": '"api.alsa.pcm.sink"',
"priority.driver": '"1008"',
"priority.session": '"1008"',
"media.class": '"Audio/Sink"',
"node.nick": '"UMC202HD 192k"',
"node.name": '"alsa_output.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo"',
"device.description": '"UMC202HD 192k Digital Stereo (IEC958)"',
"node.pause-on-idle": '"false"',
"factory.id": '"18"',
"client.id": '"30"',
"node.driver": '"true"',
"factory.mode": '"merge"',
"audio.adapt.follower": '""',
"library.name": '"audioconvert/libspa-audioconvert"',
"object.id": '"103"',
"node.max-latency": '"32768/48000"'
}
}
ParsedOutputElement {
index: 82,
arguments: {
State: "SUSPENDED",
Name: "alsa_input.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo",
Description: "UMC202HD 192k Digital Stereo (IEC958)",
Driver: "PipeWire",
"Sample Specification": "s32le 2ch 48000Hz",
"Channel Map": "front-left,front-right",
"Owner Module": "4294967295",
Mute: "no",
Volume: "front-left",
"Base Volume": "65536 / 100% / 0.00 dB",
"Monitor of Sink": "n/a",
Latency: "0 usec, configured 0 usec",
"Active Port": "iec958-stereo-input"
},
properties: {
"object.path": '"alsa:pcm:0:iec958:0:capture"',
"api.alsa.path": '"iec958:0"',
"api.alsa.pcm.card": '"0"',
"api.alsa.pcm.stream": '"capture"',
"audio.channels": '"2"',
"audio.position": '"FL,FR"',
"device.routes": '"1"',
"alsa.resolution_bits": '"32"',
"device.api": '"alsa"',
"device.class": '"sound"',
"alsa.class": '"generic"',
"alsa.subclass": '"generic-mix"',
"alsa.name": '"USB Audio"',
"alsa.id": '"USB Audio"',
"alsa.subdevice": '"0"',
"alsa.subdevice_name": '"subdevice #0"',
"alsa.device": '"0"',
"alsa.card": '"0"',
"alsa.card_name": '"UMC202HD 192k"',
"alsa.long_card_name": '"BEHRINGER UMC202HD 192k at usb-0000:02:00.0-7, high speed"',
"alsa.driver_name": '"snd_usb_audio"',
"device.profile.name": '"iec958-stereo"',
"device.profile.description": '"Digital Stereo (IEC958)"',
"card.profile.device": '"3"',
"device.id": '"97"',
"factory.name": '"api.alsa.pcm.source"',
"priority.driver": '"2008"',
"priority.session": '"2008"',
"media.class": '"Audio/Source"',
"node.nick": '"UMC202HD 192k"',
"node.name": '"alsa_input.usb-BEHRINGER_UMC202HD_192k-00.iec958-stereo"',
"device.description": '"UMC202HD 192k Digital Stereo (IEC958)"',
"node.pause-on-idle": '"false"',
"factory.id": '"18"',
"client.id": '"30"',
"node.driver": '"true"',
"factory.mode": '"split"',
"audio.adapt.follower": '""',
"library.name": '"audioconvert/libspa-audioconvert"',
"object.id": '"82"',
"node.max-latency": '"32768/48000"'
}
}
ParsedOutputElement {
index: 65580,
arguments: {
State: "SUSPENDED",
Name: "alsa_output.pci-0000_08_00.1.hdmi-stereo.monitor",
Description: "Monitor of GP104 High Definition Audio Controller Digital Stereo (HDMI)",
Driver: "PipeWire",
"Sample Specification": "s32le 2ch 48000Hz",
"Channel Map": "front-left,front-right",
"Owner Module": "4294967295",
Mute: "no",
Volume: "front-left",
"Base Volume": "65536 / 100% / 0.00 dB",
"Monitor of Sink": "alsa_output.pci-0000_08_00.1.hdmi-stereo",
Latency: "0 usec, configured 0 usec"
},
properties: {
"object.path": '"alsa:pcm:1:hdmi:1:playback"',
"api.alsa.path": '"hdmi:1"',
"api.alsa.pcm.card": '"1"',
"api.alsa.pcm.stream": '"playback"',
"audio.channels": '"2"',
"audio.position": '"FL,FR"',
"device.routes": '"1"',
"alsa.resolution_bits": '"16"',
"device.api": '"alsa"',
"device.class": '"sound"',
"alsa.class": '"generic"',
"alsa.subclass": '"generic-mix"',
"alsa.name": '"HDMI 0"',
"alsa.id": '"HDMI 0"',
"alsa.subdevice": '"0"',
"alsa.subdevice_name": '"subdevice #0"',
"alsa.device": '"3"',
"alsa.card": '"1"',
"alsa.card_name": '"HDA NVidia"',
"alsa.long_card_name": '"HDA NVidia at 0xf6080000 irq 65"',
"alsa.driver_name": '"snd_hda_intel"',
"device.profile.name": '"hdmi-stereo"',
"device.profile.description": '"Digital Stereo (HDMI)"',
"card.profile.device": '"7"',
"device.id": '"40"',
"factory.name": '"api.alsa.pcm.sink"',
"priority.driver": '"632"',
"priority.session": '"632"',
"media.class": '"Audio/Sink"',
"node.nick": '"HDA NVidia"',
"node.name": '"alsa_output.pci-0000_08_00.1.hdmi-stereo"',
"device.description": '"GP104 High Definition Audio Controller Digital Stereo (HDMI)"',
"node.pause-on-idle": '"false"',
"factory.id": '"18"',
"client.id": '"30"',
"node.driver": '"true"',
"factory.mode": '"merge"',
"audio.adapt.follower": '""',
"library.name": '"audioconvert/libspa-audioconvert"',
"object.id": '"44"'
}
}
error: Uncaught (in promise) TypeError: Cannot read property 'replace' of undefined
let source_name = source.properties["device.product.name"].replace(/"/g, "");
^
at file:///usr/bin/mon2cam:879:80
at Array.forEach (<anonymous>)
at file:///usr/bin/mon2cam:878:30
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Loopback doesn't work (#2370) · Issues - Freedesktop GitLab
Pipewire wont load when adding a loopback device to the configuration file. ... go to sound, no devices; In terminal, run: pw-cli ls...
Read more >Weird Audio when trying to use Pipewire's loopback module
Hello, I'm trying to route my Microphone and Game Audio to the same Virtual Microphone to share my Audio while screensharing in Discord ......
Read more >Add a loopback audio device in pipewire - Unix Stack Exchange
There has been an update to this where you can use pw-loopback ... won't track changes in pulseaudio input and output, but it...
Read more >Pulse -> Pipewire: How to Loopback Line-In Only? - Sound
I want to loopback that port to capture its audio and play it through ... Big update to my problems, I just switched...
Read more >PulseAudio/Examples - ArchWiki
Fortunately, you can fix this by switching back to PulseAudio profiles, which default to a surround sound configuration for surround sound ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unfortunately I haven’t had time to test support on pipewire. I upgraded as well, but haven’t tested it yet. So yes, it’s probably “expected” behaviour.
I’ve found a replacement for
catia
which is calledhelvum
and seems to be written in rust instead of python. But this still doesn’t resolve the original issue.