How to save full frame from usrMetaData?

When I use nvds_obj_enc_process() to save images, I encounter frame rate drops, as I mentioned in another post about Frame rate drops when saving jpg files in Deepstream 6.2 SDK - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums