Error Failed To Query Crop Capabilities /dev/video1 Invalid Argument
piratebab@hotmail.com Date: Mon, 3 Jan 2011 13:54:02 UTC Severity: serious Tags: patch Found in version zoneminder/1.24.2-7 Fixed in version zoneminder/1.24.2-8 Done: Vagrant Cascadian
capabilities, and other troubles Forum for questions and support relating to the 1.24.x releases only. Post Reply Print view Search Advanced search 4 posts • Page 1 of 1 playman Posts: 4 Joined: Thu May 26, 2011 8:35 am Error: failed to query crop capabilities, and other troubles Quote Postby playman » Wed Jun 08, 2011 1:53 pm Hi.I'm trying to set up zoneminder on Ubuntu 10.04LTSI used this instruction http://www.zoneminder.com/wiki/index.ph ... g,_etc.%29The installation went trough with little hassle, but some.now i'm stuck @ "Set up video sources" part.when I try https://bugs.debian.org/608790 Code: Select allroot@fjolsmidjan:/var/log/zm# grep bttv /var/log/syslog
root@fjolsmidjan:/var/log/zm#I get nothing, just soon as I press enter I get back into root.now, if I doCode: Select allzmu -d /dev/video1 -q -vI get this errorCode: Select allRoot@fjolsmidjan:/var/log/zm# zmu -d /dev/video0 -q -v
Error, failed to query crop capabilities /dev/video0: Invalid argument
Root@fjolsmidjan:/var/log/zm#The service is running, atleast to my knowledgeCode: Select allZoneMinder Console - Running - v1.24.2I https://forums.zoneminder.com/viewtopic.php?t=17751 searched for the crop error and foundviewtopic.php?p=59472#59472dclarke wrote:A USB camera that doesn't support cropping will produce an error message "Error, failed to query crop: /dev/video0: Invalid argument" from zmu -q -v. Failures are exhibited in zmu, and other places that rely on LocalCamera::GetCurrentSettings.The fault is in LocalCamera::GetCurrentSettings.The error arises from the fact that ioctl VIDIOC_G_CROP returns -1 and errno = EINVAL to indicate that cropping is not supported. (Forum does not allow me to paste the link). LocalCamera::GetCurrentSettings treats any negative rc from ioctl VIDIOC_G_CROP as grounds for abnormal termination.The fix is straightforward and short. All changes are in zm_local_camera.cpp as follows:Code: Select all911,912c911
< int crop_rc = vidioctl( vid_fd, VIDIOC_G_CROP, &crop );
< if ((crop_rc < 0 ) && (errno != EINVAL))
---
> if ( vidioctl( vid_fd, VIDIOC_G_CROP, &crop ) < 0 )
921,928c920,921
< if ( verbose ) {
< if (crop_rc >= 0) {
< sprintf( output+strlen(output), " Current: %d x %d\n", crop.c.wi
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
on mplayer Post a reply 26 posts Page 1 of 2 1, 2 by piglet » Thu Sep 13, 2012 9:15 pm I read about "motion" being used by someone else on the forum and thought I'd have a try connecting my Logitech Clicksmart 510 webcam.sudo apt-get updatesudo apt-get install mplayermplayer tv:// driver=412:width=640:height=480:device=/dev/video0 -fps 10Success - video across the screen.However when I did:sudo apt-get motion(edited motion.conf for same resolution as worked above, and format JPEG)sudo motion -ncouldn't drive the camera (full details of output below).[1] v4l2_next: VIDIOC_QBUF: Invalid argument[1] Video device fatal error - Closing video device[1] Closing video device /dev/video0Do you have any idea how to get it working? I don't see any error that I understand.Thanks in advanceOutput from successful mplayer:Code: Select allSelected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski
comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: USB Camera (046d:0901)
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = spca500;
Current input: 0
Current format: unknown (0x4745504a)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!vailable
VO XOverlay need a subdriver
[VO_SDL] Using driver: fbcon.
vo: couldn't open the X11 display ()!
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
=======================================================