for a simpler youtube-dl
This script will download the best quality audio, video and thumbnail, using youtube-dl
, from a YouTube video URL that you provide.
Combine them together using
ffmpeg
into an mp4 video with mp3 audio with the thumbnail as the YouTube Video provided
or
An mp3 audio file with the video's thumbnail as album art.
This script as been tested on the following linux distros as a sudo
user.
- Ubuntu server 20.04
- Ubuntu server 18.04
- Ubuntu Desktop 20.04
- Ubuntu Desktop 18.04
- Debian 10.9
- Tested on debian
- Easy to use
bash <(curl -s https://raw.githubusercontent.com/diyaa59/youtube-dl-mp4-mp3/main/install.sh)
# Install ffmpeg, git, atomicparsley, python
sudo apt install -y ffmpeg git atomicparsley python
# make a directory and move into it
mkdir ~/script
cd ~/script
# Download the repo and enter it's directory
git clone https://github.com/diyaa59/youtube-dl-mp4-mp3.git
cd youtube-dl-mp4-mp3
# Give the script execute permissions.
chmod +x bin/youtube-dl-mp4-mp3
# Add ~/script/youtube-dl-mp4-mp3/bin/ to your user PATH variable.
echo 'export PATH=~/script/youtube-dl-mp4-mp3/bin/:$PATH' | tee -a ~/.bashrc > /dev/null
youtube-dl-mp4-mp3
cd ~/script/youtube-dl-mp4-mp3
git pull