ytdl-core-discord icon indicating copy to clipboard operation
ytdl-core-discord copied to clipboard

Stream ends immediately for some music

Open North-West-Wind opened this issue 4 years ago • 7 comments

I was testing with my bot by playing some music with it and I discovered some videos are not working. When the bot download these videos and play it in the VoiceConnection, they end immediately. There are no errors emitted.

const ytdl = require("ytdl-core-discord");
var connection = await voiceChannel.join();
// Yes, I use cookies
var dispatcher = await connection.play(ytdl(url), { highWaterMark: 1 << 25, requestOptions: { headers: process.env.COOKIE } });

This is the url I found to be not working. I don't know if this is a ytdl-core problem.

Edit: As I just posted this issue, I found another link that isn't working, right here

Any idea?

North-West-Wind avatar Sep 28 '20 13:09 North-West-Wind

I just tested with the original fent/ytdl-core and those videos worked. It also plays pretty well except some lags. I guess something happened when putting the stream through the transcoder and encoder.

North-West-Wind avatar Sep 30 '20 08:09 North-West-Wind

@North-West-Wind is this still occurring with the latest version (v1.2.5)?

amishshah avatar Dec 22 '20 12:12 amishshah

I actually stopped using this package and instead use the original one, so that I can play livestream with my bot. And the original ytdl-core works pretty well.

I don't know if I should close this issue.

North-West-Wind avatar Dec 25 '20 14:12 North-West-Wind

@North-West-Wind is this still occurring with the latest version (v1.2.5)?

Yes, I have the same problem and I am using v1.2.5, where the music just stops abruptly.

taroshg avatar Mar 05 '21 10:03 taroshg

@taroshg Which Node version are you using? I had the similar problem at Node v15 (In my case, music stopped after 7 min). I downgraded to Node v14 and then problem solved.

unionyy avatar Mar 19 '21 08:03 unionyy

This scares me because I currently have an issue with what I think is the original ytdl-core in which the music sometimes ends and the bot instantly leaves the channel with no explanation. I have yet to find a fix and was hoping using this module would fix it.

Qwerty1Verified avatar Mar 25 '21 18:03 Qwerty1Verified

@North-West-Wind The same thing happens to me, but when I remove or increase the 'highWaterMark', the song plays normally. This appears to happen only when the value of 'highWaterMark' is 1 << 25.

ghost avatar Mar 27 '21 12:03 ghost