The yt-dlp package provides a CLI utility to download audio and video files from thousands of websites, including YouTube. It can convert downloads into other formats using FFmpeg.
Install yt-dlp by running the following commands:
make yt-dlp
Now, as the root user:
install -vDm755 yt-dlp -t /usr/bin/