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

Stream ends immediately for some music #250

Open North-West-Wind opened 4 years ago

North-West-Wind commented 4 years ago

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 commented 4 years ago

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.

amishshah commented 3 years ago

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

North-West-Wind commented 3 years ago

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.

taroshg commented 3 years ago

@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.

unionyy commented 3 years ago

@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.

Qwerty1Verified commented 3 years ago

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.

ghost commented 3 years ago

@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.