Hey all,
I recently tested the imx6 solo (Wandboard Solo) VPU to encode h.264 streams from my USB webcam. I used the GStreamer plugins to stream a 720p video to another PC via Ethernet.
The result was frustrating. The CPU runs on +50 % CPU time. I thought VPU will reduce the CPU load to a minimum. I expected something like 5 % CPU time.
I am curious if a CSI-2 MIPI camera would decrease the CPU time to a value around 5 % CPU usage?
Has someone experiences with CSI-2 MIPI camera -> h.264 -> streaming performance?
Is the communication between MIPI interface and VPU faster than USB interface to VPU?
Solved! Go to Solution.
I tried several cam use cases on the SDP : USB cam, embedded MIPI cam, embedded parallel cam.
1.
For the SDP embedded cams (CPU usage ~ 8 - 15 %) :
# modprobe ov5642_camera
# modprobe mxc_v4l2_capture
# gst-launch mfw_v4lsrc device=/dev/video0 ! vpuenc codec=6 ! matroskamux ! queue max-size-bytes=0 max-size-time=0 ! filesink locati on=/test.mkv sync=false &
…
# top
…
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6374 root 20 0 57252 17m 3072 S 15 2.3 0:03.34 gst-launch-0.10
…
# gst-launch mfw_v4lsrc device=/dev/video1 ! vpuenc codec=6 ! matroskamux ! queue max-size-bytes=0 max-size-time=0 ! filesink locati on=/test.mkv sync=false &
…
# top
…
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6269 root 20 0 43616 4704 3072 S 7 0.6 0:01.15 gst-launch-0.10
2.
For USB cam (CPU usage ~50%) :
# usb 1-1: device v0ac8 p3450 is not supported
# gst-launch v4l2src device=/dev/video0 ! vpuenc cod ec=6 ! matroskamux ! queue max-size-bytes=0 max-size-time=0 ! filesink location= /test.mkv sync=false &
…
# top
…
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6279 root 20 0 77736 6624 3360 S 47 0.9 0:03.42 gst-launch-0.10
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Yuri Muhin!
recently, I'm working a video processing project base on i.mx6q sabre sdp, but I got a problem to use USB camera on my board ,which running Ubuntu 11.10 OS .
since, you have do some test on USB cam、MIPI cam、CSI cam,so I wonder do you mind to tell me what kind of platform and OS were you used when conducted those test,
thanks best regard
Usually Freescale demo images from Web are applied for testing.
~Yuri.
I tried several cam use cases on the SDP : USB cam, embedded MIPI cam, embedded parallel cam.
1.
For the SDP embedded cams (CPU usage ~ 8 - 15 %) :
# modprobe ov5642_camera
# modprobe mxc_v4l2_capture
# gst-launch mfw_v4lsrc device=/dev/video0 ! vpuenc codec=6 ! matroskamux ! queue max-size-bytes=0 max-size-time=0 ! filesink locati on=/test.mkv sync=false &
…
# top
…
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6374 root 20 0 57252 17m 3072 S 15 2.3 0:03.34 gst-launch-0.10
…
# gst-launch mfw_v4lsrc device=/dev/video1 ! vpuenc codec=6 ! matroskamux ! queue max-size-bytes=0 max-size-time=0 ! filesink locati on=/test.mkv sync=false &
…
# top
…
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6269 root 20 0 43616 4704 3072 S 7 0.6 0:01.15 gst-launch-0.10
2.
For USB cam (CPU usage ~50%) :
# usb 1-1: device v0ac8 p3450 is not supported
# gst-launch v4l2src device=/dev/video0 ! vpuenc cod ec=6 ! matroskamux ! queue max-size-bytes=0 max-size-time=0 ! filesink location= /test.mkv sync=false &
…
# top
…
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6279 root 20 0 77736 6624 3360 S 47 0.9 0:03.42 gst-launch-0.10
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yuri,
thank you very much I appreciate it!
Cheers
MIPI is much faster than USB. The reason is that hardware buffers are being used by the primer. Try the MIPI camera and you should see much less CPU usage.
One way to see that VPU is being used is launching 'videotestsrc ! vpuenc ! fakesink'.
Leo