elFarto / nvidia-vaapi-driver

A VA-API implemention using NVIDIA's NVDEC
Other
1.18k stars 53 forks source link

The problem with hevc decoding in chromium #313

Closed OverDDose closed 1 month ago

OverDDose commented 1 month ago

In chrome, when decoding h265 video in 1920x1080 resolution, there is a problem with colors, however, when reducing the resolution to 1280x720, everything returns to normal. Video logs: 1920x1080_logs.txt 1280x720_logs.txt

Screenshots: 1920x1080 1920x1080_bad_colors 1280x720 1280x720_ok

Thorium browser v124 was used, with flags --use-gl=angle --use-angle=vulkan --enable-features=VaapiVideoEncoder,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround

GPU: NVIDIA RTX 3060 DRIVER: 535 metapackage OS: ubuntu 24.04 nvidia-vaapi-driver version: 0.0.12

vainfo output:

libva info: VA-API version 1.20.0 libva error: vaGetDriverNames() failed with unknown libva error libva info: User environment variable requested driver 'nvidia' libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so libva info: Found init function vaDriverInit_1_0 30643.583530543 [116996-116996] ../src/vabackend.c:2188 vaDriverInit_1_0 Initialising NVIDIA VA-API Driver: 10 30643.583539552 [116996-116996] ../src/vabackend.c:2197 vaDriverInit_1_0 Now have 0 (0 max) instances 30643.583546187 [116996-116996] ../src/vabackend.c:2223 vaDriverInit_1_0 Selecting Direct backend 30643.591880160 [116996-116996] ../src/direct/direct-export-buf.c: 68 direct_initExporter Searching for GPU: 0 0 128 30643.591916617 [116996-116996] ../src/direct/direct-export-buf.c: 90 direct_initExporter Found NVIDIA GPU 0 at /dev/dri/renderD128 30643.591924230 [116996-116996] ../src/direct/nv-driver.c: 267 init_nvdriver Initing nvdriver... 30643.591966344 [116996-116996] ../src/direct/nv-driver.c: 285 init_nvdriver NVIDIA kernel driver version: 535.183.01, major version: 535, minor version: 183 30643.591972979 [116996-116996] ../src/direct/nv-driver.c: 292 init_nvdriver Got dev info: 1000 1 2 6 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.20 (libva 2.12.0) vainfo: Driver version: VA-API NVDEC driver [direct backend] vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileH264Main : VAEntrypointVLD VAProfileH264High : VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileHEVCMain : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointVLD VAProfileAV1Profile0 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain12 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD VAProfileHEVCMain444 : VAEntrypointVLD VAProfileHEVCMain444_10 : VAEntrypointVLD VAProfileHEVCMain444_12 : VAEntrypointVLD

insilications commented 1 month ago

Similar problem here, with a GTX 3070. When trying to play a 1920x1080 h264 high video, I get the same green tinted artifacts. When switching to 1280x720 h264 main for the same file, it plays perfectly.

OverDDose commented 1 month ago

UPD: the problem was noticed when playing videos with a resolution other than 1280x720 (for example, 1920x1080, 640x360, etc.)

ManuLinares commented 1 month ago

Chrome is currently unsupported, and will not function.

https://github.com/elFarto/nvidia-vaapi-driver?tab=readme-ov-file#chrome

OverDDose commented 1 month ago

Chrome is currently unsupported, and will not function.

https://github.com/elFarto/nvidia-vaapi-driver?tab=readme-ov-file#chrome

Yes, I read this, but everything started up and even worked on chromium. The only problem is the glitch on most resolutions. Suddenly, there is a possibility that someone in firefox has a similar problem. Plus, there is already an open issue with work on chrome: Chrome Support

ManuLinares commented 1 month ago

I recommend posting on that open issue as it fits perfectly with your problem. Also close this one, my reasoning being that duplicate issues makes it harder for anyone to help/contribute a patch or a fix.

Better to have Chrome support issues all in one place.