encode YUV raw video data based on libx264 / libx265 / libvpx