Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download sooo slow #80

Closed
Meisterzunge opened this issue Feb 11, 2023 · 2 comments
Closed

Download sooo slow #80

Meisterzunge opened this issue Feb 11, 2023 · 2 comments

Comments

@Meisterzunge
Copy link

Downloading a 1MB video takes ca. 2 minutes..

var grabber = GrabberBuilder.New()
  .UseDefaultServices()
  .AddYouTube()
  .AddVimeo()
  .Build();

var grabResult = await grabber.GrabAsync(new Uri("someYtVideoUrl"));
var mediaFiles = grabResult.Resources<GrabbedMedia>().ToArray();

using (var client = new HttpClient())
using (var response = await client.GetAsync(mediaFiles[5].ResourceUri))
{
	response.EnsureSuccessStatusCode();
	using (var downloadStream = await response.Content.ReadAsStreamAsync())
	{
		// ...
	}
}

Maybe this is a HttpClient issue..?

@javidsho
Copy link
Contributor

Not at all, it's YouTube that throttles the connection down to a speed sufficient for watching only.
There's only one way to fix that. You'd need to use a download manager, such as this one or this one.

@Meisterzunge
Copy link
Author

Nice! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants