Tech Notes

yt-dlp

pl

The easiest way is to use the yt-dlp tool (a newer and better version of the old youtube-dl). It works great with long content like audiobooks.

1. Installation (Ubuntu)

sudo apt update
sudo apt install yt-dlp

(or the latest version:)

pip install -U yt-dlp

2. Downloading an audiobook (audio only)

yt-dlp -x --audio-format mp3 "<URL>"

This:


3. Better quality (if bitrate matters)

yt-dlp -x --audio-format mp3 --audio-quality 0 "<URL>"

4. If it’s a very long file (e.g. 4h+) and you’re worried about interruptions:

yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" -N 4 "<URL>"

5. Bonus: save with thumbnail and metadata

yt-dlp -x --audio-format mp3 --embed-thumbnail --add-metadata "<URL>"