VDPAU is not VA-API
that's correct
Setting VDPAU_DRIVER means nothing to Firefox because it is not using
VDPAU.
https://fedoraproject.org/wiki/Changes/VA-API_1.0.0#Detailed_Description
https://ffmpeg.org/doxygen/0.8/group__VDPAU__Decoding.html
"libva-vdpau-driver which allows to use the VA-API enabled players with VDPAU
backend (such as NVIDIA binary driver)."
https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability
VDPAU / Linux / NVIDIA -> 'Fully usable'
ffmpeg -hwaccels
...
Hardware acceleration methods:
> vdpau
cuda
vaapi
qsv
drm
opencl
vulkan
find/dl a 'busy' 4K+ h264 vid
e.g. @
https://jell.yfish.us/media/jellyfish-250-mbps-4k-uhd-h264.mkv
T="jellyfish-250-mbps-4k-uhd-h264.mkv"
F="jellyfish-250-mbps-4k-uhd-h264.mp4"
ffmpeg -i ${T} -codec copy ${F}
ls -al ${F} ${T}
-rw-r--r-- 1 test test 896M Dec 21 2016 jellyfish-250-mbps-4k-uhd-h264.mkv
-rw-r--r-- 1 test test 896M Nov 17 14:37 jellyfish-250-mbps-4k-uhd-h264.mp4
exec un-accel'd FFmpeg decoder
rm -f test.ts && ffmpeg -i ${F} test.ts
sar 1 100
Linux 5.14.17-301.fc35.x86_64 (test.loc) 11/17/2021 _x86_64_ (16 CPU)
02:23:27 PM CPU %user %nice %system %iowait %steal %idle
02:23:28 PM all 0.38 0.00 0.50 1.95 0.00 97.17
02:23:29 PM all 19.29 0.00 1.44 0.00 0.00 79.27
02:23:30 PM all 88.85 0.13 2.01 0.00 0.00 9.02
02:23:31 PM all 88.08 0.00 1.63 0.00 0.00 10.29
02:23:32 PM all 87.38 0.00 1.87 0.00 0.00 10.74
02:23:33 PM all 89.01 0.00 1.76 0.06 0.00 9.17
02:23:34 PM all 87.81 0.06 1.95 0.00 0.00 10.18
02:23:35 PM all 87.95 0.06 1.62 0.00 0.00 10.37
02:23:36 PM all 89.77 0.00 1.95 0.00 0.00 8.29
02:23:37 PM all 89.36 0.00 2.00 0.00 0.00 8.64
02:23:38 PM all 55.63 0.13 1.32 0.19 0.00 42.74
02:23:39 PM all 0.44 0.00 0.56 0.00 0.00 99.00
02:23:40 PM all 0.62 0.00 0.56 0.06 0.00 98.75
...
exec vaapi<-vdpau accel'd VA-API FFmpeg decoder
rm -f test.ts && ffmpeg -hwaccel vdpau -i ${F} test.ts
sar 1 100
Linux 5.14.17-301.fc35.x86_64 (test.loc) 11/17/2021 _x86_64_ (16 CPU)
02:29:09 PM CPU %user %nice %system %iowait %steal %idle
02:29:10 PM all 0.63 0.06 0.31 0.00 0.00 99.00
02:29:11 PM all 0.50 0.00 0.69 0.25 0.00 98.56
02:29:12 PM all 8.48 0.13 2.07 0.31 0.00 89.01
02:29:13 PM all 31.32 0.00 2.76 0.00 0.00 65.91
02:29:14 PM all 31.47 0.00 2.01 0.00 0.00 66.52
02:29:15 PM all 33.98 0.00 2.81 0.00 0.00 63.21
02:29:16 PM all 34.43 0.12 2.79 0.12 0.00 62.54
02:29:17 PM all 32.87 0.13 2.38 0.44 0.00 64.18
02:29:18 PM all 30.01 0.00 2.62 0.19 0.00 67.19
02:29:19 PM all 27.51 0.06 2.62 0.00 0.00 69.81
02:29:20 PM all 29.92 0.06 2.61 0.00 0.00 67.41
02:29:21 PM all 28.58 0.00 2.59 0.06 0.00 68.77
02:29:22 PM all 28.25 0.00 2.46 0.13 0.00 69.17
02:29:23 PM all 5.11 0.06 1.62 0.00 0.00 93.20
02:29:24 PM all 0.31 0.00 0.31 0.00 0.00 99.37
02:29:25 PM all 0.87 0.12 0.81 0.06 0.00 98.13
no vaapi without vdpau translation
rm -f test.ts && ffmpeg -hwaccel vaapi -i ${F} test.ts
[AVHWDeviceContext @ 0x557bc805f840] libva: vaGetDriverNameByIndex() failed with unknown
libva error, driver_name = (null)
[AVHWDeviceContext @ 0x557bc805f840] Failed to initialise VAAPI connection: -1 (unknown
libva error).
Device creation failed: -5.
[h264 @ 0x557bc78e4a00] No device available for decoder: device type vaapi needed for
codec h264.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native))
Device setup failed for decoder on input stream #0:0 : Input/output error
firefox exec, hw accel disabled
VDPAU_DRIVER=nvidia MOZ_LOG="PlatformDecoderModule:5" firefox ${F} -p no_accel
...
[Parent 6034: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by
platform
[Parent 6034: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by
platform
[Child 6177: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by
platform
[Child 6177: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by
platform
[RDD 6236: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform
> [Child 6177: MediaSupervisor #1]: D/PlatformDecoderModule
Hardware WebRender is off, disabled DMABuf & VAAPI.
[Child 6177: MediaPDecoder
#1]: D/PlatformDecoderModule Initialising FFmpeg decoder.
[Child 6177: MediaPDecoder #1]: D/PlatformDecoderModule FFmpeg init successful.
[Child 6177: MediaPDecoder #1]: D/PlatformDecoderModule Choosing FFmpeg pixel format for
video decoding.
...
firefox exec, hw accel default enabled
VDPAU_DRIVER=nvidia MOZ_LOG="PlatformDecoderModule:5" firefox ${F} -p default
...
[RDD 5789: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform
> [Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule
Initialising VA-API FFmpeg decoder
libva info: VA-API version 1.13.0
[Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule Initialising FFmpeg decoder.
[Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule FFmpeg init successful.
[Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule Choosing FFmpeg pixel format for
video decoding.
> [Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule DMABuf
Got one frame output with pts=0dts=33375 duration=33000 opaque=-9223372036854775808
...
Take a closer look at all of those links you threw at me. :)
...