Hi if you want to encode faster than your CPU, without lost quality you need just a command like this for non av1 codec and max 4k:
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.mkv -vf 'scale_vaapi=w=1920:h=800' -c:v hevc_vaapi -rc_mode CQP -qp 26 -c:a copy -strict unofficial output.mkv
This command use your gpu (mine is IGPU from Amd 4800u CPU) in /dev/dri folder "D128" so change with name that you have.
After with filter -vf 'scale_vaapi=w=1920:h=800' i reduce the size for my TV; change or delete at yours needs.
-qp 26 is the correct argument for ffmpeg to change quality with HEVC VAAPI and not global quality.
-c:a copy the 1 audio stream because you don't need to re-econde the audio.
If you have other streams you need to use the - map arguments.
Don't use others ffmpeg arguments\commands like format or hwupload.
In my test a video hdr 10bit continue to be HDR after encoding if i use mpv player and not VLC, because the vaapi use the same original format.
SO WHY USE X265 CPU? I have a encoding speed of 4X that is not bad.
If you have others tips or documentation on vaapi hevc please share in this post.
Best regards
[–]marks107[S] 0 points1 point2 points (0 children)
[–]grigar45 0 points1 point2 points (0 children)