Motion - Bug Report 2009x 01x 28x 231739
You are here: Foswiki>Motion Web>BugReports>BugReport2009x01x28x231739 (10 Aug 2009, AngelCarpintero)Edit Attach

BUG: UVCVideo not working in Ubuntu 8.10 kernel 2.6.27

There seems to be a change in how uvcvideo works in 2.6.27 that cause motion to not work with the device.

This is the output

sudo ./motion -c /usr/local/etc/motion/motion.conf 
[0] Processing thread 0 - config file /usr/local/etc/motion/motion.conf
[0] Unknown config option "night_compensate"
[0] Unknown config option "minimum_gap"
[0] Unknown config option "low_cpu"
[0] Unknown config option "ffmpeg_filename"
[0] Processing config file /usr/local//etc/motion/thread0.conf
[0] Motion 3.2.11 Started
[0] ffmpeg LIBAVCODEC_BUILD 3355136 LIBAVFORMAT_BUILD 3409664
[0] Thread 1 is from /usr/local//etc/motion/thread0.conf
[1] Thread 1 started
[0] motion-httpd/3.2.11 running, accepting connections
[1] cap.driver: "uvcvideo"
[0] motion-httpd: waiting for data on port TCP 8000
[1] cap.card: "UVC Camera (046d:0991)"
[1] cap.bus_info: "0000:00:06.1"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl(VIDIOCGMBUF) - Error device does not support memory map
[1] V4L capturing using read is deprecated!
[1] Motion only supports mmap.
[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] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0991)"
[1] cap.bus_info: "0000:00:06.1"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl(VIDIOCGMBUF) - Error device does not support memory map
[1] V4L capturing using read is deprecated!
[1] Motion only supports mmap.
^C[1] Thread exiting
[0] httpd - Finishing
[0] httpd Closing
[0] httpd thread exit
[0] Motion terminating


Environment

Motion version: 3.2.11
ffmpeg version:  
Shared libraries: ffmpeg, postgresql
Server OS: Ubuntu 8.10 kernel 2.6.27-11-generic

-- GregHulands - 28 Jan 2009

Follow up

Hi, I am running on Ubuntu 8.10 kernel 2.6.27-11-generic with a Quickcam Pro 9000 (UVC) and it does work for me.
I have exactly the problem described on an NSLU2 running Debian 2.6.26-1-ixp4xx, both with Motion 3.2.9.
On the NSLU2 the problem appears as soon as I specify a size other than 320x240. I guess on the slug I will
try with a newer build first.
[0] Processing thread 0 - config file motion.conf
[0] Motion 3.2.9 Started
[0] ffmpeg LIBAVCODEC_BUILD 3355136 LIBAVFORMAT_BUILD 3409664
[0] Motion running in setup mode.
[0] Thread 1 is from motion.conf
[0] Thread 1 is device: /dev/video0 input 8
[1] Thread 1 started
[1] cap.driver: "uvcvideo"
[0] motion-httpd/3.2.9 running, accepting connections
[1] cap.card: "UVC Camera (046d:0990)"
[1] cap.bus_info: "0000:00:01.2"
[0] motion-httpd: waiting for data on port TCP 58080
[0] Waiting for threads to finish, pid: 2240
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] v4l2_select_input: name = "Camera 1", type 0x00000002, status 00000000
[1] - CAMERA
[1] Device doesn't support VIDIOC_G_STD 
[1] Supported palettes:
[1] 0: MJPG (MJPEG)
[1] 1: YUYV (YUV 4:2:2 (YUYV))
[1] Test palette YUYV (640x480)
[1] Using palette YUYV (640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000008
[1] found control 0x00980900, "Brightness", range 0,255 
[1]    "Brightness", default 128, current 128
[1] found control 0x00980901, "Contrast", range 0,255 
[1]    "Contrast", default 32, current 32
[1] found control 0x00980902, "Saturation", range 0,255 
[1]    "Saturation", default 32, current 32
[1] found control 0x00980913, "Gain", range 0,255 
[1]    "Gain", default 0, current 0
[1] mmap information:
[1] frames=4
[1] 0 length=614400
[1] 1 length=614400
[1] 2 length=614400
[1] 3 length=614400
[1] Error starting stream.
[1] VIDIOC_STREAMON: Cannot allocate memory
[1] ioctl(VIDIOCGMBUF) - Error device does not support memory map
[1] V4L capturing using read is deprecated!
[1] Motion only supports mmap.
[1] Capture error calling vid_start
[1] Thread finishing...
 

Cheers Brian


I've tested motion trunk-r442 with ubuntu 8.11 kernel 2.6.27-12-generic and stock uvcvideo without issues.

Please try to reproduce with trunk.

-- AngelCarpintero - 01 Mar 2009

Fix record

Look fixed ... what a pitty that never got a feedback from users ... it's free smile

Closed !

-- AngelCarpintero - 09 Jul 2009

BugReportForm edit

TopicTitle UVCVideo not working in Ubuntu 8.10 kernel 2.6.27
BugStatus Released
AssignedBugTo AngelCarpintero
SubmittedBy TWikiGuest
Topic revision: r7 - 10 Aug 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.