I\'ve seen various examples of using libavcodec with vaapi to accelerated decoding, but how do you use it to accelerate encoding?
Update 2020: FFMPEG now fully supports VAAPI encode + decode
you can encode with something like:
ffmpeg -y -vaapi_device /dev/dri/renderD128 -i file_in.avi -vf 'format=nv12,hwupload' -c:v h264_vaapi file_out.mp4