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

Resource temporarily unavailable when using high resolution webcam #658

Open
achojoao opened this issue Jul 20, 2023 · 1 comment
Open

Comments

@achojoao
Copy link

Hi all!

I'm using usbipd with WSL2 and I have some problems I think might be related with USB bandwidth or memory, but I can't figure it out, so I would need some help with it, please.

I can successfully attach my webcam and use it inside Ubuntu 22.04. By use I mean:

  • I can list it with lsusb
  • I can see it at /dev/video0 and /dev/video1
  • I can capture an image with v4l2-ctl with v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=MJPG --verbose --stream-mmap --stream-to=frame.jpg --stream-count=1
  • I can open guvcview and watch streaming in real time as well as capture images and videos
  • I can use my own library based on v4l2 to capture images

But it only works when the resolution is no too high (for example 1280x720).

My camera provides 4k resolution (3280x2160) and all applications I've tried fails when I try to capture an image with this resolution:

  • v4l2-ctl hangs
  • guvcview does not show real time streaming and can't capture image or video. Log shows "Resource temporarily unavailable" (with this application I notice that framerate suffers while I increase the resolution to 1280x960, 1920x1080...)
  • My library also throws a "Resource temporarily unavailable" when trying to access the buffer (VIDIOC_DQBUF).

I've tried several webcams, different USB ports and multiple WSL kernel builds with distinct configurations, with no success.

I've also tried to rise the memory associated with the buffers by modifying the value at /sys/module/usbcore/parameters/usbfs_memory_mb with no success.

Any help will be appreciated.

Thanks!

@aholgado
Copy link

Hi, any comments on this?

Thanks

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