BinkanSalaryman / Discord-Audio-Stream-Bot

A simple discord audio streaming bot.
228 stars 38 forks source link

Bot limits machine bandwidth to 10Mbs #43

Closed dxwarlock closed 1 year ago

dxwarlock commented 3 years ago

The bot works great, and no issues as far as usage. But bot will, at some point, limit the entire boxes upload/download to 10Mb/s.

I can replicate the issue by starting bot, connecting it to my discord and stream some audio. It is not instant the speed limit, but at some random (it seems) time in the future my speeds get locked. If I disconnect the bot it instantly give my speed of 1Gb/s back.

I have tried with wired and wireless as I at first thought maybe my wireless was having issue. The problem occurs no matter the connection type and stops the instant I disconnect the bot from discord. Bot program can still be running, it is only if its connected to discord that causes the issue.

This is for the windows x64 build (using the 64 bat to start)

BinkanSalaryman commented 3 years ago

Strange, but I can't reproduce that issue here. I've let the bot stream music with VLC & VAC for 15 mins twice and it didn't limit my bandwidth (Always above 400 MBit/s downstream). If you insist, perhaps the JDA devs have a clue.

dxwarlock commented 3 years ago

Hmm odd when it happens seems completely random, its not immediate. But it definitely happens eventually. The last time it took close to an hour to happen but did happen on Tuesday (again no idea what triggers it).

I noticed it as I TeamViewer into the box running it (use it for tabletop audio in roll20) and realized the responsiveness and pixilation of quality of remote view was pretty bad. Ran the speed test and it was 10.5/10.7 (up down). Only step I take to get speed back is click the disconnect button in the bot itself close and restart the bot and connect. Soon as I do that speed returns to normal for a while.

Also have tried it without TeamViewer running just to make sure its not something in combination with it.

dxwarlock commented 3 years ago

Still having this issue and cannot nail down what about the bot causes it. The old cmd window version bot didn't do that (That I noticed).

Here is a gif of the issue. Just closing the bot (disconnecting doesnt fix it, I was incorrect).

I load the bot, let it play sound for a while, between 10 minutes and 2 hours, and it starts. Gif shows 1.- me turning off the bot, and testing speed. 2.- I close bot, and speeds return to normal. Link

BinkanSalaryman commented 3 years ago

I believe you, it's just that I couldn't reproduce it and 10 min to 2 hours isn't consistent nor a pleasure to wait out. So the only solution is restarting/terminating the program? I'm not a networking expert, but I believe a program can't limit the bandwidth of the network connection (unless it's driver code). This seems really off to me.

dxwarlock commented 3 years ago

I totally understand. And yes the only way to get it to stop is close the whole bot program. I've tried it with wifi, with hard wired, with a different machine. Same issue. I don't believe it is anything on the machine/boxes themselves as both are nearly bare bones windows machines. (Just used to stream audio during tabletop gaming). And I agree I have no idea how a program is limiting the windows network stack. But it seems odd (as in a clue to someone that knows networking better): why its always exactly 10mbs. Networking is also not my strong point.

Would it be possible to get a link to the last cmd window version? I deleted mine long ago when I upgraded. It seemed to not have that particular issue on my setup.

BinkanSalaryman commented 3 years ago

Would it be possible to get a link to the last cmd window version? I deleted mine long ago when I upgraded. It seemed to not have that particular issue on my setup.

Sure thing, but keep in mind that this version is 2.5 years old by now and may not work anymore. I'd prefer you sticking with the current version as I don't intend to work on the .NET code anymore... That being said, if it works for you and makes you happy, so be it.

I'm kinda surprise you stuck around for so long to remember the .NET versions without GUI.... :')

dxwarlock commented 3 years ago

Thanks! And yea I've been using it for years twice a week for tabletop game. Only bot I could find that did what I needed it to do. Doesn't seem anyone else had the idea to make a bot to stream local system sounds in stereo.