The NVIDIA Vulkan Video H.264 hardware decoder produces severe visual artifacts when decoding H.264 streams.
The issue is not limited to a single file. It happens with normal H.264 content from YouTube as well as local H.264 files played through mpv.
The problem only affects H.264 decoding through Vulkan Video. H.265 and AV1 Vulkan Video decoding work correctly.
The same H.264 content decodes correctly using CUDA/NVDEC.
Environment
-
GPU: NVIDIA GeForce RTX 5080 Laptop GPU
-
NVIDIA driver: 610.43.03
-
Vulkan: 1.4.357
-
FFmpeg: n8.1.2
-
OS: Linux
Supported Vulkan Video extensions:
-
VK_KHR_video_decode_h264
-
VK_KHR_video_decode_h265
-
VK_KHR_video_decode_av1
Reproduction
Local H.264 file:
mpv --hwdec=vulkan video.mkv
Result:
- Severe visual artifacts.
The same file works correctly with CUDA:
mpv --vo=gpu --gpu-api=vulkan --hwdec=cuda video.mkv
The issue is also reproducible with H.264 videos from YouTube when Firefox/mpv uses Vulkan Video decoding.
Additional observations
-
H.265 Vulkan Video decoding works.
-
AV1 Vulkan Video decoding works.
-
H.264 CUDA/NVDEC decoding works.
-
Re-encoding the stream with NVENC produces a file that works with Vulkan Video decoding.
-
Remuxing the original stream does not fix the issue.
Example:
ffmpeg -i video.mkv -c copy remux.mkv
mpv --hwdec=vulkan remux.mkv
still produces artifacts.
This suggests the problem is related to the NVIDIA Vulkan Video H.264 decoder implementation rather than the container format.
Youtube H264 sample video with artifacts:
Firefox 153 (media.hardware-video-decoding-vulkan.enabled=true)
mpv (–hwdec=vulkan)