Encode RGB24 video stream to H265 with tegra multimediaAPI

I have a jestion NX with me. and i’m trying to encode live RGB24 stream to H265 then send with RTP.
it seems that the tegra-multimedia-api can support format ‘YUV422M’ only? could someone help to tell how to proceed, thanks .
//////
[ERROR] (NvVideoEncoder.cpp:105) Only V4L2_PIX_FMT_YUV420M is supported
Could not set output plane format