本文へスキップ
yt-dlp

macOS に yt-dlp をインストールする

Homebrew か pipx で macOS に yt-dlp と ffmpeg を入れ、最新の状態に保ちます。

この記事はまだ翻訳されていないため、英語で表示しています。画面のインターフェースはあなたの言語のままです。

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

よくある質問

pipx で入れたあと macOS が yt-dlp を見つけられません。
pipx ensurepath を実行し、新しい端末を開いて更新後の PATH を読み込ませてください。
macOS で cookies を使うのに何か追加設定が必要ですか?
Safari の場合だけです:--cookies-from-browser safari は端末にフルディスクアクセスを要求します(システム設定 → プライバシーとセキュリティ)。Chrome と Firefox は不要です。
yt-dlp はどう更新しますか?
単体のバイナリは yt-dlp -U で自分を更新します。パッケージマネージャで入れた場合はそちらで更新してください。自己更新は自分の所有でないファイルの変更を拒みます。更新はどの flag より多くの問題を解決します。