2026年4月21日 星期二

透過PotPlayer即時翻譯Youtube直播內容

簡介:

1. 瀏覽器跳轉PotPlayer
2. 透過顯示卡即時產生語音字幕,再透過線上翻譯工具產生字幕的翻譯
3. 透過yt-dlp讓PotPlayer讀取cookie,以觀看會限直播


一、瀏覽器plugin:PotPlayer YouTube Shortcut

功能是讓你可以直接從Youtube一鍵開啟PotPlayer


二、PotPlayer

  1. 安裝PotPlayer

  2. 自動產生字幕:右鍵選單 > 字幕 > 聲音有聲字幕(即時)

  1. 使用條件:一律使用

  2. 轉換引擎:N卡用 CUDA ,其他卡用Vulkan;需下載,下載安裝時可能會碰到權限問題,需要手動給予管理員權限

  3. 模型:看自己的顯示卡VRAM多大,4G 以下用 tiny,跑得動再換 base試試;6G 用small、8G用 medium、12G以上用 large

  1. 翻譯:右鍵選單 > 字幕 > 即時字幕翻譯

  1. 使用條件:一律使用

  2. 翻譯位置:顯示翻譯於該行之下

  3. 翻譯引擎、目標語言視情況更改

  1. 此時播放一般的公開影片、公開直播已經可以顯示字幕+翻譯了


三、yt-dlp與cookie (手動)

  1. PotPlayer extension:https://github.com/hgcat-360/PotPlayer-Extension_yt-dlp

  1. Release頁面下載”source code (zip)”

  2. 解壓縮放到<PotPlayer folder>\Extension\Media\PlayParse\

  1. yt-dlp.exe:https://github.com/yt-dlp/yt-dlp

  1. Release頁面下載”yt-dlp.exe”

  2. 解壓縮放到<PotPlayer folder>\Module\

  1. deno.exe:https://github.com/denoland/deno

  1. Release頁面下載”deno-x86_64-pc-windows-msvc.zip

  2. 解壓縮放到<PotPlayer folder>\Module\

  1. Chrome Plugin:Get cookies.txt LOCALLY

  1. 開啟Youtube,登入

  2. 點Plugin並Export,從下載資料夾移動到方便的位置 (Ex. D:\yt-dlp)

  3. 改檔名方便後續處理 (Ex. yt-cookie.txt)

  1. yt-dlp.conf

  1. 建立一個yt-dlp.conf檔案

  2. 輸入以下內容

--cookies "D:\yt-dlp\yt-cookie.txt"

  1. 存檔後將檔案移動到<PotPlayer folder>\Module\


四、yt-dlp與cookie (自動)

  1. 安裝firefox,並登入Youtube

  2. 將yt-dlp.conf的參數改為以下內容即可

--cookies-from-browser firefox


以上完成後,就可以按鈕後從PotPlayer開啟會員限定的直播了

註:cookie的時效很短,手動匯出的話經常需要重新Export / 移動、改名


參考資料:

https://www.facebook.com/groups/ComputerAnswer/posts/4439350426347616/

https://github.com/hgcat-360/PotPlayer-Extension_yt-dlp