Qtmultimedia USB Camera Video Lagging

I’m trying to run Camera Example of Qt6 in Apalis iMX8QM 4GB WB IT v1.1 B with Ixora V1.1A Career board. I have Torizoncore running and i got the example cross compiled and running with docker image. But the video feed of the camera in Qt application is very slow like 1 to 5 frames per second. I checked the camera output with gstreamer with following command and it works fine on same docker image.

gst-launch-1.0 v4l2src device=/dev/video2 ! videoconvert! videoscale ! video/x-raw, framerate=30/1, width=1280, height=960 ! waylandsink sync=false -v

Video playback on Qt application with 1080p sample video also works fine.

Any help really appreciated. Thanks in advance.

Greetings @imeshsps,

Just to summarize your issue:

  • Video feed from camera in Qt6 application is slow
  • Video feed from camera with Gstreamer command is good
  • Video playback using sample video with Qt is good.

If I understood that correctly, it sounds like an issue with the Qt application accessing the camera and playing back the video possibly. That said we’re not much of Qt experts so I’m unsure how much we can assist you with debugging the Qt side of things.

Best Regards,

Hey @jeremias.tx ,
Yeah I think it should be. I was hoping if someone had a similar issue that can help me with this. Should give it a I try with gstreamer-imx ?

Should give it a I try with gstreamer-imx ?

Not sure if I understand your question here. If you’re using gstreamer in our containers, then those should already contain the gstreamer-imx packages for whatever plugins are available from NXP. More details on this here: How to use Gstreamer on TorizonCore | Toradex Developer Center

Best Regards,