i modified deepstream-test1 sample code want to achieve two h264 format videos send to nvstreammux without nvstreamdemux
, because when i use nvstreamdemux i have to create 2 pipeline after nvstreammux , which is not reasonable .
can you give me some advice please? and how to distinguish videos in osd_sink_pad(nvosd).
here are original way
gst_element_link_many (source1, h264parser, decoder,NULL);
gst_element_link_many (source2, h264parser2, decoder2, NULL);
gst_element_link_many (nvstreammux, nvstreamdemux, NULL);
gst_element_link_many ( pgie, filter1, nvvidconv, filter2, nvosd, sink, NULL);
gst_element_link_many ( pgie2, filter3, nvvidconv2, filter4, nvosd2, sink2, NULL);
Why we have nvstreamMux? -> Support batch.
“nvinfer (detection, classification)” “nvtracker” all support batch handling.But nvosd not.
streamMux collects all channel decoded data(NV12) to its contiguous buffer and unified to be the same resolution. (These buffers are allocated in the beginning, it is reused when the pipeline is running, it is freed when the pipeline is being destroyed.) The following elements like nvinfer, nvtracker, … all get buffers from streammux as input and update metadata which is attached to the buffer.
nvosd, encoder, … do not support batch handling. So it needs streamDemux (or streamTiler) to split the different channel buffers.
So for your pipeline, you just need one nvinfer , one nvosd. One nvosd instance can handle multiple channels. And there should be have streamDemux or streamTiler before nvosd.
Hi, I need to get image buffer and inferring result from the stream with nvstreammux, how can I apply that? Adding probe in nvosd pad, and mapping from gstbuffer, mapinfo->data I get only contains 8 bytes data.
Is appsink worked? I haven’t tried that.
I’ve tried that, but surface is wrong. Accessing [surface->size,width,height] causes an segmentation fault(core dumped). I print address as following:
In pipeline I add video-converter before appsink for file-save using. Is it the vidconv causing this error?
In addition, the html documentation about surface has a mistake in example:
nvbuf = ((NvBufSurface)info.data)