AudioPlayer auto pauses on Ubuntu VPS but not on Windows?
So I'm creating a bot that streams audio from a mp3 stream (Icecast server) to a Discord VC. It works completely fine on my local machine that runs Windows but on my Ubuntu 20.04 VPS, it suddenly auto pauses right after it starts playing.
Even with local mp3 files, it still automatically pauses itself which never happens on my local machine. Any help would be appreciated.
15 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Windows
debug log
Even with playing a local mp3 file, it does still auto-pause. For some reason curl spits out a 400 bad request status code but using fetch it shows 200.
I think it is because you are using ffmpeg-static
What's the difference?
ffmpeg-static is not stable enough
Especially on linux
Even with a different version of ffmpeg, still not working.
Still have same issue, anything helps! For now I've been hosting it on my AMD vps but if I could get this working, it would be fantastic.
can you show the code you have for playing audio
also your intents just in case
Same error in my project. I use this code to play the audio https://github.com/alexemanuelol/rustplusplus/blob/master/src/discordTools/discordVoice.js
Line 26-38
But Ubuntu 22.04 LTS
Just adding this for people searching this thread, seems to reliant on the system processor type. It works smoothly with my AMD server but not with my ARM server. Also, the source code for this project has been public so here's the code where I have for playing audio if anybody is still trying to figure this out:
https://github.com/okdargy/incecast/blob/main/commands/func/connect.js
https://github.com/okdargy/incecast/blob/main/commands/func/playStation.js
@dargy Are you using djs/opus? And sodium-native?
Does seem like I’m using djs/opus but not sodium-native from the screenshots above, can’t fully check right now since I’m away
You may want to check if opusscript works