Feature Request: Support of uvc devices using uvcvideo
Description
It would be very nice if motion could support uvc webcams. Trying a Logitech Pro 5000, supported by the new ( unfinished ) module uvcvideo, results in the following error from motion:
Apr 9 10:04:45 ds motion: [1] ioctl(VIDIOCGMBUF) - Error device does not suppor t memory map
Apr 9 10:04:45 ds motion: [1]
V4L capturing using read is deprecated!
Apr 9 10:04:45 ds motion: [1] Motion only supports mmap
Apr 9 10:04:45 ds motion: [1] Capture error calling vid_start
luvcview works fine with the camera on FC4 2.6.16-1
I am not sure whether this is a problem in uvcvideo or motion ( or both ).
--
EjnarSvejstrup - 09 Apr 2006
Follow up
A closer look at the code reveals that uvcvideo only supports
V4L2, so aparrently its just a matter of time before motion supports this driver...
I totaly agree, as more and more webcams come out, uvc will be the only way to, especially for Logitech products(the biggest seller of webcams worldwide)
G
--
GlennB - 20 Sep 2006
Current
V4L2 patch already support cameras with uvcvideo that uses YUYV palette.
Look that support question answer :
http://www.lavrsen.dk/twiki/bin/view/Motion/SupportQuestion2007x01x06x004923
--
AngelCarpintero - 07 Jan 2007
--
AngelCarpintero - 07 Jan 2007
I'm using the latest SVN code refreshed today (13th Feb 2007). I have a Logitech Sphere using the latest uvcvideo code (from SVN) which works fine in both xawtv and kdetv.
I'm getting the following output:
# motion
[0] Processing thread 0 - config file /usr/local/etc/motion.conf
[0] Motion running in setup mode.
[0] Thread 1 is from /usr/local/etc/motion.conf
[0] Thread 1 is device: /dev/video0 input 8
[0] Waiting for threads to finish, pid: 13687
[1] Thread started
[1] cap.driver: "uvcvideo"
[1] cap.card: "USB Video Class device"
[1] cap.bus_info: "0000:00:02.1"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] v4l2_select_input: name = "Camera", type 0x00000002, status 00000000
[1] - CAMERA
[1] Device doesn't support VIDIOC_G_STD
[1] Supported palettes:
[1] 0: MJPG (MJPEG)
[1] 1: YUYV (Uncompressed)
[0] motion-httpd/3.2.8 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] VIDIOC_TRY_FMT failed for format YUYV (Input/output error).
[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...
--
PaulSmith - 13 Feb 2007
Could you tell me what is the output of lsusb command for your camera ?
It should be some that are listed here
http://linux-uvc.berlios.de/
# lsusb
Bus 001 Device 002: ID 046d:08ca Logitech, Inc.
--
AngelCarpintero - 13 Feb 2007
Bus 001 Device 003: ID 046d:08cc Logitech, Inc.
However, I felt like it defeated me so I deleted everything, motion/uvdvideo and downloaded the source again and built from scratch. It works!
I do have one small issue, which is that the live webcam server on port 8081 just shows up as a black screen, but the images captured during motion detection are clear as crystal. I'll keep looking into it for a while and raise a new issue if it's nothing obvious.
--
PaulSmith - 13 Feb 2007
Unfortunately I'm experiencing exactly the same problem as
PaulSmith, but this time with a Logitech Quickcam Pro 5000. Here is the output from lsusb:
Bus 005 Device 002: ID 046d:08c5 Logitech, Inc.
And the output from Motion (svn r172) with uvcvideo (svn r89):
$ motion
[0] Processing thread 0 - config file /usr/local/etc/motion.conf
[0] Motion running in setup mode.
[0] Thread 1 is from /usr/local/etc/motion.conf
[0] Thread 1 is device: /dev/video0 input 8
[0] Waiting for threads to finish, pid: 13687
[1] Thread started
[1] cap.driver: "uvcvideo"
[1] cap.card: "USB Video Class device"
[1] cap.bus_info: "0000:00:02.1"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] v4l2_select_input: name = "Camera", type 0x00000002, status 00000000
[1] - CAMERA
[1] Device doesn't support VIDIOC_G_STD
[1] Supported palettes:
[1] 0: MJPG (MJPEG)
[1] 1: YUYV (Uncompressed)
[0] motion-httpd/3.2.8 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] VIDIOC_TRY_FMT failed for format YUYV (Input/output error).
[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...
FYI - the camera works fine with LUVCview so I'm guessing it's not a driver issue but a problem with Motion?
--
NeilFreeman - 05 Mar 2007
I've tried motion with that camera and motion worked without problem, not sure what could be the problem ... maybe some "race condition" , please post your motion.conf file, because i guess that some parameter makes motion to fail.
--
AngelCarpintero - 05 Mar 2007
Thanks for the quick response. I have attached my current configuration file. It should be fairly standard as I didn't want to touch too many options until I knew the standard configuration worked ok.
--
NeilFreeman - 05 Mar 2007
Logitech Quickcam Pro 5000 works fine with current svn version on my gentoo with kernel 2.6.19-r5
here is an ebuild:
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.7.ebuild,v 1.4 2007/01/05 20:37:39 flameeyes Exp $
inherit eutils subversion
DESCRIPTION="Motion is a video motion detector with tracking-support for webcams."
HOMEPAGE="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
ESVN_REPO_URI="http://www.lavrsen.dk/svn/motion/trunk"
#ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/svc-src/"
PKG_SUFFIX=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~x86"
IUSE="ffmpeg mysql postgres v4l"
DEPEND="sys-libs/zlib
media-libs/jpeg
ffmpeg? ( media-video/ffmpeg )
mysql? ( virtual/mysql )
postgres? ( dev-db/postgresql )"
src_compile() {
econf $(use_with v4l) $(use_with mysql) $(use_with postgres pgsql) $(use_with ffmpeg) || die "econfigure failed"
emake || die "emake failed"
}
src_install() {
make DESTDIR="${D}" install || die "install failed"
# install init-script
newinitd ${FILESDIR}/motion.init motion || die
# copy configuration file
cp ${D}/etc/motion-dist.conf ${D}/etc/motion.conf
# cleanup unused files
cd ${D}/usr/share/doc/${P}/examples/
rm motion.init-Debian motion.init-RH motion.init-FreeBSD.sh
}
pkg_postinst() {
ewarn "You need to setup /etc/motion.conf before running"
ewarn "motion for the first time."
elog "Examples are available at /usr/share/doc/${P}/examples"
elog
elog "You can install motion detection as a service, use:"
elog "rc-update add motion default"
}
files/motion.init :
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/motion/files/motion.init,v 1.1 2006/05/30 18:44:04 lu_zero Exp $
opts="${opts} reload"
depend() {
need modules
}
start() {
ebegin "Starting motion detection"
start-stop-daemon --start --quiet --exec /usr/bin/motion
eend $?
}
stop() {
ebegin "Stopping motion detection"
start-stop-daemon --stop --quiet --exec /usr/bin/motion
eend $?
}
reload() {
ebegin "Reloading motion detection configuration"
start-stop-daemon --stop --signal HUP --exec /usr/bin/motion
eend $?
}
--
NivVaizer - 31 Mar 2007