Motion - Support Question 2011x 01x 16x 031657

Motion does not identify /dev/video0 on Ubuntu Lucid, but VLC can see it.

Question

Hello, I am new to Linux! I installed Motion using sudo apt-get install motion (seemed to be OK) but all I get is [1] Retrying until successful connection with camera [1] Failed to open video device /dev/video0: If I do lsusb I find the USB capture device at .. Bus 001 Device 007: ID 05e1:0408 Syntek Semiconductor Co., Ltd and VLC media player can find it at v4l2:///dev/video0 The file motion.conf comes with a "X" across it in the file browser. Is that bad? Hope you can find the time to help me in the right direction. --Grahame

I'm afraid I do not know how to get the information you need about libraries (mentioned below)?

grahame@C-2-Q-Ubuntu:~$ motion -c/etc/motion/motion.conf
[0] Configfile /etc/motion/motion.conf not found - trying defaults.: 
[0] could not open configfile /etc/motion/motion.conf: 
[0] Not config file to process using default values
[0] Motion 3.2.11 Started
[0] ffmpeg LIBAVCODEC_BUILD 3412993 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion/motion.conf
[1] Thread 1 started
[1] Failed to open video device /dev/video0: 
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[1] Retrying until successful connection with camera
[1] Failed to open video device /dev/video0: 
[1] Retrying until successful connection with camera
[1] Failed to open video device /dev/video0: 
[1] Retrying until successful connection with camera
[1] Failed to open video device /dev/video0: 
[1] Video signal lost - Adding grey image
[1] Retrying until successful connection with camera
[1] Failed to open v

Environment

Motion version: 3.2.12
ffmpeg version:  
Libraries: ffmpeg, mysql, postgresql
Server OS: Ubuntu Lucid
-- GrahamePratt - 16 Jan 2011

Answer

I had a perfect set-up for over a year, and a careless upgrade caused me exactly the same problem. In my case, I tracked it down to permissions on

/dev/video* not being correct anymore. Try:

sudo chmod /dev/video* a+rw

If that fixes it (without a reboot - motion will pick it up immediately) then you have the same issue

HOWEVER, these changes will not survive a reboot.

You have to write a udev rule to fix that.

Use your favourite editor to create the following file:

/etc/udev/rules.d/10-local.rules

and insert the following line

KERNEL=="video[0-9]*", MODE=="0666"

SupportForm edit

TopicTitle Motion does not identify /dev/video0 on Ubuntu Lucid, but VLC can see it.
SupportStatus AnsweredQuestions
AssignedQuestionTo
SubmittedBy GrahamePratt
Topic revision: r2 - 26 Apr 2011, DavidLeeming
Copyright © 1999-2017 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.