omansak / libvideo

A lightweight .NET library to download YouTube videos.
BSD 2-Clause "Simplified" License
553 stars 163 forks source link

GetBytes() seemingly never returns on some videos #216

Closed scavet64 closed 2 years ago

scavet64 commented 3 years ago

Not totally sure what happened, but recently I am unable to get the bytes from a video. Super quick videos seem to work fine, however anything longer than a few minutes will lock up.

I tried using the libvideo.debug project and added a call to the GetBytes method

var bytes = v.GetBytes();

It seems to hang on the GetBytes call. I left it running for 15 min and didnt seem to get any response

omansak commented 3 years ago

can you share any sample ID ?

flexWhale commented 2 years ago

can you share any sample ID ?

https://youtube.com/watch?v=xQZxGCPjpqM

void SaveVideoToDisk(string link) { var youTube = YouTube.Default; // starting point for YouTube actions var video = youTube.GetVideo(link); // gets a Video object with info about the video File.WriteAllBytes(@"C:\" + video.FullName, video.GetBytes()); }

The code is working very slowly. I think something changed on youtube because earlier downloading was faster.

omansak commented 2 years ago

fixed in last version