When nvenc use flag is enabled ffmpeg-6.1.1-r5 drags nvenc but with broad assumption : nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) But if some later versions of nv-codec header are available (via overlays ) those are not compatible any more due to removal of deprecated functions that have been removed from later nv-codec headers but still used by ffmpeg-6.1.1-r5 : The support for buffer formats listed below is deprecated. NV_ENC_BUFFER_FORMAT_NV12_PL NV_ENC_BUFFER_FORMAT_YV12_PL NV_ENC_BUFFER_FORMAT_IYUV_PL NV_ENC_BUFFER_FORMAT_YUV444_PL Users are therefore recommended to use NV_ENC_BUFFER_FORMAT_NV12, NV_ENC_BUFFER_FORMAT_YV12, NV_ENC_BUFFER_FORMAT_IYUV and NV_ENC_BUFFER_FORMAT_YUV444 instead of above listed buffer formats. ref : https://docs.nvidia.com/video-technologies/video-codec-sdk/12.1/deprecation-notices/index.html#deprecation-notices__ol_hgy_dz2_nlb Leading to compilation errors like : src/libavcodec/nvenc.c:1700:16: error: ‘NV_ENC_BUFFER_FORMAT_YUV444_PL’ undeclared (first use in this function); did you mean ‘NV_ENC_BUFFER_FORMAT_YUV444’? Should ffmpeg ebuild enforce a specific version of nv-codec-headers instead of a >= ?