ShayBox / Mon2Cam

Workaround for multi-monitor Discord screensharing
MIT License
337 stars 33 forks source link

Output not containing mic input #75

Open marcothms opened 3 years ago

marcothms commented 3 years ago

Hello! When I try to stream audio I can either choose to stream my microphone or the combined sink, but latter doesn't include the voice of my microphone. I made sure to select the correct sources so i heavily suspect, that this is a bug. The passthrough for any other application works just fine. If any other informations are required let me know, as this is reproducable

~ λ mon2cam -m 0 -s
35: Spotify
176: WEBRTC VoiceEngine
Choose which applications you want to route(space separated list):
35
ParsedOutputElement { index: -1, arguments: {}, properties: {} }
ParsedOutputElement {
  index: 1,
  arguments: {
    State: "RUNNING",
    Name: "alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo.monitor",
    Description: "Monitor of HyperX 7.1 Audio Analog Stereo",
    Driver: "module-alsa-card.c",
    "Sample Specification": "s16le 2ch 44100Hz",
    "Channel Map": "front-left,front-right",
    "Owner Module": "8",
    Mute: "no",
    Volume: "front-left",
    "Base Volume": "65536 / 100% / 0.00 dB",
    "Monitor of Sink": "alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo",
    Latency: "0 usec, configured 40000 usec"
  },
  properties: {
    "device.description": '"Monitor of HyperX 7.1 Audio Analog Stereo"',
    "device.class": '"monitor"',
    "alsa.card": '"2"',
    "alsa.card_name": '"HyperX Virtual Surround Sound"',
    "alsa.long_card_name": '"Kingston HyperX Virtual Surround Sound at usb-0000:1d:00.3-2, full speed"',
    "alsa.driver_name": '"snd_usb_audio"',
    "device.bus_path": '"pci-0000:1d:00.3-usb-0:2:1.0"',
    "sysfs.path": '"/devices/pci0000:00/0000:00:07.1/0000:1d:00.3/usb3/3-2/3-2:1.0/sound/card2"',
    "udev.id": '"usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00"',
    "device.bus": '"usb"',
    "device.vendor.id": '"0951"',
    "device.vendor.name": '"Kingston Technology"',
    "device.product.id": '"16a4"',
    "device.product.name": '"HyperX 7.1 Audio"',
    "device.serial": '"Kingston_HyperX_Virtual_Surround_Sound_00000000"',
    "device.string": '"2"',
    "module-udev-detect.discovered": '"1"',
    "device.icon_name": '"audio-card-usb"'
  }
}
ParsedOutputElement {
  index: 2,
  arguments: {
    State: "RUNNING",
    Name: "alsa_input.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo",
    Description: "HyperX 7.1 Audio Analog Stereo",
    Driver: "module-alsa-card.c",
    "Sample Specification": "s16le 2ch 44100Hz",
    "Channel Map": "front-left,front-right",
    "Owner Module": "8",
    Mute: "no",
    Volume: "front-left",
    "Base Volume": "65536 / 100% / 0.00 dB",
    "Monitor of Sink": "n/a",
    Latency: "1602 usec, configured 40000 usec",
    "Active Port": "analog-input-headset-mic"
  },
  properties: {
    "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": '"2"',
    "alsa.card_name": '"HyperX Virtual Surround Sound"',
    "alsa.long_card_name": '"Kingston HyperX Virtual Surround Sound at usb-0000:1d:00.3-2, full speed"',
    "alsa.driver_name": '"snd_usb_audio"',
    "device.bus_path": '"pci-0000:1d:00.3-usb-0:2:1.0"',
    "sysfs.path": '"/devices/pci0000:00/0000:00:07.1/0000:1d:00.3/usb3/3-2/3-2:1.0/sound/card2"',
    "udev.id": '"usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00"',
    "device.bus": '"usb"',
    "device.vendor.id": '"0951"',
    "device.vendor.name": '"Kingston Technology"',
    "device.product.id": '"16a4"',
    "device.product.name": '"HyperX 7.1 Audio"',
    "device.serial": '"Kingston_HyperX_Virtual_Surround_Sound_00000000"',
    "device.string": '"front:2"',
    "device.buffering.buffer_size": '"352800"',
    "device.buffering.fragment_size": '"176400"',
    "device.access_mode": '"mmap+timer"',
    "device.profile.name": '"analog-stereo"',
    "device.profile.description": '"Analog Stereo"',
    "device.description": '"HyperX 7.1 Audio Analog Stereo"',
    "module-udev-detect.discovered": '"1"',
    "device.icon_name": '"audio-card-usb"'
  }
}
ParsedOutputElement {
  index: 3,
  arguments: {
    State: "RUNNING",
    Name: "alsa_input.usb-046d_081b_01ED02E0-02.mono-fallback",
    Description: "Webcam C310 Mono",
    Driver: "module-alsa-card.c",
    "Sample Specification": "s16le 1ch 48000Hz",
    "Channel Map": "mono",
    "Owner Module": "9",
    Mute: "no",
    Volume: "mono",
    "Base Volume": "20724 /  32% / -30.00 dB",
    "Monitor of Sink": "n/a",
    Latency: "3661 usec, configured 40000 usec",
    "Active Port": "analog-input-mic"
  },
  properties: {
    "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": '"4"',
    "alsa.card_name": '"USB Device 0x46d:0x81b"',
    "alsa.long_card_name": '"USB Device 0x46d:0x81b at usb-0000:1d:00.3-3, high speed"',
    "alsa.driver_name": '"snd_usb_audio"',
    "device.bus_path": '"pci-0000:1d:00.3-usb-0:3:1.2"',
    "sysfs.path": '"/devices/pci0000:00/0000:00:07.1/0000:1d:00.3/usb3/3-3/3-3:1.2/sound/card4"',
    "udev.id": '"usb-046d_081b_01ED02E0-02"',
    "device.bus": '"usb"',
    "device.vendor.id": '"046d"',
    "device.vendor.name": '"Logitech, Inc."',
    "device.product.id": '"081b"',
    "device.product.name": '"Webcam C310"',
    "device.serial": '"046d_081b_01ED02E0"',
    "device.form_factor": '"webcam"',
    "device.string": '"hw:4"',
    "device.buffering.buffer_size": '"192000"',
    "device.buffering.fragment_size": '"96000"',
    "device.access_mode": '"mmap+timer"',
    "device.profile.name": '"mono-fallback"',
    "device.profile.description": '"Mono"',
    "device.description": '"Webcam C310 Mono"',
    "module-udev-detect.discovered": '"1"',
    "device.icon_name": '"camera-web-usb"'
  }
}
ParsedOutputElement {
  index: 4,
  arguments: {
    State: "RUNNING",
    Name: "alsa_output.pci-0000_1e_00.3.iec958-stereo.monitor",
    Description: "Monitor of Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)",
    Driver: "module-alsa-card.c",
    "Sample Specification": "s16le 2ch 44100Hz",
    "Channel Map": "front-left,front-right",
    "Owner Module": "10",
    Mute: "no",
    Volume: "front-left",
    "Base Volume": "65536 / 100% / 0.00 dB",
    "Monitor of Sink": "alsa_output.pci-0000_1e_00.3.iec958-stereo",
    Latency: "0 usec, configured 40000 usec"
  },
  properties: {
    "device.description": '"Monitor of Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)"',
    "device.class": '"monitor"',
    "alsa.card": '"1"',
    "alsa.card_name": '"HD-Audio Generic"',
    "alsa.long_card_name": '"HD-Audio Generic at 0xf7700000 irq 62"',
    "alsa.driver_name": '"snd_hda_intel"',
    "device.bus_path": '"pci-0000:1e:00.3"',
    "sysfs.path": '"/devices/pci0000:00/0000:00:08.1/0000:1e:00.3/sound/card1"',
    "device.bus": '"pci"',
    "device.vendor.id": '"1022"',
    "device.vendor.name": '"Advanced Micro Devices, Inc. [AMD]"',
    "device.product.id": '"1457"',
    "device.product.name": '"Family 17h (Models 00h-0fh) HD Audio Controller"',
    "device.string": '"1"',
    "module-udev-detect.discovered": '"1"',
    "device.icon_name": '"audio-card-pci"'
  }
}
2: HyperX 7.1 Audio
3: Webcam C310
Choose which sources you want to route(space separated list):
2
INFO X11 detected, to use Wayland add -w
INFO CTRL + C to stop
INFO The screen will look mirrored for you, not others