How to encode a image from the deepstream plugin "nvdsosd" as jpeg

I want to encode a image as jpeg and send it to the network, there is any sample or Doc about it? The image is from the deepstream plugin “nvdsosd”.

We do not provide HW jpeg encoder plugin with deepstream. So you may use gstreamer software jpeg encoder plugin to encoding the jpeg images. There are lots of 3rd party jpeg encoder plugins in gstreamer.

Thank you for you replay.