Motion - Support Question 2007x 07x 16x 041757

failed to open /dev/video0

Question

Motion worked at first; I saw the on/off light of my webcam lighting when running motion then going off when I stopped it. Now, my webcam light is always on and motion don't start with the following error:

# motion -n 

[0] Processing thread 0 - config file /usr/local/etc/motion.conf
[0] Thread 1 is from /usr/local/etc/motion.conf
[1] Thread started
[1] Failed to open video device /dev/video0: No such file or directory
[1] Capture error calling vid_start
[1] Thread finishing...

Indeed I don't have a video0 device but the webcam is working and detected by my aMSN software


Environment

Motion version: 3.2.8
ffmpeg version: SVN-r9658
Libraries: ffmpeg, mysql
Server OS: Fedora 6

-- RoKi - 16 Jul 2007

Answer

Motion doesn't provide any method to autodetect your v4l/v4l2 device , usually v4l devices use from /dev/video0 to /dev/videoX . Maybe your problem is that you have no set the proper permissions :

First take a look to v4l devices :

ls -la /sys/class/video4linux/

Set permissions ( if above the output is video0 ) :

chmod 666 /dev/video0

-- AngelCarpintero - 16 Jul 2007
Topic revision: r2 - 16 Jul 2007, AngelCarpintero
Copyright © 1999-2019 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.