amishshah / ytdl-core-discord

A ytdl-core wrapper focused on efficiency for use in Discord music bots
Apache License 2.0
65 stars 26 forks source link

The song stops in the middle although the song isn't finished #364

Closed Ddongddi closed 3 years ago

Ddongddi commented 3 years ago

I made a music bot with this package, and the song keeps stopping in the middle although the song isn't finished.

This is the code: const dispatcher = connection.play(await ytdl(video[0].url), { type: 'opus' }, { highWaterMark: 100 });

P.S: I am hosting this bot with raspberry pi 4B 8GB

Ben9986 commented 3 years ago

this is how mine is and it works. const dispatcher = connection.play(await ytdl(song.url, { highWaterMark: 1 << 25 }), { type: 'opus'}) I think you may have some of the options in the wrong order?

(edited to match your setup)