Smart Record with USB camera (type=2)

I am using DeepStream 5 with Xavier NX. In the deepstream config file, is there a way to make smart recording work with a USB camera? When I select type=4 (RTSP src) it works fine. I read elsewhere that you have to re-encode the USB source, but I am not sure how to do that with a deepstream config file.

Can you suggest what should I change in the deepstream config file to make smart record work with USB camera?

Here’s my USB source 0

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP 5=CSI
type=1
camera-v4l2-dev-node=0
smart-record=2
smart-rec-video-cache=30
smart-rec-duration=10
smart-rec-start-time=5
smart-rec-default-duration=10
smart-rec-container=0
smart-rec-interval=10
smart-rec-file-prefix=UCam1_Smart_Record
smart-rec-dir-path=…/recordings

Currently, deepstream-app can only support smart recording with rtsp source, there is no way to enable smart recording with config file.