Motion - Support Question 2009x 05x 21x 074601

Unable to open video device

Question

Hi,

Last night, my webcam stopped recording; everything was working well. If I have a look via port 8081 I see a grey image with the text "Unable to open video device since 21 May 05:06:31".

As you can see in my SYSLOG, the cam is losing connection with the PC. My cam was on /dev/video0. Now I have found it back on /dev/video1.

In motion.conf I have changed video0 to video1 and it is working again. But how is it possible that this device has changed?

Thanks.

SYSLOG
May 21 05:06:31 webcam kernel: [23943.541344] uvcvideo: Non-zero status (-84) in status completion handler.
May 21 05:06:31 webcam kernel: [23943.576088] hub 1-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
May 21 05:06:31 webcam kernel: [23943.576099] usb 1-2: USB disconnect, address 3
May 21 05:06:31 webcam kernel: [23943.816168] usb 1-2: new full speed USB device using uhci_hcd and address 4
May 21 05:06:31 webcam motion: [1] v4l2_next: VIDIOC_QBUF: No such device
May 21 05:06:31 webcam motion: [1] Video device fatal error - Closing video device
May 21 05:06:31 webcam motion: [1] Closing video device /dev/video0
May 21 05:06:31 webcam kernel: [23943.974590] usb 1-2: configuration #1 chosen from 1 choice
May 21 05:06:31 webcam kernel: [23943.977489] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera (058f:3820)
May 21 05:06:31 webcam kernel: [23943.980829] input: USB 2.0 PC Camera as /devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2:1.0/input/input8
May 21 05:06:40 webcam motion: [1] Retrying until successful connection with camera
May 21 05:06:40 webcam motion: [1] Failed to open video device /dev/video0: No such file or directory

Environment

Motion version: 3.2.11
ffmpeg version: 0.5-svn17737+3:0.svn20090303-1ubuntu6
Libraries: ffmpeg
Server OS: Ubuntu 9.04 32bit, kernel 2.6.28-11-generic

-- KrisLowet - 21 May 2009

Answer

This is not a motion question really - I had a similar problem using USB cameras with cheap cat5 usb extenders disappearing and reappearing which was a hardware, not a software problem. The solution was to write a script that would listen to hal events and kill and start motion whenever a new video device appeared.

Either try a similar hack or maybe speak to the webcam driver developers?
Topic revision: r3 - 08 Jul 2009, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.