discordjs / voice

Implementation of the Discord Voice API for discord.js and other JS/TS libraries
Apache License 2.0
327 stars 111 forks source link

Audio resources immediately ending #150

Closed ThisDudeBoy closed 3 years ago

ThisDudeBoy commented 3 years ago

Please describe the problem you are having in as much detail as possible: Hello, today I have a problem with discord voice. I tested it on my computer all worked (music bot example). When I install it on my VPS (GalaxyGate) Ubuntu 20.04 it's not working.

No code errors. Somes cool debug info : image

Further details:

Relevant client options:

amishshah commented 3 years ago

After discussion with the issue author, the issue appears to be that audio resources are immediately ending when played on their VPS.

amishshah commented 3 years ago

Looked into this with the issue author and came to a fix:

For the basic example, it seemed that the file we were trying to play was being downloaded really slowly and so the stream ended when there weren't enough packets to play.

For the music bot example, it seems that the youtube-dl install that comes with youtube-dl-exec was complaining about not finding the python command. Removed youtube-dl-exec. The author of the issue had youtube-dl installed on their VPS, so just switched to using that with ChildProcess.spawn.