Add probe to the sink pad of the tiler element,but batch_id is alway zero

HI,
The pipline is : source_bin ->streammux-> pgie-> nvtracker-> nvvidconv-> tiler-> nvosd-> sink. feeding 8 source inputs. I add probe to the sink pad of the tiler element,but frame_meta->batch_id is always 0.

for (l_frame = batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next){
NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
printf(“batch_id %d \n”, frame_meta->batch_id);

After Using nvvidconv to convert from NV12 to RGBA, I wanna to access every frame of batch using frame_meta->batch_id. the following codes:

NvBufSurface *surface = (NvBufSurface *)in_map_info.data;
NvDsBatchMeta batch_meta = gst_buffer_get_nvds_batch_meta (buf);
l_frame = batch_meta->frame_meta_list;
if (l_frame) {
NvDsFrameMeta frame_meta = (NvDsFrameMeta ) (l_frame->data);
/
Validate user meta /
src_data = (char
) malloc(surface->surfaceList[frame_meta->batch_id].dataSize);
if(src_data == NULL) {
g_print(“Error: failed to malloc src_data \n”);
}
cudaMemcpy((void
)src_data,
(void
)surface->surfaceList[frame_meta->batch_id].dataPtr,
surface->surfaceList[frame_meta->batch_id].dataSize,
cudaMemcpyDeviceToHost);

when debugging, frame_meta->batch_id is always 0 , I failed to save frame of batch. So can you help me out? Thanks alot!

Please try with the latest DeepStream SDK 5.0.

https://forums.developer.nvidia.com/t/announcing-developer-preview-for-deepstream-5-0/121619

Hi,

Could you share your pipeline configure file with us?
Did you also set the batch-size in streammux and primary-gie into 8?

Thanks.

Hi,

Here is the configure file:
[tiled-display]
enable=1
rows=4
columns=4
width=1280
height=720
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/1D3CC518_1480912023_1.mp4
num-sources=1
#drop-frame-interval=2
gpu-id=0
cudadec-memtype=0

[source1]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/2D82F228_1480659037_1.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[source2]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/19743210_1480904986_1.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[source3]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/215366E0_1480666393_1.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[source4]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/14C29910_1480655779_1.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[source5]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/2152A9F8_1480908293_1.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[source6]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/19743210_1480904986_1.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[source7]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://…/…/streams/14C29F18_1480655864_1.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=1
source-id=0
gpu-id=0
nvbuf-memory-type=0

[sink1]
enable=0
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265
codec=1
sync=0
#iframeinterval=10
bitrate=2000000
output-file=out.mp4
source-id=0

[sink2]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000

set below properties in case of RTSPStreaming

rtsp-port=8554
udp-port=5400

[osd]
enable=1
gpu-id=0
border-width=1
text-size=8
text-color=1;1;1;1;
text-bg-color=0.5;0.0;0.8;0.5
font=Arial
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0
process-mode=1

[streammux]
gpu-id=0
##Boolean property to inform muxer that sources are live
live-source=0
batch-size=8
batched-push-timeout=40000

Set muxer output width and height

width=1920
height=1080
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0

config-file property is mandatory for any gie section.

[primary-gie]
enable=1
gpu-id=0
#model-engine-file=…/…/models/Primary_Detector/resnet10.caffemodel_b30_int8.engine
batch-size=8
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
interval=2
#Required by the app for SGIE, when used along with config-file property
gie-unique-id=1
nvbuf-memory-type=0
#config-file=config_infer_primary.txt
config-file=config_infer_primary_yoloV3.txt

[tracker]
enable=1
tracker-width=640
tracker-height=368
#ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_iou.so
ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_klt.so
#ll-config-file required for DCF/IOU only
ll-config-file=tracker_config.yml
#ll-config-file=iou_config.txt
gpu-id=0
#enable-batch-process applicable to DCF only
enable-batch-process=1

[tests]
file-loop=0
By the way, when I add the probe to the sink pad of the nvvidconv element, frame_meta->batch_id varied from o-7. it’s ok.

Thanks!

Hi,

Sorry that we are still checking this issue.
Will update more information later.

Here is a multi-source sample for your reference also:

apps/sample_apps/deepstream-test3

Thanks.

Hi,

Sorry for the late information.

We discuss this issue internally and this is a fix in our latest DeepstreamSDK 5.0.
Could you update your software to JetPack4.4 with DeepstreamSDK 5.0 and give it a try?

Thanks.

Hi,

I have updated to DeepstreamSDK5.0, it has been fixed.Thanks!

Good to know this!