共计 1333 个字符,预计需要花费 4 分钟才能阅读完成。
Youtube-dl Webui
introduction
this article have introduce two way for Youtube-dl download by a web,which respectively download in client and download in server. You can choose according to your demand.
client download web
precondition
php(extension:intl,mbstring,gmp),nginx/apache,python,youtube-dl
download
#cd /{yourserver directory}
#git clone https://github.com/Rudloff/al…
install composer in local directory
#php -r “copy(‘https://install.phpcomposer.c…’, ‘composer-setup.php’);”
#php composer-setup.php
#composer install
then composer will auto install all the dependencies.
#chmod 770 templates_c/
config
cp config/config.example.yml config/config.yml
then you can visti yourserver/alltube to download videos and choose the format you want
server download web
use youtube-dl to download video without command.
precondition
python,ffmpeg
install
#git clone https://github.com/d0u9/youtu…
#cd /youtube-dl-webui
#python setup.py install
run
There is a config.json file in the directory,you can use it as default configuration file,but I recommend you edit it. Because the default has a proxy option and only download bestaudio. Blow is my configuration file you can refer to.
{
"general": {
"download_dir": "/home/youtube-dl",
"db_path": "/tmp/youtube_dl_webui.db",
"log_size": 10
},
"server": {
"host": "0.0.0.0",
"port": "5000"
},
"youtube_dl": {
"format": "bestvideo+bestaudio",
"ratelimit": 10971520,
"outtmpl": "%(title)s.%(ext)s"
}
}
#youtube-dl-webui -c {Configuration file}
visit the host:port