What is the best way to quickly draw information on the original frame and encode it as JPG?

Hi,
An existing solution is to encode into h264/h265 stream and send out through RTSP. You may try default config file in

/opt/nvidia/deepstream/deepstream-5.1/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt

And set to type=4 in sink group:
DeepStream Reference Application - deepstream-app — DeepStream 6.1.1 Release documentation

For achieving 30fps, we would suggest use this existing implementation. If low frame rate is good in your usecase, you may try to customize create_udpsink_bin() to run like:

... ! nvdsosd ! nvvideoconvert ! video/x-raw,format=I420 ! jpegenc ! rtpjpegpay ! udpsink