{"id":13825605,"url":"https://github.com/flagbug/YoutubeExtractor","last_synced_at":"2025-07-08T22:31:39.769Z","repository":{"id":2659249,"uuid":"3650224","full_name":"flagbug/YoutubeExtractor","owner":"flagbug","description":"A .NET library, that allows to download videos from YouTube and/or extract their audio track (currently only for flash videos).","archived":true,"fork":false,"pushed_at":"2021-11-07T02:03:36.000Z","size":21727,"stargazers_count":813,"open_issues_count":180,"forks_count":374,"subscribers_count":118,"default_branch":"master","last_synced_at":"2024-11-08T10:15:38.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flagbug.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-07T15:11:28.000Z","updated_at":"2024-10-14T11:12:13.000Z","dependencies_parsed_at":"2022-08-06T12:30:56.458Z","dependency_job_id":null,"html_url":"https://github.com/flagbug/YoutubeExtractor","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flagbug%2FYoutubeExtractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flagbug%2FYoutubeExtractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flagbug%2FYoutubeExtractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flagbug%2FYoutubeExtractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flagbug","download_url":"https://codeload.github.com/flagbug/YoutubeExtractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225470631,"owners_count":17479366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T09:01:24.102Z","updated_at":"2024-11-20T04:30:38.275Z","avatar_url":"https://github.com/flagbug.png","language":"C#","readme":"# YoutubeExtractor\n\n\u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=daume%2edennis%40gmail%2ecom\u0026lc=US\u0026item_name=YoutubeExtractor\u0026no_note=0\u0026currency_code=USD\u0026bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest\"\u003e\n  \u003cimg src=\"https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif\" title=\"Donate via Paypal\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"http://flattr.com/thing/1093085/\" target=\"_blank\"\u003e\n\u003cimg src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /\u003e\n\u003c/a\u003e\n\n## Overview\nYoutubeExtractor is a library for .NET, written in C#, that allows to download videos from YouTube and/or extract their audio track (audio extraction currently only for flash videos).\n\n## Target platforms\n\n- .NET Framework 3.5 and higher\n- Windows Phone 8\n- WinRT\n- Xamarin.Android\n- Xamarin.iOS\n\nNote that Windows Phone 8, WinRT, Xamarin.Android and Xamarin.iOS only support the extraction of the download URLs\n\n## NuGet\n\n[YoutubeExtractor at NuGet](http://nuget.org/packages/YoutubeExtractor)\n\n    Install-Package YoutubeExtractor\n\n## License\n\nYoutubeExtractor has two licenses;\n\nThe YouTube URL-extraction code is licensed under the [MIT License](http://opensource.org/licenses/MIT)\n\nThe audio extraction code that is originally from [FlvExtract](http://moitah.net/) is licenced under the [GNU General Public License version 2 (GPLv2)](http://opensource.org/licenses/gpl-2.0)\n\nFiles that are GPLv2 licensed are explicitly marked with the GPLv2 header at the top of the file. All other files are implicitly MIT licensed.\n\n## Credits\n\n- [FlvExtract](http://moitah.net/) for extracting MP3 and AAC audio tracks out of flash files.\n\n## Example code\n\n**Get the download URLs**\n\n```c#\n\n// Our test youtube link\nstring link = \"insert youtube link\";\n\n/*\n * Get the available video formats.\n * We'll work with them in the video and audio download examples.\n */\nIEnumerable\u003cVideoInfo\u003e videoInfos = DownloadUrlResolver.GetDownloadUrls(link);\n\n```\n\n**Download the video**\n\n```c#\n\n/*\n * Select the first .mp4 video with 360p resolution\n */\nVideoInfo video = videoInfos\n    .First(info =\u003e info.VideoType == VideoType.Mp4 \u0026\u0026 info.Resolution == 360);\n    \n/*\n * If the video has a decrypted signature, decipher it\n */\nif (video.RequiresDecryption)\n{\n    DownloadUrlResolver.DecryptDownloadUrl(video);\n}\n\n/*\n * Create the video downloader.\n * The first argument is the video to download.\n * The second argument is the path to save the video file.\n */\nvar videoDownloader = new VideoDownloader(video, Path.Combine(\"D:/Downloads\", video.Title + video.VideoExtension));\n\n// Register the ProgressChanged event and print the current progress\nvideoDownloader.DownloadProgressChanged += (sender, args) =\u003e Console.WriteLine(args.ProgressPercentage);\n\n/*\n * Execute the video downloader.\n * For GUI applications note, that this method runs synchronously.\n */\nvideoDownloader.Execute();\n\n```\n\n**Download the audio track**\n\n```c#\n\n/*\n * We want the first extractable video with the highest audio quality.\n */\nVideoInfo video = videoInfos\n    .Where(info =\u003e info.CanExtractAudio)\n    .OrderByDescending(info =\u003e info.AudioBitrate)\n    .First();\n    \n/*\n * If the video has a decrypted signature, decipher it\n */\nif (video.RequiresDecryption)\n{\n    DownloadUrlResolver.DecryptDownloadUrl(video);\n}\n\n/*\n * Create the audio downloader.\n * The first argument is the video where the audio should be extracted from.\n * The second argument is the path to save the audio file.\n */\nvar audioDownloader = new AudioDownloader(video, Path.Combine(\"D:/Downloads\", video.Title + video.AudioExtension));\n\n// Register the progress events. We treat the download progress as 85% of the progress and the extraction progress only as 15% of the progress,\n// because the download will take much longer than the audio extraction.\naudioDownloader.DownloadProgressChanged += (sender, args) =\u003e Console.WriteLine(args.ProgressPercentage * 0.85);\naudioDownloader.AudioExtractionProgressChanged += (sender, args) =\u003e Console.WriteLine(85 + args.ProgressPercentage * 0.15);\n\n/*\n * Execute the audio downloader.\n * For GUI applications note, that this method runs synchronously.\n */\naudioDownloader.Execute();\n\n```\n","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=daume%2edennis%40gmail%2ecom\u0026lc=US\u0026item_name=YoutubeExtractor\u0026no_note=0\u0026currency_code=USD\u0026bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest"],"categories":["C# #"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflagbug%2FYoutubeExtractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflagbug%2FYoutubeExtractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflagbug%2FYoutubeExtractor/lists"}