a portable library which allow download of video informations, video & audio
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Famoser.ReverseEngineering.Webm
Famoser.YoutubeExtractor.Platform.UniversalApplication.Tests
Famoser.YoutubeExtractor.Portable.Example
Famoser.YoutubeExtractor.Portable.Tests
Famoser.YoutubeExtractor.Portable
.gitattributes
.gitignore
Famoser.YoutubeExtractor.Portable.nuspec
Famoser.YoutubeExtractor.Portable.sln
LICENSE
README.md

README.md

on nuget: https://www.nuget.org/packages/Famoser.YoutubeExtractor.Portable

This is a portable version of https://github.com/flagbug/YoutubeExtractor

I've simplified the API, though. Some examples:

Example code

Get the download URLs

// Our test youtube link
string link = "insert youtube link";

/*
 * Get the available video formats.
 * We'll work with them in the video and audio download examples.
 */
IEnumerable<VideoInfo> videoInfos = DownloadUrlResolver.GetDownloadUrls(link);

Download video

//construct downloader
var downloader = new VideoDownloader();

//download video infos
IEnumerable<VideoInfo> videoInfos = await DownloadUrlResolver.GetDownloadUrlsAsync("https://www.youtube.com/watch?v=vxMxYgkUcdU");

//Select best suited video (highest resolution)
VideoInfo video =  downloader.ChooseBest(videoInfos);
  
//If the video has a decrypted signature, decipher it
if (video.RequiresDecryption)
    await DownloadUrlResolver.DecryptDownloadUrl(video);

// Register the any events
downloader.VideoDownloadProgressChanged += (sender, args) => Console.WriteLine(args.ProgressPercentage);

//Execute the video downloader.
var stream = await downloader.Execute(video);

//save stream to file, the correct extension is saved in video.

Download audio

//construct downloader
var downloader = new AudioDownloader();

//download video infos
IEnumerable<VideoInfo> videoInfos = await DownloadUrlResolver.GetDownloadUrlsAsync("https://www.youtube.com/watch?v=vxMxYgkUcdU");

//Select best suited video (highest resolution)
VideoInfo video =  downloader.ChooseBest(videoInfos);
  
//If the video has a decrypted signature, decipher it
if (video.RequiresDecryption)
    await DownloadUrlResolver.DecryptDownloadUrl(video);

// Register the any events
downloader.AudioExtractionProgressChanged += (sender, args) => Console.WriteLine(args.ProgressPercentage);

//Execute the video downloader.
var stream = await downloader.Execute(video);

//save stream to file, the correct extension is saved in video.