Download Youtube videos in highest quality available.
Note: Homebrew is a package manager for Mac only, you’ll need to find an alternative method for installing these libraries if you’re on Windows or Linux.
Install some libraries:
# the downloader
brew install youtube-dl
# for merging video and audio
brew install ffmpeg
Download best quality audio and video and merge into one mp4:
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' 'url' --merge-output-format mp4
With auth:
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' -u 'email' -p 'password' 'url' --merge-output-format mp4
Download best quality audio only:
youtube-dl -f 'bestaudio[ext=m4a]/bestaudio' --embed-thumbnail --add-metadata 'url'