Smart record using encoded output with bounding boxes

Any examples on how to do this?

No such sample codes currently. But we have detailed smart recording interfaces document, you may try to add smart recording bin after encoder and use NvDsSRStart() and NvDsSRStop() to control the recording. The deepstream-app source codes are also good reference for smart recording interfaces.