RTSP conection and recording python

I want to connect RTSP camera and record video
I use https://github.com/dusty-nv/jetson-inference
but when I try to connect it with OpenCV it is not compatible
do you have an example code of RTSP connection and video recording?
Thank you for the help

The link you mentioned is not related to opencv, AFAIK.
[Well, you’ve edited link in the meantime, so it gets less clear!]

For using a rtsp source on Jetson to opencv, you may find many posts in this forum.

Thank you for your note
I fix the link that I use Nvidia inference for object detection
but it is not compatible with OpenCV for RTSP connection and recording
I want example of RTSP connection and recording video using this package

Sorry, but someone else would reply to what you want.

You may consider to use DeepStream SDK.

We have existing implementation in deepstream-app. Please check and give it a try.