Why must I use scale_vaapi with kmsgrab, but hwupload with x11grab when using vaapi with ffmpeg?
0
votes
0
answers
14
views
I am wondering why, when using vaapi with ffmpeg, if I use x11grab I must use
-vf format=nv12,hwupload
but with kmsgrab I must use -vf scale_vaapi=format=nv12
instead.
In particular I want to know 2 things.
- Why is it this way?
- Is there any way to use normal filters (like eq=brightness=50
or zscale
) with vaapi when using kmsgrab?
Because the dilemma that's causing me to ask these questions is that I need to do some color corrections and filters seem like the best way to do that, but I'm unable to use filters when I'm using kmsgrab
because scale_vaapi
breaks other filters, and I even tried using some obscure filters like procamp_vaapi
which shuold allow me to do the same things as eq
, but I couldn't get it to work.
my kmsgrab command:
ffmpeg -y -device /dev/dri/card1 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=format=nv12' -c:v h264_vaapi -qp 24 output.mkv
Asked by Cestarian
(2438 rep)
Aug 4, 2025, 11:45 AM