Lompat ke konten
yt-dlp

Memasang yt-dlp di macOS

Pasang yt-dlp dan ffmpeg di macOS dengan Homebrew atau pipx, dan cara memperbaruinya.

Artikel ini belum diterjemahkan, jadi ditampilkan dalam bahasa Inggris. Antarmukanya tetap dalam bahasa Anda.

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

Pertanyaan yang sering diajukan

macOS tidak menemukan yt-dlp setelah dipasang dengan pipx.
Jalankan pipx ensurepath, lalu buka terminal baru agar PATH yang sudah diperbarui terbaca.
Apakah butuh sesuatu tambahan untuk cookies di macOS?
Hanya untuk Safari: --cookies-from-browser safari butuh Full Disk Access untuk terminal Anda, di System Settings → Privacy & Security. Chrome dan Firefox jalan tanpa itu.
Bagaimana cara memperbarui yt-dlp?
Binary mandiri memperbarui dirinya dengan yt-dlp -U. Kalau dipasang lewat package manager, perbarui lewat manager itu; pembaruan mandiri akan menolak mengubah berkas yang bukan miliknya. Memperbarui menyelesaikan lebih banyak masalah daripada flag apa pun.