youtube-dl 小记

因有Youtube视频更新需要,所以写下一篇攻略,为日后做方便

wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

chmod a+rx /usr/local/bin/youtube-dl


yum install git

yum -y install epel-release

yum -y install python-pip

yum clean all

pip install requests

pip install --upgrade pip


git clone https://github.com/houtianze/bypy.git

cd bypy

python setup.py install

或者

git clone https://github.com/houtianze/bypy byby/

cd byby/

python setup.py install



bypy upload -v 上传

以下是需要整合字幕需要安装的FFmpeg

sudo yum install epel-release -y

sudo yum update -y

sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

sudo yum install ffmpeg ffmpeg-devel -y

安装完成

用法小记

youtube-dl --write-auto-sub --embed-thumbnail 【网站】

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' --write-auto-sub --sub-lang en --embed-sub -i 【list编号】

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 --write-auto-sub --sub-lang en --embed-subs --prefer-ffmpeg -i https://www.youtube.com/playlist?list=PLPphPHIzdSQPhHIEDhqwg0qh5p-FgwxTH

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 --write-auto-sub --sub-lang en --embed-subs 0J5NQPLwkfM

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4  UvAg3ZmsXB8

ffmpeg -i ‘Head Shoulders Knees And Toes (2019) _ Nursery Rhymes _ Super Simple Songs-RuqvGiZi0qg.mp4’ -vf subtitles=‘Head Shoulders Knees And Toes (2019) _ Nursery Rhymes _ Super Simple Songs-RuqvGiZi0qg.en.vtt’ ‘Head Shoulders Knees And Toes (2019) _ Nursery Rhymes _ Super Simple Songs-RuqvGiZi0qg-1.mp4’

你可能感兴趣的:(youtube-dl 小记)