nvidia-vaapi-driver 0.0.11 for ubuntu 22.04 下载 [更新于2023-12-22]

仅仅用于软件推荐,不适合发求软件或软件使用问题方面的贴子
回复
头像
flwwater
帖子: 762
注册时间: 2010-10-31 9:15
系统: kubuntu 24.04

nvidia-vaapi-driver 0.0.11 for ubuntu 22.04 下载 [更新于2023-12-22]

#1

帖子 flwwater » 2022-11-11 12:23

使用nvidia显卡的用户也能用firefox观看视频,并且是vaapi硬解的,从而解放CPU,降低能耗.



0.0.11下载地址:
https://z701.com/f/11603714-994279768-d7d553
解压密码 ubuntu

----------------------------------------------------------------------------历史版本-----------------------------------------------------------
0.0.9下载地址
https://089u.com/f/11603714-824605261-6204a5
解压密码 ubuntu

使用方法:
下载
解压
进入解压后的目录
运行install.sh即可
具体看目录内的md文件


更新日志:

支持YUV444 on direct-backend (>= 525版本驱动)
AV-1 10bit


使用 direct-backend,直接走显卡通道,cpu占用率进一步下降,播放4k时cpu占用率降到个位数了,跟本地播放差不多了。但是需要 >= 525版本驱动

0.0.8下载地址:
https://089m.com/f/11603714-810050211-3236ea
解压密码 ubuntu

更新日志:

Improved error checking. Previously we'd just exit when detecting a CUDA error, now we'll attempt to return an appropriate error code. This resolves the issue that unrelated applications that happen to init this library where crashing at start-up due to the aforementioned EGL backend breaking.
Support 10/12 bit formats
Use NVD_GPU to control which DRM node to open in direct backend mode




Direct Backend
此版新增了Direct Backend,用在525驱动上的,525驱动用不了EGL后端。
The direct backend is a new selectable backend (via the NVD_BACKEND env. var) that that uses the NVIDIA kernel driver directly to allocate and export buffers, rather than using EGL. The EGL backend (which is still the default) was broken in the 525 driver series, so the use of the direct backend is necessary for decoding to work.
However, due to the use of the undocumented and unsupported NVIDIA API the kernel driver provides, it's likely that the direct backend could be broken by driver updates (with that said, the EGL backend has also just been broken by a driver update so... shrug).


0.0.7下载地址:
https://089m.com/f/11603714-722632054-baf4c9
解压密码 ubuntu


The NVIDIA-VAAPI-Driver is the open-source, community-developed Video Acceleration API (VA-API) implementation that is built to make use of NVIDIA's NVDEC interface exposed by their proprietary Linux graphics driver stack. In turn this VA-API implementation is notable since it allows for NVIDIA GPU video acceleration with Firefox that targets VA-API but not the NVIDIA interfaces.


nvidia-vaapi-driver

This is an VA-API implementation that uses NVDEC as a backend. This implementation is specifically designed to be used by Firefox for accelerated decode of web content, and may not operate correctly in other applications.

This library requires that the nvidia_drm kernel module is configured with the parameter nvidia-drm.modeset=1
Codec Support

Codec Support

Hardware decoding only, encoding is not supported.
Codec Supported Comments
AV1 heavy_check_mark Firefox 98+ is required.
H.264 heavy_check_mark
HEVC heavy_check_mark
VP8 heavy_check_mark
VP9 heavy_check_mark Requires being compiled with gstreamer-codecparsers-1.0
MPEG-2 heavy_check_mark
VC-1 heavy_check_mark
MPEG-4 x VA-API does not supply enough of the original bitstream to allow NVDEC to decode it.
JPEG x This is unlikely to ever work, the two APIs are too different.

YUV444 is supported but requires:

>= Turing (20XX/16XX)
HEVC
Direct backend

To view which codecs your card is capable of decoding you can use the vainfo command with this driver installed, or visit the NVIDIA website here.
Installation

To install and use nvidia-vaapi-driver, follow the steps in installation and configuration. It is recommended to follow testing as well to verify hardware acceleration is working as intended.

Requirements

NVIDIA driver series 470 or 500+

Package manager
Distribution Package name
ArchAUR libva-nvidia-driver
ArchAUR nvidia-vaapi-driver-git
Debian,Ubuntu nvidia-vaapi-driverdebian ubuntu
Fedora, RHEL and derivates (Rocky, Alma, etc). nvidia-vaapi-driver

Feel free to add your distributions package in an issue/PR.
Building

You'll need meson, the gstreamer-plugins-bad library, and nv-codec-headers installed.
Package manager Packages Optional packages for additional codec support
pacman meson gst-plugins-bad ffnvcodec-headers
apt meson gstreamer1.0-plugins-bad libffmpeg-nvenc-dev libva-dev libgstreamer-plugins-bad1.0-dev
yum/dnf meson libva-devel gstreamer1-plugins-bad-freeworld nv-codec-headers gstreamer1-plugins-bad-free-devel

Then run the following commands:

meson setup build
meson install -C build

Removal

By default the driver installs itself as /usr/lib64/dri/nvidia_drv_video.so (this might be /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so on some distros). To uninstall the driver, simply remove this file. In addition, this file is usually symlinked to /usr/lib64/dri/vdpau_drv_video.so (or /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so) if the VDPAU to VA-API driver is installed, so this symlink will need to be restored for that driver to work normally again.
Configuration

IMPORTANT: The direct backend is currently required on NVIDIA driver series 525 due to a regression (see issue #126).
Kernel parameters

This library requires that the nvidia_drm kernel module is configured with the parameter nvidia-drm.modeset=1
Environment Variables

Environment variables used to control the behavior of this library.
Variable Purpose
NVD_LOG Used to control logging. 1 to log to stdout, anything else to append to the given file.
NVD_MAX_INSTANCES Controls the maximum concurrent instances of the driver will be allowed per-process. This option is only really useful for older GPUs with not much VRAM, especially with Firefox on video heavy websites.
NVD_BACKEND Controls which backend this library uses. Either egl (default), or direct. See direct backend for more details.
Firefox

To use the driver with firefox you will need at least Firefox 96, the following config options need to be set in the about:config page:
Option Value Reason
media.ffmpeg.vaapi.enabled true Required, enables the use of VA-API.
media.rdd-ffmpeg.enabled true Required, default on FF97. Forces ffmpeg usage into the RDD process, rather than the content process.
media.av1.enabled false Optional, disables AV1. If your GPU doesn't support AV1, this will prevent sites using it and falling back to software decoding.
gfx.x11-egl.force-enabled true Required, this driver requires that Firefox use the EGL backend. It may be enabled by default. It is recommended to test it with the MOZ_X11_EGL=1 environment variable before enabling it in the Firefox configuration.
widget.dmabuf.force-enabled true Required on NVIDIA 470 series drivers, not required on 495+. Note that Firefox isn't coded to allow DMA-BUF support without GBM support, so it may not function completely correctly when it's forced on.

In addition the following environment variables need to be set. For permanent configuration /etc/environment may suffice.
Variable Value Reason
MOZ_DISABLE_RDD_SANDBOX 1 Disables the sandbox for the RDD process that the decoder runs in.
EGL_PLATFORM wayland Required on FF98+ when running on Wayland, due to a regression that has been introduced.
LIBVA_DRIVER_NAME nvidia For libva versions prior to 2.15, this forces libva to load the nvidia backend.
__EGL_VENDOR_LIBRARY_FILENAMES /usr/share/glvnd/egl_vendor.d/10_nvidia.json Required for the 470 driver series only. It overrides the list of drivers the glvnd library can use to prevent Firefox from using the MESA driver by mistake.

When libva is used it will log out some information, which can be excessive when Firefox initalises it multiple times per page. This logging can be suppressed by adding the following line to the /etc/libva.conf file:

LIBVA_MESSAGING_LEVEL=1

MPV

Currently this only works with a build of MPV from git master.

There's no real reason to run it with mpv except for testing, as mpv already supports using nvdec directly. The test.sh script will run mpv with the file provided and various environment variables set to use the newly built driver
Direct Backend

The direct backend is a experimental backend that accesses the NVIDIA kernel driver directly, rather than using EGL to share the buffers. This allows us a greater degree of control over buffer allocation and freeing.

The direct backend has been tested on a variety of hardware from the Kepler to Lovelace generations, and seems to be working fine. If you find any compatibility issues, please leave a comment here.

Given this backend accesses the NVIDIA driver directly, via NVIDIA's unstable API, this module is likely to break often with new versions of the kernel driver. If you encounter issues using this backend raise an issue and including logs generated by NVD_LOG=1.

This backend uses headers files from the NVIDIA open-gpu-kernel-modules project. The extract_headers.sh script, along with the headers.in file list which files we need, and will copy them from a checked out version of the NVIDIA project to the nvidia-include directory. This is done to prevent everyone needing to checkout that project.

确认是否硬解中:

打开nvidia-settings程序

By selecting the relevant GPU on the left of the nvidia-settings window, it will show Video Engine Utilization on the right. While playing a video this value should be 大于0%

运行nvidia-smi

Running nvidia-smi while decoding a video should show a Firefox process with C in the Type column. In addition nvidia-smi pmon will show the usage of the decode engine per-process, and nvidia-smi dmon will show the usage per-GPU.
上次由 flwwater 在 2024-01-14 8:22,总共编辑 12 次。
个人收藏的数百个精美动态壁纸:
https://url17.ctfile.com/d/15983117-593 ... 768?p=6220
(访问密码:6220


个人收藏的经典国语音乐和纯音乐(钢琴,笛子,二胡等):
https://url17.ctfile.com/d/15983117-446 ... 33e?p=6220
(访问密码:6220



如果访问密码不对,可试试这个密码 566816
头像
成功者
帖子: 666
注册时间: 2008-09-20 16:37

Re: nvidia-vaapi-driver 0.0.7 for ubuntu 22.04 下载

#2

帖子 成功者 » 2022-11-15 15:59

进来学习一下。
头像
flwwater
帖子: 762
注册时间: 2010-10-31 9:15
系统: kubuntu 24.04

Re: nvidia-vaapi-driver 0.0.9 for ubuntu 22.04 下载 [更新于2023-03-15]

#3

帖子 flwwater » 2023-03-15 20:23

啦啦啦,已更新
个人收藏的数百个精美动态壁纸:
https://url17.ctfile.com/d/15983117-593 ... 768?p=6220
(访问密码:6220


个人收藏的经典国语音乐和纯音乐(钢琴,笛子,二胡等):
https://url17.ctfile.com/d/15983117-446 ... 33e?p=6220
(访问密码:6220



如果访问密码不对,可试试这个密码 566816
回复