Paste "sdsdsd" Text
  1. https://github.com/Bluegrams/YoutubeDLSharp
  2.  
  3.  
  4.  
  5.  
  6. var ytdl = new YoutubeDL();
  7. // set the path of the youtube-dl and FFmpeg if they're not in PATH or current directory
  8. ytdl.YoutubeDLPath = "d:\\youtube-dl.exe";
  9. ytdl.FFmpegPath = "d:\\ffmpeg.exe";
  10. // optional: set a different download folder
  11. ytdl.OutputFolder = "d:\\";
  12. // download a video
  13. // var res = await ytdl.RunVideoDownload("https://www.youtube.com/watch?v=XVfZT7CKIb0");
  14. // the path of the downloaded file
  15. //string path = res.Data;
  16.  
  17.  
  18. var res = await ytdl.RunVideoDataFetch("https://www.youtube.com/watch?v=XVfZT7CKIb0");
  19. // get some video information
  20. VideoData video = res.Data;
  21.  
  22. string title = video.Title;
  23. string uploader = video.Uploader;
  24. long? views = video.ViewCount;
  25. // all available download formats
  26. FormatData[] formats = video.Formats;
Submitted and never expires    Report abuse
2KB Characters: 1039 Hits: 20