libvideo (aka VideoLibrary) is a modern .NET library for downloading YouTube videos. It is portable to most platforms and is very lightweight. This is a fork of i3arnon/libvideo, it includes a few fixes to address some issues with youtube decryption.
This fork has no nuget package but can be downloaded from releases instead. Alternatively, you can try building the repo if you like your assemblies extra-fresh.
- .NET Standard 2.0
Here's a small sample to help you get familiar with libvideo:
using VideoLibrary;
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());
}
If you'd like to check out some more of our features, take a look at our docs. You can also refer to our example application (named Valks, yes, I know, it's a silly name) if you're looking for a more comprehensive sample.
libvideo is licensed under the BSD 2-clause license.
Since i have a gui based on this, i try to keep it up-to-date as much as possible however other forks are also active and at times may be ahead of this one so feel free to swap alot! If you need the specifics you can check my badly-commented commits
If its an issue on this fork you can do that right here. If it is for the main repo/other forks, please don't use this issue tracker.
At the very least the youtube id that doesn't work, any errors or extra info is always handy. Make sure however the video is not region-locked nor age-restricted as that will never work.
Try and see ;)