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

Slow extraction speed for Youtube video urls #32202

Open
3 tasks done
dhwz opened this issue May 17, 2023 · 7 comments
Open
3 tasks done

Slow extraction speed for Youtube video urls #32202

dhwz opened this issue May 17, 2023 · 7 comments
Labels

Comments

@dhwz
Copy link

dhwz commented May 17, 2023

  • 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

I'm using youtube-dl only to extract video urls from youtube, it's extremely slow (takes up to 30secs to extract the urls) for a while now. I've also checked the open issues, one was talking about that but the final conclusion was it won't be fixed and yt-dlp could be used. I agree yt-dlp is much faster (takes maybe 3sec to get a URL), any chance we can get such modifications used on yt-dlp also on youtube-dl?
yt-dlp is no alternative for me as I'm fixed to a system which still uses Python 2.7

@dhwz dhwz added the question label May 17, 2023
@dirkf
Copy link
Contributor

dirkf commented May 17, 2023

Feel free to submit a PR that makes the extraction process faster.

What takes the time now is that YT makes the extractor execute some junk JavaScript to obtain media links that are not throttled, though I took ~6% off this in a recent mod.

The extractor could provide you with undecoded media links but then the download speed will be throttled instead. The current extraction process aims to get the widest combination of unthrottled formats. If a format that is seen in the browser isn't being offered by yt-dl, it seems to provoke complaints.

yt-dlp uses other tactics that are either impractical or beyond the interest/capability of any contributor:

@HPP8140
Copy link

HPP8140 commented Jun 23, 2023

any option to prefer throttled links for extraction speed?

1 similar comment
@HPP8140

This comment was marked as duplicate.

@dirkf

This comment was marked as duplicate.

@HPP8140
Copy link

HPP8140 commented May 20, 2024

Not without modifying the code. Also, one part of the JS execution is required when YT sends an encoded media link (signature) to decode the signature, without which you have no media URL, throttled or otherwise.

As always, a full refund of 0 0-based monetary units is offered if you find the program unsatisfactory.

Okay, appreciate the response, thanks for closing the loop on this.

I will keep using the old verson of code, until someting major breaks that I am unable to understand how to manually patch because that part of the code changed so drastically among multiple files LOL. Then I will have to find time to update my SoC to be able to run modern versions of the code on Python 3 etc.

@dirkf
Copy link
Contributor

dirkf commented May 20, 2024

Recent yt-dl versions are running fine, though slowly, with Python 2.7.1 on a Broadcom 7405 SoC with 2xMIP4380 CPUs (oh, and invoking wget for each _request_webpage()). You just have to adjust expectations.

@HPP8140
Copy link

HPP8140 commented May 20, 2024

Recent yt-dl versions are running fine, though slowly, with Python 2.7.1 on a Broadcom 7405 SoC with 2xMIP4380 CPUs (oh, and invoking wget for each _request_webpage()). You just have to adjust expectations.

Currently using a legacy PogoPlug E02 SoC running Debian jessie :) Need to upgrade to some current Odroid or Pi

  • CPU: Marvell 88F6281
  • CPU Cores: 1
  • CPU MHz: 1200
  • Flash MB: 128
  • RAM MB: 256

So instead of <11 seconds for youtube_dl -g, it can take up to 2 minutes per link...so quite a big difference.
After grabbing all links & metadata from my yt watch playlist, I forward links to pyLoad.

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

No branches or pull requests

3 participants