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

default youtube-dl to use ipv4 #3311

Merged
merged 6 commits into from
Nov 18, 2020
Merged

default youtube-dl to use ipv4 #3311

merged 6 commits into from
Nov 18, 2020

Conversation

markvdb
Copy link
Contributor

@markvdb markvdb commented Nov 15, 2020

Description

It seems YouTube does not like ipv6 clients (HTTP Error 429). This extra option works around that.

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 👍 yes, light tests as follows are enough
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

It seems YouTube does not like ipv6 clients (HTTP Error 429). This extra option works around that.
@rigelk rigelk added the Template not filled Doesn't use or fill one of the issue templates. Can be closed anytime. label Nov 15, 2020
@Findus23
Copy link
Contributor

Keep in mind that I think youtube also returns 429 if your IP is rate limited so it might be an issue independent of ipv6.

@markvdb
Copy link
Contributor Author

markvdb commented Nov 15, 2020 via email

@Chocobozzz
Copy link
Owner

Please add a configuration key forceIPV4 in config: https://github.com/Chocobozzz/PeerTube/blob/develop/config/default.yaml#L289 (that defaults to true)

As per @Chocobozzz 's request in Chocobozzz#3311 .

No clear idea yet what else would need to happen to make this actually work. Would have to have a closer look into how the architecture of this entire thing fits together for that.
Copy link
Collaborator

@rigelk rigelk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markvdb I’m not sure you understand what "adding a configuration key" involves. Yes, adding it to the config/default.yaml is a good start but nothing is taking it into account in the rest of the code. Please see how the CONFIG object resulting from importing the config/production.yaml in which you also need to add the configuration key is used: https://github.com/Chocobozzz/PeerTube/blob/develop/server/helpers/youtube-dl.ts#L9

@markvdb
Copy link
Contributor Author

markvdb commented Nov 16, 2020

I was more than aware this was not all that was needed yet, but had little clue to be able to look any further, so thank you for your helpful suggestion.

Up until now, I've only grepped through the PeerTube source code and read things.

I'm very much attracted by the PeerTube concept, but not very much by the wobbliness of the node ecosystem in general. I need to overcome some mental hurdles for that :-)

@rigelk rigelk removed the Template not filled Doesn't use or fill one of the issue templates. Can be closed anytime. label Nov 16, 2020
@markvdb
Copy link
Contributor Author

markvdb commented Nov 17, 2020

@rigelk @Chocobozzz I guess this is more or less what you meant.

I read https://docs.joinpeertube.org/#/contribute-getting-started?id=develop only after I finishing this. I hope I'm not spoiling too much your time by submitting this tiny pull request. Let's hope it doesn't contain too many silly syntax errors...

@rigelk rigelk changed the title force youtube-dl to use ipv4 default youtube-dl to use ipv4 Nov 18, 2020
@rigelk rigelk merged commit 677012b into Chocobozzz:develop Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants