ShayBox / Mon2Cam

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

Fix audio streaming #25

Closed botiapa closed 3 years ago

botiapa commented 3 years ago

Currently if you stream you either can't hear the application(s) you're streaming, or if you use ffplay, then you can hear yourself.

This is obviously not ideal and kind of defeats the purpose. I'm not sure if this issue is solvable.

@ShayBox Any ideas maybe for a fix for this?

ShayBox commented 3 years ago

You may possibly be able to create a monitor and loop it back into the main output, but pulse stuff is quite complex

botiapa commented 3 years ago

Essentially if you use ffplay to play the monitor of the VirtualSink, then it does what you said. But the virtual sink has your microphone attached, therefore you hear yourself. I hope you understand what I mean.

ShayBox commented 3 years ago

Hmm, is it possible to create a virtual sink of the application, loop that back to the system output, then create another virtual sink of the first sink + microphone for discord?

botiapa commented 3 years ago

Yes this would be possible (I think). I'll try to implement it when I have time. The disadvantages I can see right away are possibly high cpu usage and audio delay. We'll see.

ShayBox commented 3 years ago

Yeah, all around shitty situation, but for a built-in pulseaudio solution it will have to do, if people really want they can install and setup jack sinks/loops on their own system for latency and processing free setups :/

botiapa commented 3 years ago

Check #28

botiapa commented 3 years ago

This is fixed in the wayland update.