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

How is the windows binary created? #26466

Closed
ohnekopf opened this issue Aug 29, 2020 · 4 comments
Closed

How is the windows binary created? #26466

ohnekopf opened this issue Aug 29, 2020 · 4 comments

Comments

@ohnekopf
Copy link

@ohnekopf ohnekopf commented Aug 29, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

This is just a simple question I'm asking out of curiosity, I'd Like to know how the youtube-dl Windows executable is 'compiled' , and if this can be done from source from a Windows (or Linux) machine
cheers!

@ohnekopf ohnekopf added the question label Aug 29, 2020
@blackjack4494
Copy link

@blackjack4494 blackjack4494 commented Aug 29, 2020

python3 -m pip install pyinstaller
pyinstaller youtube_dl\__main__.py --onefile --name youtube-dl

The official windows executable is generated using py2exe as far as I kmow. But it's basically deprecated. There is some community successor under the same name supporting python3.4+ but pyinstaller will do the job.

@zackmark29
Copy link

@zackmark29 zackmark29 commented Aug 29, 2020

@blackjack4494 is that pyinstaller is included already after installing python?

Can I compile only selected extractor? like Viki?

@blackjack4494
Copy link

@blackjack4494 blackjack4494 commented Aug 29, 2020

@zackmark29 shouldn't be installed by default that is why I wrote that explicitly.
For your second question. I don't think that is possible out of the box. You could delete or move all other extractors somewhere else (but the base extractors common*.py)
Or write your own viki downloader without relying on youtube-dl which isn't that difficulty actually - especially for viki since they have an api. If you looking for something in python I can give you this gist as a starting point. I already made some more modifications on it locally to test some api calls (e.g. for subtitles etc). Since I noticed you mainly use C# you can probably easily port python to c# and vice versa as the languages are quite similar when coding.

@zackmark29
Copy link

@zackmark29 zackmark29 commented Aug 30, 2020

@zackmark29 shouldn't be installed by default that is why I wrote that explicitly.
For your second question. I don't think that is possible out of the box. You could delete or move all other extractors somewhere else (but the base extractors common*.py)
Or write your own viki downloader without relying on youtube-dl which isn't that difficulty actually - especially for viki since they have an api. If you looking for something in python I can give you this gist as a starting point. I already made some more modifications on it locally to test some api calls (e.g. for subtitles etc). Since I noticed you mainly use C# you can probably easily port python to c# and vice versa as the languages are quite similar when coding.

THank you for that @blackjack4494 . I'll check it out. Yes my mainly Language is C#. I'm actually learning basic Python codes. But I'm not totally want to code on python rather I want to undestand the flow of the code. so that I can easily convert to C# code

@dstftw dstftw closed this Aug 31, 2020
@dstftw dstftw added the duplicate label Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.