Closed mr-flame7892 closed 1 month ago
It seems that some videos are playable even if its duration is over 1 minute, therefore the duration doesn't matter (for example: https://www.youtube.com/watch?v=jzi6RNVEOtA works perfectly for me). Also when the stream isn't readable, the "errored" property of the stream returns a 403 error message and the stream is destroyed:
Are you using agent
?
Are you using
agent
?
Yes
Can you provide 2 links: video is working and not working for you?
Can you provide 2 links: video is working and not working for you?
Working link: https://www.youtube.com/watch?v=jzi6RNVEOtA
Not working link: https://www.youtube.com/watch?v=uu2XSQgdQDY
@MR-Flame-exe both work for me in the latest version of ytdl. Could you provide a part of code you are using to download that files?
@MR-Flame-exe both work for me in the latest version of ytdl. Could you provide a part of code you are using to download that files?
var stream = ytdl(song.download_url, {
highWaterMark: 1 << 25,
filter: "audioonly",
quality: "lowestaudio",
agent,
}).once("readable", async function () {
console.log(`✅ - The stream of ${song.url} has been downloaded!`)
})
I think that I had that issue few years ago. Some YT files don't have audioonly
versions. You can check that by different API - ytdl.getInfo(url, {agent})
.
My workaround was to download always mp4
and convert it into mp3 in next step.
I think that I had that issue few years ago. Some YT files don't have
audioonly
versions. You can check that by different API -ytdl.getInfo(url, {agent})
.My workaround was to download always
mp4
and convert it into mp3 in next step.
Pretty sure it's not a problem related to the audioonly's filter, I mean every videos worked with the bot since today therefore I think it's not an issue related to my code, just an issue with the YouTube API or something. Btw I also tried to use ytdl-core instead of distube but it gets worse, no video was readable.
On web client, which ytdl-core is using, have an A/B testing to prevent bots. I will investigate it and release an update after working hours.
Also this issue related to #31
I had my app working from server in Finland. Most of the videos downloaded were just blank files. Sometitmes after 2,3 attemptes on each video - manaded to download normaly. Now switched app server location to another country. ~ Half an hour app is working fine. Not sure that it's 100% solution. Just for your information. Thank you all and me for concerns :)
Describe the bug
When I'm trying to download a video that lasts more than a minute, the "readable" event isn't triggered and when I try to see if the stream is readable, it says that the stream is readable but no stream is returned (there's no error message). But when I tried to download videos that last less than a minute everything works correctly.
Environment