High CPU usage in imx6dl sabresd with gstreamer pipeline for USB webcam use-case

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

High CPU usage in imx6dl sabresd with gstreamer pipeline for USB webcam use-case

987 Views
riyazurrahman
Contributor I

I am able to test USB webcam(Logitech HD Webcam C270) using gstreamer on IMX6DL-SDP sabresd platform.

I am trying with latest fsl-yocto-4.9.11-1.0.0 release. This Webcam support YUV and MJPEG format.

Below is gstreamer pipeline:

1. YUV format

gst-launch-1.0 imxv4l2src device=/dev/video3 ! video/x-raw, width=640, height=480, format=YUY2, framerate=30/1 ! imxv4l2sink device=/dev/video16 sync=false

2. MJPEG format

gst-launch-1.0 imxv4l2src device=/dev/video3 ! image/jpeg, framerate=30/1 ! jpegparse ! jpegdec ! videoconvert ! imxv4l2sink device=/dev/video16 sync=false

I am concerned about CPU usage, with YUV format gst pipeline CPU usage is around 35-45% and with MJPEG gst pipeline is even more i.e. around 52-58%. I wanted to know whether this much CPU usage with USB webcam use-case expected? Could you please suggest some configuration in kernel/boot arguments to reduce this CPU usage? 

0 Kudos
2 Replies

759 Views
riyazurrahman
Contributor I

Hi Victor,

Thanks for your reply. I have checked kernel configuration and it seems required drivers are already there.

We have enabled UVC support in kernel for USB webcam support as mentioned in this link:

https://community.nxp.com/docs/DOC-93688 .

Could you please let us know any specific driver to select?

 

I have also tested with simple below gstreamer pipeline and checked CPU usage thread wise:

gst-launch-1.0 imxv4l2src device=/dev/video3 ! imxv4l2sink device=/device/video16 sync=false

It seems imxv4l2src gst element taking around 40% CPU. "imxv4l2src" and "imxv4l2sink" both are hardware accelerated. Could you please provide more information on what all changes might be needed to reduce CPU usage? 

0 Kudos

759 Views
b36401
NXP Employee
NXP Employee

Possibly there is no hardware acceleration in your case. Please make sure that you are using proper driver, etc.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos