Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uvc-gadget using 98% CPU when not in use #1

Open
geerlingguy opened this issue Sep 30, 2020 · 3 comments
Open

uvc-gadget using 98% CPU when not in use #1

geerlingguy opened this issue Sep 30, 2020 · 3 comments

Comments

@geerlingguy
Copy link
Owner

It would be nice if the uvc-gadget process were not quite as much of a CPU hog, at least on the Pi Zero W's ancient CPU.

top - 21:56:20 up 4 min,  3 users,  load average: 0.99, 1.36, 0.68
Tasks: 111 total,   2 running, 109 sleeping,   0 stopped,   0 zombie
%Cpu(s): 16.9 us, 83.1 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    368.7 total,     82.5 free,    100.0 used,    186.2 buff/cache
MiB Swap:    100.0 total,    100.0 free,      0.0 used.    215.2 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                        
  436 root      20   0    5940   5168   5100 R  98.4   1.4   2:30.20 uvc-gadget

Is there any way to bring that down? Right now I'm testing supplying a 720p and 1080p stream... maybe I can't have multiple, and I'll have to stick with just one.

@fallingcats
Copy link

The Pi is usually way more efficient in encoding h264 (gpu accelerated) than mjpeg from what I've seen. I don't know whether is is possible to switch but it should certainly be worth looking into

@fallingcats
Copy link

fallingcats commented Nov 23, 2020

For what it's worth I found this, which seems to support h264
https://github.com/gale320/uvc-gadget/blob/master/uvc-gadget.c

Edit: Seems support for h264 is (a) not tested, and (b) probably not quite functional(?)
gale320/uvc-gadget@8934956

@geerlingguy
Copy link
Owner Author

Related: wlhe#1

geerlingguy pushed a commit that referenced this issue Nov 9, 2021
Change the configfs folder name from c.2 to c.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants