USB camera lagging issues with custon pipeline on IMX8M Quad

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB camera lagging issues with custon pipeline on IMX8M Quad

651 Views
rthomas
Contributor III

Hello, I am trying to make an pipeline for a USB 3.0 camera in a Qt application that I made for the IMX8M Quad processor. The application uses OpenCV and Gstreamer. I am also using the imx-image-full image from the Zeus branch. My current pipeline is:

 

pipeline = ("v4l2src device=/dev/video2 ! videoconvert ! videoscale ! "
                        "video/x-raw, width=2592,height=600,format=BGR, framerate=30/1 ! videoscale ! appsink");

 

This will work but it causes a lot of lagging of the video stream, which then concludes with the application missing the capture of some of the frames. I need to constantly process each frame because eventually one frame is going to get displayed as all black pixels and if the program is skipping frames due to the lag, then it will not work properly because the specified frame will get skipped in computation.

Using a pipeline with a tee:

 

v4l2src device=/dev/video2 ! tee name=tp ! queue ! video/x-raw, width=2592, height=600 ! appsink tp. ! queue ! glimagesink

 

Will create a live view of the camera outside of the application with absolutely 0 lag, with no frames being skipped. But like I said it is outside of the viewer and not in the GUI slot for the camera feed.

 

I am wondering if anyone would be able to supply with a pipeline they thing would be able to support a videostream with 0 lag and gets put inside the GUI, while using opencv and gstreamer.

0 Kudos
1 Reply

640 Views
rthomas
Contributor III

This can be ignored, a solution was found.