ss infod
2016-02-23 22:49:31 UTC
I'm using a RPI2 and a USB webcam (Microsoft HD3000) to record video in a C
program.
Now, I'm doing extensive testing and I see that when I record long video
(ex: 10-12 hours) I almost always got an error in dmesg. The errors are:
With Raspbian (Wheezy):
uvcvideo: Non-zero status (-5) in status completion handler.
With Raspbian (Jessie)
uvcvideo: Failed to resubmit video URB (-1).
After these errors, my camera is not working anymore.
I have to restart my program to fix the error.
My program is using OpenCV 2.4.1 or 2.4.11 (I tried both).
I'm using cvQueryFrame() to get the pictures and
cvCreateVideoWriter()/cvWriteFrame() to record the video to a USB dongle
(32 GB).
I also tried to enable some uvcvideo driver options but I still have the
problem after a few hours.
sudo nano /etc/modprobe.d/uvcvideo.conf
options uvcvideo nodrop=1
options uvcvideo timeout=5000
options uvcvideo quirks=0x80
Any idea what could cause the problem ?
What would be the best way to catch the problem and deal with it ?
Can I get dmesg message in my C program and restart the camera ?
Is it possible to do a power cycle on the USB camera from an API call ?
Thanks for your comments,
ssinfod
program.
Now, I'm doing extensive testing and I see that when I record long video
(ex: 10-12 hours) I almost always got an error in dmesg. The errors are:
With Raspbian (Wheezy):
uvcvideo: Non-zero status (-5) in status completion handler.
With Raspbian (Jessie)
uvcvideo: Failed to resubmit video URB (-1).
After these errors, my camera is not working anymore.
I have to restart my program to fix the error.
My program is using OpenCV 2.4.1 or 2.4.11 (I tried both).
I'm using cvQueryFrame() to get the pictures and
cvCreateVideoWriter()/cvWriteFrame() to record the video to a USB dongle
(32 GB).
I also tried to enable some uvcvideo driver options but I still have the
problem after a few hours.
sudo nano /etc/modprobe.d/uvcvideo.conf
options uvcvideo nodrop=1
options uvcvideo timeout=5000
options uvcvideo quirks=0x80
Any idea what could cause the problem ?
What would be the best way to catch the problem and deal with it ?
Can I get dmesg message in my C program and restart the camera ?
Is it possible to do a power cycle on the USB camera from an API call ?
Thanks for your comments,
ssinfod