Skip to content

detaybey/WrapYoutubeDl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WrapYoutubeDl

C# wrapper for https://github.com/rg3/youtube-dl

Download audio from web using c#

#Version

1.0.2

Installation

You need to download or use the binaries in the repo, following exe files are needed;

Setup

Within app.config or web.config file, under your please add a key/value pair for your binaries path.

  <appSettings>
    <add key="binaryfolder" value="PATH_TO_YOUR_BINARIES"/>
  </appSettings>

Usage

  static void Main(string[] args)
  {
    var urlToDownload = "https://www.youtube.com/watch?v=JLCybxJU4qM";
    var newFilename = Guid.NewGuid().ToString();
    var mp3OutputFolder = "c:/@mp3/";

    var downloader = new AudioDownloader(urlToDownload, newFilename, mp3OutputFolder);
    downloader.ProgressDownload += downloader_ProgressDownload;
    downloader.FinishedDownload += downloader_FinishedDownload;
    downloader.Download();

    Console.ReadLine();
  }

  static void downloader_FinishedDownload(object sender, DownloadEventArgs e)
  {
    Console.WriteLine("Finished!");
  }

  static void downloader_ProgressDownload(object sender, ProgressEventArgs e)
  {
    Console.WriteLine(e.Percentage);
  }

NuGet

To install WrapYouTubeDl, run the following command in the Package Manager Console

PM> Install-Package WrapYouTubeDl

License

Apache License 2.0

About

C# wrapper for YouTube-Dl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages