Please provide complete information as applicable to your setup.
• Hardware Platform Jetson
• DeepStream Version 6.1
• JetPack Version 5.0.2
• Issue Type questions
We are trying to use the nvdewarper plugin to dewarp 360° camera input and use it downstream in an opencv pipeline using appsink. Unfortunately the nvdewarper plugin uses “surfaces” and “batches” to encode the dewarped image. We need help on how to “remove” any attached Deepstream MetaData of the Buffer and return a clean GST Buffer object containing only the image (with no batch or surface metadata). config_dewarper.txt contains a single surface definition.
To replicate:
gst-launch-1.0 uridecodebin uri="rtspurlhere" ! nvvideoconvert ! nvdewarper config-file=config_dewarper.txt ! nvvideoconvert ! video/x-raw,format=RGBA ! videoconvert ! video/x-raw,format=BGR ! fakesink
Returns the following error (repeated for each frame, spamming):
nvbufsurface: NvBufSurfaceCopy: batch size doesn’t match
Dot Graph output looks good though:
------------------------------------------------------------------------------------------
The issue is not the OpenCV / appsink setup. The following pipeline without dewarping works well and can be read perfectly fine by OpenCV VideoReader:
gst-launch-1.0 uridecodebin uri="rtspurlhere" ! nvvideoconvert ! video/x-raw,format=RGBA ! videoconvert ! video/x-raw,format=BGR ! appsink
It also is not a problem of nvdewarper, because we can see the correctly dewarped video via:
gst-launch-1.0 uridecodebin uri="rtspurlhere" ! nvvideoconvert ! nvdewarper config-file=config_dewarper.txt ! nvvideoconvert ! autovideosink
We also tried the following pipeline to no success:
gst-launch-1.0 uridecodebin uri="rtspurlhere" ! nvvideoconvert ! nvdewarper config-file=config_dewarper.txt ! m.sink_0 nvstreammux name=m width=1000 height=1000 batch-size=1 num-surfaces-per-frame= 1 ! nvmultistreamtiler height=1000 width=1000 ! nvvideoconvert ! video/x-raw,format=RGBA ! videoconvert ! video/x-raw,format=BGR ! appsink
This pipeline interestingly fails:
gst-launch-1.0 uridecodebin uri="rtspurlhere" ! nvvideoconvert ! nvdewarper config-file=config_dewarper.txt ! nvvideoconvert ! nvegltransform ! nveglglessink
with: “ERROR: Batch size not 1”
Any pointers and help greatly appreciated. We can provide additional debug logs and dot graph output if necessary.
Basically we need:
DewarpedRGBASurface (1x) + NvDewarperSurfaceMeta ----> XXXX ------> video/x-raw,format=BGR