I made a H.265 encoding board, HDMI input and RTSP output

I made a H.265 encoding board, HDMI input and RTSP output. The current latency is about 80ms(including HDMI input, H265 encoding time ,RTSP packaging time, 1000M ethernet transmission time, decoding time and display). I need it to below 40ms, I think I should try to optimize the RTSP packaging time, now I am using LIV555 , could anyone suggest a solution for me?

marcoliu@vo2.com.cn