How to use custom plugin?

I can use gst-launch-1.0 with kvssink (Amazon Kinesis Video) plugin to stream video to Amazon cloud. However, I can’t figure out how to add it to the DeepStream pipeline? I see from the dev guide you can modify gst-dsexample to write custom plugin? Do I have to copy kvssink source code to gst-dsexample to make it work? What is the right approach?

Could you check the section 2.15 to see if there is any help
https://docs.nvidia.com/metropolis/deepstream/4.0/DeepStream_Plugin_Manual.pdf#page=64&zoom=100,0,784

I’m not sure if the message broker is the right approach though.

I’m following the guide for implementing a custom plugin: https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/index.html#page/DeepStream_Development_Guide%2Fdeepstream_custom_plugin.html

I already have the kvssink plugin working properly with gst-launch-1.0.
gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1’ ! nvv4l2h264enc ! h264parse ! kvssink …

I added “DS_NEW_BUFAPI and set its value to 1” per instruction and recompiled. Here’s the sink pad:

SINK template: ‘video_%u’
Availability: On request
Capabilities:
video/x-h264
stream-format: avc
alignment: au
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-h265
alignment: au
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]

But when I add it to the config file, it is not working.
[kvssink]
enable=1
stream-name=“xxx”
access-key=“xxx”
secret-key=“xxx”
aws-region=“xxx”
storage-size=128
streaming-type=0
framerate=30

What am I missing here?

The sink group has type 1-5. It seems like I need a type 6 for custom sink.

Yes, you are right. You can modify deepstream-app sources to add a new type of sink. If you follow how types 1-5 are added you can add type 6 similarly.

Hi Ben.ying,

I am new to the Deepstream SDK. I want to integrate https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp to Deepstream-app. I don’t know how to approach? Please help me how to integrate it?