ffmpeg: add optional x265 support

Closes: #28489
ffmpeg: add upstream patch for x265 api incompability
ffmpeg: update 2.2.1 bottle.