Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.94k stars 585 forks source link

Switch to yt-dlp #388

Open inyourface34456 opened 2 years ago

inyourface34456 commented 2 years ago

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.

Rudloff commented 2 years ago

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.

inyourface34456 commented 2 years ago

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)?

AyoKeito commented 2 years ago

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.

gramakri commented 2 years ago

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
inyourface34456 commented 2 years ago

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

rafalohaki commented 2 years ago

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

Roman2K commented 2 years ago

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