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

WaitForFrame times out on RPi (with LifeCam and RPi internal camera) #34

Open
mms- opened this issue Feb 5, 2020 · 4 comments
Open

Comments

@mms-
Copy link

mms- commented Feb 5, 2020

On RPi3 with Ubuntu/arm64 with a Microsoft Studio webcam always times out on cam.WaitForFrame(..) call when using YUYV 4:2:2 and 1920x1080 while 640x480 works just fine. However MJPEG works fine at 1920x1080. No other errors just a timeout. Potential there is a buffer issue somewhere since the amount of data with YUY will be much higher?

However MJPEG also fails. A different RPi with Raspbian and an internal RPi Cam getting the following trace:

DeviceConfig: /dev/video0, Motion-JPEG,
Available formats:
Planar YVU 4:2:0, 32-bit BGRA/X 8-8-8-8, H.264, UYVY 4:2:2, Y/CbCr 4:2:0, VYUY 4:2:2, YUYV 4:2:2, 24-bit RGB 8-8-8, JFIF JPEG, Motion-JPEG, YVYU 4:2:2, Y/CrCb 4:2:0, Planar YUV 4:2:0, 24-bit BGR 8-8-8,
Supported frame sizes for format: Motion-JPEG
[32-3280;2]x[32-2464;2],
Request: Motion-JPEG [32-3280;2]x[32-2464;2]
Result: Motion-JPEG 3280x2464
Wait frame..
Webcam wait frame, retrying: Timeout occured
Wait frame..
Webcam wait frame, retrying: Timeout occured
Wait frame..

The timeout is at 10sec but I have tried minutes and it never yields data same when trying YUYV Is this normal? What could the issue be?

Also a Logitech Brio has the same issue, timeout on WaitForFrame.

@mms- mms- changed the title WaitForFrame often times out on RPi (with LifeCam and RPi internal camera) WaitForFrame times out on RPi (with LifeCam and RPi internal camera) Feb 6, 2020
@jackfong66
Copy link

jackfong66 commented Feb 23, 2020

rmmod bcm2835-v4l2
modprobe bcm2835-v4l2
Destroys and re-creates /dev/video0

I replaced the resolution with 640 * 480 without problems
pi zero W. CSI is OK

@tobearlabs
Copy link

With my raspicam i get always streaming:operation not permitted - any ideas? (also with sudo). If i attach a usb webcam everything works fine.

@pojntfx
Copy link

pojntfx commented Apr 26, 2021

I have the same problem as @tobearlabs - Pi Zero WH, Pi ZeroCam..

@pojntfx
Copy link

pojntfx commented Apr 26, 2021

Fixed it! This happens because the Zero is to slow to handle high-resolution video streams. Using f, w, h, err := cam.SetImageFormat(format, uint32(size.MinWidth), uint32(size.MaxWidth)) instead of f, w, h, err := cam.SetImageFormat(format, uint32(size.MaxWidth), uint32(size.MaxHeight)) for example https://github.com/blackjack/webcam/blob/master/examples/stdout_streamer/stdout_streamer.go works.

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

4 participants