Change videorate error

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson nano)
• DeepStream Version 5.0
• JetPack Version (4.3)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( nvstreammux)

My gst-command is like this:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 bufapi-version=1 ! “video/x-raw(memory:NVMM), width=3264, height=2464, format=NV12, framerate=21/1” ! videorate ! “video/x-raw(memory:NVMM), framerate=(fraction)18/1” ! m.sink_0 nvstreammux name=m live-source=1 width=640 height=360 batch-size=1 batched-push-timeout=40000 ! videorate max-rate=1 drop-only=1 ! ‘video/x-raw(memory:NVMM), framerate=1/1’ ! nvmultistreamtiler rows=1 columns=1 width=640 height=360 ! nvvideoconvert ! nvdsosd display-clock=1 x-clock-offset=10 y-clock-offset=10 clock-font-size=20 ! tee ! queue ! nvegltransform ! nveglglessink sync=0 qos=0

and I use python-deepstream to build this pipeline(
pipetest.py (6.8 KB)
).
Pipeline can run, and I want to change videorate 18 to 5 after pipeline play.
In my sample code, I try to change “videorate” in another thread.

Strange thing is, I can change first videorate element property(before nvstreammux element) and no error. But I got “segmentation fault” error when I changed second videorate element property(after nvstreammux element).

My question is: How to change videorate after nvstreammux element in realtime?

nvstreammux’s function is to make batched frames for inferencing. The GstBuffer after nvstreammux is batched frames but not frame. Why do you want to change the “framerate” for batched frames?

Thank you for your comment.
Actually, I tried it but I don’t know how to extract frame from videorate-src-probe. Obviously, I can’t use the following code to extract frames. Because I don’t have “batch_meta.frame_meta_list”

        batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
        l_frame = batch_meta.frame_meta_list
        frame_meta = pyds.NvDsFrameMeta.cast( l_frame.data)
        n_frame=pyds.get_nvds_buf_surface(hash(gst_buffer),frame_meta.batch_id)
        fram=np.array(n_frame,copy=True,order='C')
         cur_fram=cv2.cvtColor(fram,cv2.COLOR_RGBA2GRAY)

Could you give a sample code to extract frames from videorate-src-probe? or any suggestion?

Or how to extract frames in “nvvideoconvert” source probe?

You’ve already found the sample with your Change videorate error - #4 by wendy216. The only thing you need to do is to add your probe in correct place. The batch meta is only available after nvstreammux.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.