I have the following simple code:
.
.
.
sources = [ "file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4",
"file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4",
"rtsp://127.0.0.1:8191/test"]
number_sources = len(sources)
is_live=False
for i, uri_name in enumerate(sources):
logging.info("Creating source_bin {}".format(i))
if uri_name.find("rtsp://") == 0 :
is_live = True
source_bin=DS_UTILS.create_source_bin(i, uri_name)
if not source_bin:
logging.error("Unable to create source bin")
sys.exit(1)
pipeline.add(source_bin)
padname="sink_%u" %i
sinkpad= streammux.get_request_pad(padname)
if not sinkpad:
logging.error("Unable to create sink pad bin")
sys.exit(1)
srcpad=source_bin.get_static_pad("src")
if not srcpad:
logging.error("Unable to create src pad bin")
sys.exit(1)
convA = DS_UTILS.create_gst_element("nvvideoconvert", "convA_{}".format(i)); pipeline.add(convA)
x0,y0,w,h = 400, 180, 72, 360
convA.set_property('src-crop',"{}:{}:{}:{}".format(x0,y0,w,h))
padI = convA.get_static_pad("sink")
padO = convA.get_static_pad("src")
srcpad.link(padI)
padO.link(sinkpad)
.
.
.
The idea is crop certain area inside video and work only over this area.
The problem is I am getting the following error:
Error: gst-stream-error-quark: memory type configured and i/p buffer mismatch ip_surf 0 muxer 3 (1): gstnvstreammux.c(616): gst_nvstreammux_chain (): /GstPipeline:pipeline0/GstNvStreamMux:StreamMuxer
However if I comment out the lines,
#x0,y0,w,h = 400, 180, 72, 360
#convA.set_property('src-crop',"{}:{}:{}:{}".format(x0,y0,w,h))
then the code works although obviously I don’t do any cropping!!!.
Also, If I remove the RTSP source, then the code works fine and also perfom the cropping
Any help with that? I need to do a crop and optionally a DEWART transformation, but now I’m stuck on the crop part because of that issue.