WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: youtube-dl very slow (not the download, the actual processing of input)  (Read 3183 times)

Offline atomant

  • Newbie
  • *
  • Posts: 30
Hey guys!

 Running piCore 4.9.22 on a rPi Zero W, using Python 2.7.13, i'm trying to extract youtube links using youtube-dl -g <youtube link> which works, however, it's pretty slow. Working from the...not sure how you call these..."packed" file, which is essentially all the python files of youtube-dl put inside a zip archive it takes over 50 seconds to process 1 url, if i use the python files directly, so python doesn't have to uncompress the files prior to executing/parsing/whatever them, this drops to somewhat less than 40 seconds. This is painfully slow. I know the rPi Z is not a powerhouse and also know -more or less- that Python is using an interpreter which will never be as fast as native code but...even so these times seem pretty long.

Any ideas what i might try to speed this up or what i might be doing wrong?
|-|4\/3 4 |\|1(3 |)4\|

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: youtube-dl very slow (not the download, the actual processing of input)
« Reply #1 on: October 04, 2018, 08:35:57 AM »
Hi atomant
Googling:
Code: [Select]
linux youtube-dl get url slowshows you're not the only one with this sort of complaint. Besides the zipped format, I saw a post that suggested
importing of unnecessary modules was a big contributer to slowdowns. The poster stated that regardless of which
command line switches you use, youtube-dl would import all modules the program uses even if not required for
that operation. These modules would in turn import their dependencies. See:
https://github.com/rg3/youtube-dl/issues/3029#issuecomment-180441378

I also ran across a post suggesting the  -4  option to ensure it connects using  IPV4.
« Last Edit: October 04, 2018, 08:37:53 AM by Rich »

Offline atomant

  • Newbie
  • *
  • Posts: 30
Re: youtube-dl very slow (not the download, the actual processing of input)
« Reply #2 on: October 04, 2018, 10:39:29 PM »
Thank you, Rich, i will look into that.
|-|4\/3 4 |\|1(3 |)4\|