Vai al contenuto
yt-dlp

Installare yt-dlp su macOS

Installa yt-dlp e ffmpeg su macOS con Homebrew o pipx e tienili aggiornati.

Questo articolo non è ancora tradotto, quindi è mostrato in inglese. L'interfaccia resta nella tua lingua.

1. Install yt-dlp

Homebrew is the path of least resistance and installs both tools in one line.

brew install yt-dlp ffmpeg

Without Homebrew, pipx keeps yt-dlp in its own environment so it cannot collide with anything else you have installed through Python.

pipx install yt-dlp

Avoid a bare pip install into the system Python: recent macOS releases push back on it, and when it does work it tends to break later for unrelated reasons.

2. Install ffmpeg

Included above if you used Homebrew. Otherwise install it separately — merging, MP3 extraction and embedding all depend on it.

brew install ffmpeg

3. Check it worked

yt-dlp --version
ffmpeg -version

If the shell cannot find yt-dlp after a pipx install, run pipx ensurepath and open a new terminal.

Cookies from Safari

--cookies-from-browser safari needs Full Disk Access for your terminal, granted in System Settings → Privacy & Security. Without it the read fails with a permissions error that does not mention the setting. Chrome and Firefox work without it.

Updating

brew upgrade yt-dlp     # Homebrew
pipx upgrade yt-dlp     # pipx

Domande frequenti

Dopo l'installazione con pipx, macOS non trova yt-dlp.
Esegui pipx ensurepath, poi apri un nuovo terminale così il PATH aggiornato viene letto.
Serve altro per i cookies su macOS?
Solo per Safari: --cookies-from-browser safari richiede l'accesso completo al disco per il tuo terminale, in Impostazioni di Sistema → Privacy e sicurezza. Chrome e Firefox funzionano senza.
Come aggiorno yt-dlp?
Un binario autonomo si aggiorna con yt-dlp -U. Se l'hai installato con un gestore di pacchetti, aggiornalo con quello: l'auto-aggiornamento rifiuta di toccare un file che non gli appartiene. Aggiornare risolve più problemi di qualsiasi flag.