Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] USB 3.0 camera support with gstreamer

31

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
31

【Linux】 USB 3.0 camera support with gstreamer

Posted at 5/16/2018 23:35:58      View:3853 | Replies:0        Print      Only Author   [Copy Link] 1#
Hi all,
I have been evaluating the FireFly ROC-RK3328-CC and AIO-3399J and I got mixed results on it.

Our goal is to use USB 3.0 cameras and be able to render them over USB 3.0 and HDMI out at the same time.

When using Firefly Ubuntu images using gstreamer when using the following pipeline, which essentially capture USB video and render them to fakesink. This way, I can monitor the real USB bandwidth.
>> gst-launch-1.0 v4l2src ! video/x-raw,width=1920,height=1080,framerate=60/1 ! fpsdisplaysink video-sink=”fakesink sync=false” sync=false text-overlay=false –v

Using the fpsdisplaysink plugin, I am able to get the frame rate of the data rendered to null.
With the RK3328, we are able to get 37 fps.
With the RK3399, we are able to get 20 fps. I am a bit concerned about this result since I hoped to have a better frame rate with this chip.

I have made also some code in order to capture video at different layers. Here is the architecture in order to capture video from UVC camera under Linux.
USB Camera -> xHCI (USB 3.0) -> uvcvideo (UVC) -> V4L2 -> gstreamer

I probed the dataflow with some applications and here is our results at 1080p60.
Dataflow between xHCI to uvcvideo is 1080p60
Dataflow between uvcvideo to V4L2 is 1080p60
Dataflow between V4L2 to gstreamer is 1080p37 for RK3328 and 1080p20 for RK3399
This also proves that gstreamer is not in cause.

It seems there are some issues in V4L2 when you capture uncompressed video using USB.

There is no problem with the following setup if you are on another platform, like x86_64.

I am also concerned about CPU utilization when doing these tests, is it almost 80-100% only for capturing from USB 3.0. Are there some DMA functions we can enable in order to unload the CPU?

Are you already familiar with this type of issue.

I will also try to post this problem in the community in order to get a feed back on it.

Thanks for your time.

Jérôme
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list