Featured image of post 如何使用 yt-dlp.exe 下載 YouTube 影片

如何使用 yt-dlp.exe 下載 YouTube 影片

什麼是 yt-dlp

yt-dlp 是一個用於下載 YouTube 影片的命令列工具。 不僅可以下載影片,還可以將其作為音樂檔案以 mp3 格式下載。

下載與安裝

  1. yt-dlp 的發布頁面 下載最新的 yt-dlp.exe。
  2. 將 yt-dlp.exe 放置在任意資料夾中。
  3. 將 yt-dlp.exe 的資料夾路徑加入到環境變數 Path 中。

使用方法

在命令提示字元中執行 yt-dlp.exe,並指定 YouTube 影片的 URL。

1
yt-dlp.exe "https://www.youtube.com/watch?v=VIDEO_ID"

※ 參數部分也可以只輸入 VIDEO_ID。

如果要將其下載為 mp3 音樂檔案,請執行以下命令:

1
yt-dlp.exe --extract-audio --audio-format mp3 --embed-thumbnail --add-metadata "https://www.youtube.com/watch?v=VIDEO_ID"

這樣,影片就會下載到執行命令的當前目錄中。

以上。

comments powered by Disqus
使用 Hugo 建立
主題 StackJimmy 設計