alltube icon indicating copy to clipboard operation
alltube copied to clipboard

Switch to yt-dlp

Open inyourface34456 opened this issue 3 years ago • 7 comments

New Feature Request

Can you do a full switch to yt-dlp? This could make downloading much faster in general, and also while you are at it, add the flag --compat-options no-playlist-metafiles and (once you complete the conversion) -N 20? That would make things a lot easier on me because then i do not have to go and add all of the metadata myself.

inyourface34456 avatar Jan 25 '22 20:01 inyourface34456

This can be configured in your config file (see this example). You can set youtubedl to point to your yt-dlp install and you can use params to set any option you need.

Rudloff avatar Jan 25 '22 21:01 Rudloff

How would I do this in replit.com? How would i even make this compatible (it throws an error when I try to run it, to run it you have to type php -S 0.0.0.0:8000 -f index.php in the shell tab)?

inyourface34456 avatar Jan 26 '22 13:01 inyourface34456

It's easy for installation from Github sources. Assuming you have python3 and the alltube itself installed and working:

Git clone yt-dlp to /vendor subfolder of alltube Edit config/config.yml: Change: youtubedl: vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py to: youtubedl: vendor/yt-dlp/yt_dlp/__main__.py

Change: python: /usr/bin/python to: python: /usr/bin/python3

That's enough to make it work. As for other flags you want, i have no idea, never tried them.

AyoKeito avatar Jan 27 '22 17:01 AyoKeito

You can also download the yt-dlp binary separately and update the config like so:

# Path to your youtube-dl binary
youtubedl: /usr/local/bin/yt-dlp

# Path to your python binary
python: /usr/bin/python3

gramakri avatar Jan 31 '22 18:01 gramakri

When I ran it, the first error that it yelled at me about was not having something called autoload.php. I do not know what that is or how to get it, since i just tossed all of the files in to replit.com and ran it. This is why I haven't figured it out already. Screenshot: image

inyourface34456 avatar Jan 31 '22 20:01 inyourface34456

here is edited by me yt-dlp version for heroku if u want https://github.com/rafalohaki/alltube

rafalohaki avatar Mar 27 '22 21:03 rafalohaki

Got it working on master with very minor changes to the Dockerfile:

diff --git a/Dockerfile b/Dockerfile
index e5ac935..d2f7124 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,7 @@
 FROM php:7.3-apache
 RUN apt-get update
-RUN apt-get install -y libicu-dev xz-utils git python libgmp-dev unzip ffmpeg
+RUN apt-get install -y libicu-dev xz-utils git python3 python3-pip libgmp-dev unzip ffmpeg
+RUN python3 -m pip install yt-dlp
 RUN docker-php-ext-install mbstring
 RUN docker-php-ext-install intl
 RUN docker-php-ext-install gmp

And these 2 entries in config.yml:

youtubedl: /usr/local/bin/yt-dlp
python: /usr/bin/python3

Roman2K avatar Jun 06 '22 10:06 Roman2K