Opencv Mat as source to DeepStream

How to give opencv matrix as a source to deepstream instead of RTSP or file?

Hi,
Possible solution is to hook OpenCV with asppsrc. You may look at the sample:

/opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-appsrc-test

It supports I420, NV12, RGBA by default and runs like:

appsrc ! video/x-raw,format=I420(or NV12, RGBA) ! nvvideoconvert ! ...

For OpenCV, it should be customized into

appsrc ! video/x-raw,format=BGR ! videoconvert ! video/x-raw,format=RGBA ! nvvideoconvert ! ...