使用youtubeextractor无法获得4k或1080p以上的视频

时间:2017-03-08 13:41:13

标签: c# youtube resolution

我正在制作一个从Youtube和其他功能下载视频的应用程序,但是现在我有下载4k视频的问题。我不知道为什么,但是当我尝试下载支持4k分辨率的视频时,它始终会停止工作...

/*
* Select the first .mp4 video with 360p resolution
*/
VideoInfo video = videoInfos
   .First(info => info.VideoType == VideoType.Mp4 && info.Resolution == 360);

/*
* If the video has a decrypted signature, decipher it
*/
if (video.RequiresDecryption) {
    DownloadUrlResolver.DecryptDownloadUrl(video);
}

/*
 * Create the video downloader.
 * The first argument is the video to download.
 * The second argument is the path to save the video file.
 */
var videoDownloader = new VideoDownloader(video, Path.Combine("D:/Downloads", video.Title + video.VideoExtension));

// Register the ProgressChanged event and print the current progress
videoDownloader.DownloadProgressChanged += (sender, args) => Console.WriteLine(args.ProgressPercentage);

/*
 * Execute the video downloader.
* For GUI applications note, that this method runs synchronously.
*/
videoDownloader.Execute();

这是nuget YoutubeExtractor的例子。我进行了修改以从视频中获得最高分辨率,但当视频为4K时,应用程序即将死亡。

0 个答案:

没有答案