Closed DoveKi closed 1 year ago
在目前ubuntu chrome 下可以通过flag启用avc/h264硬件加速 b站需在播放设置里手动改avc 播放时在chrome://media-internals 可以看到VaapiVideoDecoder正常启用,4k60fps的视频基本无cpu占用 Wayland- /usr/bin/google-chrome-stable --disable-features=UseChromeOSDirectVideoDecoder --use-gl=egl --enable-features=VaapiVideoDecoder Xorg- /usr/bin/google-chrome-stable --disable-features=UseChromeOSDirectVideoDecoder --use-gl=desktop --enable-features=VaapiVideoDecoder 通过以上参数启动chrome只要系统本身vaapi配置没问题都可以正常启用vaapi,我只在i卡和a卡测试过,n卡用走的是vdpau,我没有n卡不清楚 Electron在Linux下理论上也可以通过flag启用vaapi app.commandLine.appendSwitch('disable-features', 'UseChromeOSDirectVideoDecoder') app.commandLine.appendSwitch('use-gl', 'egl') Wayland app.commandLine.appendSwitch('use-gl', 'desktop') Xorg app.commandLine.appendSwitch('enable-features', 'VaapiVideoDecoder')
在目前ubuntu chrome 下可以通过flag启用avc/h264硬件加速 b站需在播放设置里手动改avc 播放时在chrome://media-internals 可以看到VaapiVideoDecoder正常启用,4k60fps的视频基本无cpu占用 Wayland- /usr/bin/google-chrome-stable --disable-features=UseChromeOSDirectVideoDecoder --use-gl=egl --enable-features=VaapiVideoDecoder Xorg- /usr/bin/google-chrome-stable --disable-features=UseChromeOSDirectVideoDecoder --use-gl=desktop --enable-features=VaapiVideoDecoder 通过以上参数启动chrome只要系统本身vaapi配置没问题都可以正常启用vaapi,我只在i卡和a卡测试过,n卡用走的是vdpau,我没有n卡不清楚 Electron在Linux下理论上也可以通过flag启用vaapi app.commandLine.appendSwitch('disable-features', 'UseChromeOSDirectVideoDecoder') app.commandLine.appendSwitch('use-gl', 'egl') Wayland app.commandLine.appendSwitch('use-gl', 'desktop') Xorg app.commandLine.appendSwitch('enable-features', 'VaapiVideoDecoder')