Closed Kyuunex closed 4 months ago
As far as I can see this seems to either be a discord or vesktop limitation as venmic forwards the stereo audio
perhaps there is a way around it?
perhaps there is a way around it?
Not from my side at least, depends on how discord screenshare is implemented, I vaguely remember rumors about audio always being merged into mono on discords side though
I do know that microphone encoding (at one point) happened on the client side, and someone once wrote a BD plugin that changed the encoding options to make it stereo. Perhaps something similar could be done. If not, then it is what it is.
I do know that microphone encoding (at one point) happened on the client side, and someone once wrote a BD plugin that changed the encoding options to make it stereo. Perhaps something similar could be done. If not, then it is what it is.
Interesting idea, maybe you can open a plugin suggestion in the vencord (or rather vesktop as this is more geared towards vesktop specifically) repository with this issue as a reference.
It would may also help if you link the aforementioned plugin ^^
im too lazy to make issues, so feel free to move this one around as you fit
here is the plugin i found on my hdd, i don't think it works anymore
//META{"name":"stereoSound"}*//
var stereoSound = function () {
let VoiceConnection = BDV2.WebpackModules.findByUniqueProperties(['getVoiceEngine']).getVoiceEngine().VoiceConnection;
class Stereo extends VoiceConnection {
constructor(a, b, c, d, e) {
super(a, b, c, d, e);
this.origin = super.setTransportOptions;
}
setTransportOptions(obj) {
if (obj.audioEncoder) {
obj.audioEncoder.params = { stereo: "2" };
obj.audioEncoder.channels = 2;
}
if (obj.fec) {
obj.fec = false;
}
if (obj.encodingVoiceBitRate < 960000) {
obj.encodingVoiceBitRate = 398000;
}
this.origin(obj);
window.sound = this;
}
}
return class _ {
getName() { return "Stereo" }
getDescription() { return "" }
getAuthor() { return "" }
getVersion() { return "1" }
load() { }
start() {
BDV2.WebpackModules.findByUniqueProperties(['getVoiceEngine']).getVoiceEngine().VoiceConnection = Stereo;
}
stop() {
BDV2.WebpackModules.findByUniqueProperties(['getVoiceEngine']).getVoiceEngine().VoiceConnection = VoiceConnection;
}
};
}();
I could reproduce this, however I supply discord with a stereo audio stream, it seems that discord somehow mixes them somewhere into mono - I'll close this for now, however this might be solvable with a vencord plugin
Vee just noted some things that we could try out to possibly make this work, will test those suggestions later
so i investigated and: the stream by venmic is correctly stereo, and it is also sent as stereo audio to discord. however, it seems like Discord downmixes it to mono. so it might be a server side restriction (note that vesktop uses WebRTC, while Discord Desktop uses UDP. the WebRTC api might just not support stereo)
we will investigate this further
Closing in favor of https://github.com/Vencord/Vesktop/issues/709
✍️ Bug Description
Go Live Screenshare audio is mono
🔁 Steps to reproduce
Account 1: stream something with stereo audio Account 2: view account 1's stream with stereo headphones
🗒️ Debug Output
❔ Expected behavior
Stereo Audio
👀 Screenshots
📦 Vesktop Version
Vencord 2cd8294 (Vesktop V0.4.4)
🖥️ Distribution
Arch (Hyprland)
✅ I confirm that...