yt-dlp can't download anything(I downloaded newest one)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
teskilatimahsusa87
DD-WRT Novice


Joined: 04 Oct 2023
Posts: 30

PostPosted: Sat Jan 06, 2024 20:21    Post subject: yt-dlp can't download anything(I downloaded newest one) Reply with quote
I run it like this:
Quote:
yt-dlp videoURL
I can't get it to download anything. I downloaded the yt-dlp file from their github. Same way I used yt-dlp in openwrt. Although it worked with openwrt before. I also provided the dependencies too. It gives this output, but I have 256mb ram.
Code:
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/bin/yt-dlp/__main__.py", line 17, in <module>
  File "/opt/bin/yt-dlp/yt_dlp/__init__.py", line 1009, in main
  File "/opt/bin/yt-dlp/yt_dlp/__init__.py", line 963, in _real_main
  File "/opt/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 739, in __init__
  File "/opt/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 835, in add_default_info_extractors
  File "/opt/bin/yt-dlp/yt_dlp/extractor/__init__.py", line 11, in gen_extractor_classes
  File "/opt/bin/yt-dlp/yt_dlp/extractor/extractors.py", line 12, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1138, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1078, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1504, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1476, in _get_spec
  File "<frozen zipimport>", line 169, in find_spec
  File "<frozen importlib._bootstrap>", line 435, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 798, in spec_from_file_location
  File "<frozen zipimport>", line 228, in get_filename
  File "<frozen zipimport>", line 758, in _get_module_code
  File "<frozen zipimport>", line 627, in _get_data
MemoryError: Unable to allocate output buffer.
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1858
Location: Hung Hom, Hong Kong

PostPosted: Sun Jan 07, 2024 8:17    Post subject: Re: yt-dlp can't download anything(I downloaded newest one) Reply with quote
teskilatimahsusa87 wrote:
I run it like this:
Quote:
yt-dlp videoURL
I can't get it to download anything. I downloaded the yt-dlp file from their github. Same way I used yt-dlp in openwrt. Although it worked with openwrt before. I also provided the dependencies too. It gives this output, but I have 256mb ram.
Code:
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  ...
  File "<frozen zipimport>", line 228, in get_filename
  File "<frozen zipimport>", line 758, in _get_module_code
  File "<frozen zipimport>", line 627, in _get_data
MemoryError: Unable to allocate output buffer.

You should install the yt-dlp from Entware, not directly from GitHub. I suspect those errors were caused by missing Python libraries.

Yt-dlp Commands: The Complete Tutorial For Beginners (2024) - OSTechNix
https://ostechnix.com/yt-dlp-tutorial/

BTW, maybe you should just use Windows' static binary. It's more supported. Smile
Code:
# opkg install yt-dlp
Installing yt-dlp (2023.3.4-2) to root...
Downloading http://bin.entware.net/armv7sf-k3.2/yt-dlp_2023.3.4-2_armv7-3.2.ipk
Configuring yt-dlp.
#
# which yt-dlp
/opt/bin/yt-dlp
# yt-dlp

Usage: yt-dlp [OPTIONS] URL [URL...]

yt-dlp: error: You must provide at least one URL.
Type yt-dlp --help to see a list of all options.
#
# yt-dlp "https://www.youtube.com/watch?v=Y6mihRBWw-Y"
[youtube] Extracting URL: https://www.youtube.com/watch?v=Y6mihRBWw-Y
[youtube] Y6mihRBWw-Y: Downloading webpage
[youtube] Y6mihRBWw-Y: Downloading android player API JSON
[info] Y6mihRBWw-Y: Downloading 1 format(s): 22
ERROR: unable to download video data: HTTP Error 403: Forbidden
#
# yt-dlp -x "https://www.youtube.com/watch?v=Y6mihRBWw-Y"
[youtube] Extracting URL: https://www.youtube.com/watch?v=Y6mihRBWw-Y
[youtube] Y6mihRBWw-Y: Downloading webpage
[youtube] Y6mihRBWw-Y: Downloading android player API JSON
[info] Y6mihRBWw-Y: Downloading 1 format(s): 251
[dashsegments] Total fragments: 1
[download] Destination: COM-TEST 1 | YouTube's actual first video [Y6mihRBWw-Y].webm
[download] 100% of  101.21KiB in 00:00:00 at 372.48KiB/s
ERROR: Postprocessing: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location
#
# ls -l
total 104
-rw-r--r--    1 root     root        103643 Aug 11  2021 COM-TEST 1 | YouTube's actual first video [Y6mihRBWw-Y].webm

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
teskilatimahsusa87
DD-WRT Novice


Joined: 04 Oct 2023
Posts: 30

PostPosted: Mon Jan 08, 2024 22:04    Post subject: Reply with quote
You say use from entware but websites gain new methods of blocking yt-dlp stuff. That's why I use github's version. Btw I think it was because of DNS. But don't know for sure. Now I am using Tenda AC18 Fresh tomato for a while. I set up DNS in freshtomato, yt-dlp works perfectly now. I assume it would work if I set the DNS right away in DD-WRT.

Last edited by teskilatimahsusa87 on Tue Jan 09, 2024 21:27; edited 1 time in total
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1858
Location: Hung Hom, Hong Kong

PostPosted: Tue Jan 09, 2024 6:05    Post subject: Reply with quote
teskilatimahsusa87 wrote:
You say use from entware but websites gain new methods of blocking yt-dlp stuff.... Now I am using Tenda AC18 Fresh tomato for a while.

"websites gain new methods of blocking yt-dlp stuff" <-- you talking about YouTube? Expected because of copyright and intellectual property issues.

Youtube has nothing to do with Entware. Entware is a software repository for extending DD-WRT and OpenWRT. I did not know that Fresh Tomato had Entware. Smile

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum