Code Monkey home page Code Monkey logo

vdpau-va-driver-vp9's Introduction

vdpau-va-driver-vp9's People

Contributors

i-rinat avatar xtknight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vdpau-va-driver-vp9's Issues

VP9 videos do not play in Chromium 87 or newer

I have upgraded my chromium to the latest version (currently 87) and VP9 decoding has stopped working. I get this error whenever I try to play a VP9 video on YouTube:

image

Chromium GPU page shows me this error:

[980967:1053074:1125/212921.939923:ERROR:vaapi_utils.cc(47)] : vaMapBuffer failed: invalid VABufferID
[980967:1053074:1125/212921.940044:ERROR:vaapi_video_decode_accelerator.cc(528)] : Error decoding stream
[980967:1053155:1125/212926.108133:ERROR:vaapi_utils.cc(47)] : vaMapBuffer failed: invalid VABufferID
[980967:1053155:1125/212926.108211:ERROR:vaapi_video_decode_accelerator.cc(528)] : Error decoding stream

And media page shows this error:
image

I tried using h264ify extension and h264 videos work just fine with hardware acceleration (MojoVideoDecoder). So only VP9 videos are not playing.

Seems like other people have the same problem too: saiarcot895/chromium-ubuntu-build#102

I'm not entirely sure if this bug is related to this project or not. Feel free to close it if it's not.

Thanks for your help.

Backtrace sometimes printed when closing chromium tab or window

00: /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1 [0x7f8e3fa13b29]
VDPAU nvidia: Version: NVIDIA VDPAU Driver Shared Library 440.44 Sun Dec 8 03:27:26 UTC 2019
VDPAU nvidia: Error detected 0 7402
VDPAU nvidia: Backtrace:
--: /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1 [0x7f8e3fa09000] DSO load base
00: /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1 [0x7f8e3fa104ff]
01: /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1 [0x7f8e3fa1ea7a]
02: /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1 [0x7f8e3fa0fb62]
03: /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1 [0x7f8e3fa11581]
04: /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1 [0x7f8e3fa13bd6]

May be an issue with the underlying framework - still investigating

vaExportSurfaceHandle support request (makes Firefox work)

According to Mozilla after i recently inquired and #11 (comment) the only reason this doesn't work with Firefox now that nvidia-drivers has added DMABUF support is the lack of this wrapper supporting a "vaExportSurfaceHandle" method.

Implementing "vaExportSurfaceHandle" here would enable accelerated video decoding in Firefox for nvidia users.

Black screen with youtube

Hardware decode is on, But screen is black in chrome browser

Decoder Name VDAVideoDecoder
Hardware decoder true

$ ldd ./nvidia_drv_video.so
linux-vdso.so.1 (0x00007ffe2f735000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f2809283000)
libvdpau.so.1 => /lib/x86_64-linux-gnu/libvdpau.so.1 (0x00007f280927d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2809055000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f280902b000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f2809016000)
/lib64/ld-linux-x86-64.so.2 (0x00007f28093f0000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f280900e000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f2809006000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f2808fee000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f2808fe1000)

$ vainfo
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG4Simple : VAEntrypointVLD
VAProfileMPEG4AdvancedSimple : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD

[17914:17914:0428/215455.930786:ERROR:vaapi_wrapper.cc(2516)] vaPutSurface failed, VA error: operation failed
[17914:17914:0428/215455.931411:ERROR:vaapi_video_decode_accelerator.cc(288)] Failed putting surface into pixmap

840m error

kali linux 2020.4 nvidia driver 450.66

┌─[root@kali]─[~/Desktop/vdpau-va-driver-vp9]
└──╼ #vainfo
libva info: VA-API version 1.9.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_9
GPU at BusId 0xa doesn't have a supported video decoder
libva error: /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

NVRM: MMU Fault: ENGINE NVDEC HUBCLIENT_NVDEV faulted @ 0x0_00000000

Mouse suddenly lags and OOM killer activated. This cleared up after a couple reboots, reinstalling vdpau libs, trying other hardware accelerated codecs and then VP9 again. VP9 then seems to work flawlessly for awhile. Unknown cause...hard to know if this is a bug internal to the NVIDIA VDPAU module or related to perhaps some surface code in VDPAU/VAAPI wrapper or VP9 code itself.

In dmesg, a couple messages appear similar to this:

NVRM: Xid (PCI:0000:00:06): 31, pid=2708, Ch 0000003d, intr 10000000. MMU Fault: ENGINE NVDEC HUBCLIENT_NVDEV faulted @ 0x0_00000000. Fault is of type FAULT_PDE ACCESS_TYPE_READ

Black screen while suspended

Hi Andrew,

I just wanted to thank you so much for your work on getting VP9 hardware acceleration working on YouTube with my GTX 1060. While I needed to apply a patch with makepkg (I can share more info on this), everything works absolutely perfectly. 

However, there is one small issue that troubles me. I'm unsure if you're able to fix this, but this is also an issue with H.264 video. When I leave a video paused for a while and it enters a pipeline state of kSuspended (chrome://media-internals), the video screen goes black.

Are there any possible solutions to remedy this?
Again, thank you so much for your great work.

https://imgur.com/a/g6kdpCB
https://imgur.com/a/6mulf77

patch to compile chromium

Thanks for your work :)

I'm having problems to compile chromium with the right patch.

I'm running Debian Sid, with Chromium 80.0.3987.106 and a NVIDIA GTX 1070

According to the changelog of the package, the vaapi should be enabled from version 78:

chromium (78.0.3904.108-1) unstable; urgency=medium
https://metadata.ftp-master.debian.org/changelogs//main/c/chromium/chromium_80.0.3987.106-1_changelog

-- Michael Gilbert <[email protected]>  Wed, 20 Nov 2019 23:46:06 +0000

chromium (78.0.3904.97-1) unstable; urgency=medium

  * New upstream security release.
  * Enable vaapi (closes: #940074).
  * Fix crash during profile manager shutdown.
  * Drop libglewmx-dev build dependency (closes: #941050).

The patch seems to be based on the Arch patch for vaapi: https://aur.archlinux.org/packages/chromium-vaapi/?O=0&PP=250

But I couldn't make your vp9 driver to work with this version, instead, I have the following error:

$ chromium --enable-gpu-rasterization --ignore-gpu-blacklist --disable-gpu-driver-workarounds
vdpau_video: NVIDIA VDPAU Driver Shared Library  440.59  Thu Jan 30 00:56:39 UTC 2020
[297340:297340:0218/213906.871609:ERROR:vaapi_wrapper.cc(516)] GetConfigAttributes failed for va_profile VAProfileH264Baseline
[297340:297340:0218/213906.871788:ERROR:vaapi_wrapper.cc(516)] GetConfigAttributes failed for va_profile VAProfileH264Main
[297340:297340:0218/213906.871851:ERROR:vaapi_wrapper.cc(516)] GetConfigAttributes failed for va_profile VAProfileH264High
[297343:297380:0218/213907.045995:ERROR:nss_util.cc(283)] After loading Root Certs, loaded==false: NSS error code: -8018
[297892:46:0218/213918.117493:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
Failed to create dedicated X11 display!
vdpau_video: NVIDIA VDPAU Driver Shared Library  440.59  Thu Jan 30 00:56:39 UTC 2020
[297340:297340:0218/213924.289136:ERROR:vaapi_wrapper.cc(2158)] vaCreateSurfaces failed VA error: attribute not supported
[297892:58:0218/213924.290306:ERROR:batching_media_log.cc(26)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"VDA Error 4"}

and the video is played with software decoding.

If I use the Ubuntu deb package provided by saiarcot895 (https://github.com/saiarcot895/chromium-ubuntu-build/) from PPA repository the driver works very well and I get hardware acceleration with your driver.

But since I use Debian, and I have to change some packages of my system to be able to run saiarcot895 Ubuntu package, I think that it is better to compile chromium myself.

My question is if you can share the patch that you used, or point me to the minimum patch necessary to enable it.

The Debian package seems to implement something, but it is missing some for fully enable hardware acceleration with your driver and NVIDIA card.

The chromium compilation takes a lot of time on my machine, and if you could point me to the right package it would save me a lot of time.

The official pach is a bit outdated as well https://chromium-review.googlesource.com/c/chromium/src/+/532294

but if you say that the official patch should be enough I'll try to insert it in my source.

Thanks!

VA-API Initialization Failing on Chromium

I'm not sure if this error is caused by this patch or incorrect build configurations of the chromium package on the Arch repository. Any pointers of how to proceed would be welcome!

  • Chromium Version 84.0.4147.89 (Official Build) Arch Linux (64-bit)
  • VA-API <-> VDPAU Installed Thru AUR Package
  • Chromium --ignore-gpu-blacklist enabled.
  • VA-API Patches Installed
  • Linux manjaro 5.6.19-2-MANJARO

Chromium error when trying to playback a h264 or VP9 video:

Failed to create dedicated X11 display!
[181570:181570:0728/022528.579224:ERROR:vaapi_video_decode_accelerator.cc(688)] Failed to initialize VppVaapiWrapper
[181936:15:0728/022528.588705:ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"VDA Error 4"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.