BinkanSalaryman / Discord-Audio-Stream-Bot

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

Climbing CPU usage + Audio Dropping #50

Closed FaultyMusic closed 1 year ago

FaultyMusic commented 3 years ago

Yo! so this software is exactly what i needed, but i also seem to be having an issue with cpu usage, after a while it starts to chew cpu resources heavily Im running a youtube stream, mp3 radio stream and now with this bot a discord audio stream so im pushing this poor little i3 in a server with no GPU pretty hard and when it maxes out (when this software starts using 20-30% instead of the usually 1-3%) the audio on the discord stream from the bot ends up glitchy and laggy and seems to get worse and worse once it starts

sometimes its fine for 10 minutes, other times only 30 seconds, then all of a sudden it starts ripping into the cpu haha

ive also noticed that if i have it running in multiple servers then disconnect it from one of them, it cuts the audio and i have to restart the software for it to start playing again, not sure if thats related but having other servers in the mix seems to make the runaway cpu usage issue more common

im using voicemeeter for audio routing at the moment if that helps replicate the issue

Cheers!

BinkanSalaryman commented 3 years ago

Hey, I have let the bot play music via VAC for at least 20 mins and couldn't replicate the issue (Screenshot of JConsole).

About the multiple server connection thing: I don't know what triggers that the streaming doesn't work at all anymore, but it did happen to me twice. But on the other hand, I tried randomly joining and leaving voice channels from 2 different servers and it did the job as expected. Didn't notice unusually high CPU usage there either.

bobeckert commented 2 years ago

Hiya! I'm experiencing a similar issue to @FaultyMusic above, and I also have this connected to 2 servers.

Audio Playback has dropouts and skips in the audio, and local playback to audio seems to be unaffected. This issue seems to occur more as uptime increases. Restarting the application has been working to get things back to smooth playback.

BinkanSalaryman commented 2 years ago

Welp. @bobeckert did you use voicemeeter too?

bobeckert commented 2 years ago

@BinkanSalaryman Just seeing this now. Sorry for the delay in response. We don't use voicemeeter, so that's probably not it.

Full disclosure: I'm not the user of the software, it's my better half. I just make the technology work, and the restarts have been fine. Unfortunately, I haven't had time to profile the app... :(