Install Python pip:
sudo apt -y install python-pip
Install youtube downloader:
sudo pip install --upgrade youtube-dl
Install ffmpeg codec so the downloader can merge video and audio track in one file:
sudo apt-get install ffmpeg -y
Create youtube-dl profile directory:
mkdir -p ~/.config/youtube-dl
Eliminate quality to 1080p videos. Do dot allow to download 4k videos:
echo "-f '299+bestaudio[ext=m4a]/137+bestaudio[ext=m4a]/37/136+bestaudio[ext=m4a]/22/135+bestaudio[ext=m4a]/18/134+bestaudio[ext=m4a]/133+bestaudio[ext=m4a]'" > ~/.config/youtube-dl/config
I use to make directory names including youtube channel ID so I can later renew the channel content in a easy way. For example if the directory name is 'md.twins,mauroreyesbest' then every time I need to refresh the content I will use:
renew all:
curl -s "https://catonrug.blogspot.com/feeds/posts/default/5255522565948307079?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > /usr/bin/renew-youtube-channel
curl -s "https://catonrug.blogspot.com/feeds/posts/default/905125781365764435?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > /usr/bin/renew-all-channels
chmod +x /usr/bin/{renew-youtube-channel,renew-all-channels}
1080p profile including 60fps:
1080p profile with 30fps:
720p profile:
480p profile:
360p profile:
No comments:
Post a Comment