You are not logged in.

#1 2017-05-27 21:26:37

marlock9
Member
Registered: 2014-09-28
Posts: 3

Chromium and Nvidia - how to get hardware acceleration?

Hello guys,
I have KDE5, nvidia-381.22-2, linux 4.11.2-1, gtx1060 videocard. VDPAU is working (tested in mpv), also there is installed vdpau backend for VA-API (libva-vdpau-driver).
Chromium from extra repo haven't hw accel neither in youtube html5 videos nor webGL despite I use --ignore-gpu-blacklist flag. It shows all accelerated on about:gpu page but in fact it isn't.
With chromium-vaapi package I encounter problem described here: https://github.com/saiarcot895/chromium … -230033207. I've installed libva-vdpau-driver-chromium, but all that I get was:

libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_40
Failed to create dedicated X11 display!
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: Operation not permitted
Received signal 8 FPE_INTDIV 7fe29bc782ba
#0 0x563001b4e157 <unknown>
...

As result, hw accel doesn't work at all. Even if it works, youtube hi-res 60 fps videos are encoded to vp9 so VDPAU accel won't work in most cases. So I don't really need this.

BUT! I've discovered ffmpeg decoders called h264_cuvid and vp9_cuvid. These decoders are part of nvidia cuda and works really great in mpv. I've downloaded 8k@60fps VP9 (!) video from youtube and mpv with --vd=vp9_cuvid plays it flawless while CPU loading is about 6%. I think it's great. H.264 4k@60fps with --vd=h264_cuvid playing flawless too.
Further, standard chromium from extra is builded with system ffmpeg support. I think it should be possible to force chromium use h264_cuvid and vp9_cuvid from system ffmpeg as decoders but ffmpeg doesn't have any config files except encoding presets. How to do this?

UPD: maintainers disabled system ffmpeg in chromium 58 so I've installed chromium-dev 60 from archlinuxcn.org. Also I've compiled ffmpeg with disabled vdpau, vaapi support and software decoders (h264, vp9). Now there are only cuvid decoders. When I try open h264 video on youtube (h264ify helps to do that) I get this:

        19:file=libnvcuvid.so.1 [0];  dynamically loaded by /usr/lib/libavcodec.so.57 [0]
[19:35:0528/150300.858027:ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"video decoder initialization failed"}
[19:19:0528/150300.859460:ERROR:render_media_log.cc(30)] MediaEvent: PIPELINE_ERROR DECODER_ERROR_NOT_SUPPORTED

Chromium tries to open cuvid, but it fails. Don't know what to do further.

Last edited by marlock9 (2017-05-28 14:41:15)

Offline

Board footer

Powered by FluxBB