ffmpeg: add optional x265 support

Closes: #28489