2022-04-16

ubuntu/mint下chromium啟用硬體加速+解決netflix無法觀看

在ubuntu/mint下要啟用chromium的硬體加速,必須是pathced過的版本,

可以用 https://launchpad.net/~saiarcot895/+archive/ubuntu/chromium-beta 
(包含Widevine,觀看netflix等有DRM保護的串流時需要)

或 https://github.com/Eloston/ungoogled-chromium#downloads 
(不包含Widevine)

先裝好對應各顯卡的VA-API driver,啟動chromium時加上以下參數:

chromium-browser --use-gl=desktop --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder
(chromium 98開始需加上 --disable-features=UseChromeOSDirectVideoDecoder)

====2024.09更新(在128的版本實測有效):==========

https://ubuntuhandbook.org/index.php/2024/01/chromium-va-api-wayland/
https://debugpointnews.com/va-api-chromium-wayland/

chromium 121以後的版本,可以不用再找有va-api patched過的版本,直接使用以下參數開啟硬體加速:

On X11:
chromium-browser --enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=x11

On Wayland:
chromium-browser --enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=wayland

=====================================

用ungoogled-chromium又想加上Widevine DRM支援時,
可先下載對應版本的Chrome DEB安裝檔(stable, unstable),
解開後,把 ./opt/google/chrome/WidevineCdm 複製到
 /usr/lib/chromium/WidevineCd 或 ~/.local/lib/WidevineCdm

ref:
https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration
https://www.linuxuprising.com/2018/08/how-to-enable-hardware-accelerated.html
https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq#linux

沒有留言:

張貼留言