Problems with putting video stream in Qt QML using deepstream pipeline

Hi everyone
i have used the following pipeline in MediaPlayer object of QML. it works fine and it puts the video ouput in newly created window.

    		id: cameraVideo
    		autoPlay: true
    		source: "gst-pipeline: uridecodebin3 
			uri=\"rtspt://\" ! queue ! 
    		nvstreammux0.sink_0 nvstreammux	
			name=nvstreammux0 batch-size=1 batched-push-timeout=40000 
			width=800 height=600 live-source=TRUE 
    		! queue ! nvvideoconvert ! queue ! 
			nvinfer config-file-path=\"/opt/nvidia/deepstream/deepstream/
    		config_infer_primary_nano.txt\" ! queue ! nvmultistreamtiler ! queue ! 
			nvtracker tracker-width=240 tracker-height=200 
			/configs/deepstream-app/iou_config.txt ! queue ! 
			nvdsosd process-mode=HW_MODE ! queue 
			! nvegltransform ! nveglglessink"
    		anchors.fill: parent
    		source: cameraVideo

but i want to put video output in specified QML Rectangle which is parent of MediaPlayer object. it seems that i must use qtvideosink instead of nveglglessink. but which plugins should i use to transform the video stream for qtvideosink.
by the way the app is running on NVidia Jetson Nano.

Please replace

... ! nvegltransform ! nveglglessink


... ! nvvideoconvert ! video/x-raw ! videoconvert ! qtvideosink

It requires buffer copy and may have worse performance.

1 Like

thank you very much. it works OK. but there are other issues which should be handled:
1- the red bounding box always exists even if no objects are detected. how can i removed it in case of no object detection.
2- i dont need any multiplexer in pipeline. because i have just single source. but it doesnt work if i remove nvstreammux.

Please take a picture of the red bounding box. We have demo code in dsexample to show a dummy red rectangle but the plugin is not used in your pipeline. Not sure why you see it.

For single source you still need nvstreammux plugin but nvmultistreamtiler is not required. May refer to this pipeline:
Adding a ghost pad after splitting a pipeline using Tee? - #11 by DaneLLL

1 Like

the object detection works fine in above picture.

the red bounding box remains even if there is no object in picture

It seems like probably nvtracker triggers the issue. You may remove it from pipeline for a try.