Trying to configure hevc_vaapi

@megavolt wondering if you could help me with another problem, i’ve been trying to configure hevc_vaapi to see where it leads, but I can’t seem to set an rc mode properly, when I run this command:

ffmpeg -threads 8 -movflags +faststart -vaapi_device /dev/dri/by-path/pci-0000:06:00.0-render -vf format=nv12,
hwupload -pix_fmt vaapi -c:a copy -c:v hevc_vaapi -rc:v qvbr -tier high -level 1 -global_quality 10 "Test2_vaa
pi.mp4" -i "Test2.mp4"

I get this error:

Codec AVOption rc (Rate Control Method) specified for output file #0 (Test2_vaapi.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

This issue carries across to a lot of options… If I run a little more complex command:

ffmpeg -threads 8 -movflags +faststart -vaapi_device /dev/dri/by-path/pci-0000:06:00.0-render -vf format=nv12,hwupload -pix_fmt vaapi -c:a copy -c:v hevc_vaapi -rc:v qvbr -tier high -level 1 -spatial-aq 1 -multipass fullres -tune:v hq -map 0:v -global_quality 10 "Test2_vaapi.mp4" -i "Test2.mp4"
Codec AVOption spatial-aq (set to 1 to enable Spatial AQ) specified for output file #0 (Test2_vaapi.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption rc (Rate Control Method) specified for output file #0 (Test2_vaapi.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption tune (The metric that the encoder tunes for. Automatically chosen by the encoder by default) specified for output file #0 (Test2_vaapi.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption multipass (Set the multipass encoding) specified for output file #0 (Test2_vaapi.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

I’'ve spent a good hour looking for examples online and it seems like examples for ffmpeg encoding with vaapi is extremely scarce. Granted I’m not sure if some of these options are even supposed to work with vaapi (that would have come later I guess), but I do know that the rc mode option should work, and that the rc mode I’m trying to use is supported.

But I don’t know why it isn’t working.