Error Failed To Query Crop Capabilities /dev/video0
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 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 https://bugs.debian.org/608790 /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 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 https://forums.zoneminder.com/viewtopic.php?t=17751 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.width, crop.c.height );
< }
< else {
< sprintf( output+strlen(output), " Current: Cropping is not supported\n");
< }
< }
---
> if ( verbose )
> sprintf( output+strlen(output), " Current: %d x %d\n", crop.c.width, crop.c.height );
I cant find zm_local_camera.cpp file so i'm stuck here to.then I tried the fixx that willberg mention
zoneminder (Ubuntu) Edit Expired Undecided Unassigned Edit You need to log in to change this bug's status. Affecting: zoneminder (Ubuntu) Filed here by: jpp When: 2010-10-03 Completed: 2016-04-15 Target Distribution Baltix https://bugs.launchpad.net/bugs/654003 BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance Expired Undecided Assigned to Nobody Me Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description Binary package hint: zoneminder Hi, error failed on 10.4 from stander depot I can install zm 1.24.2 zmu command is OK with V4L1 jpp@jpp-laptop:~$ zmu -d /dev/video1 -V1 -q -v Video Device: /dev/video1 Video Capabilities Name: UVC Camera (046d:09a1) Type: 1 Can capture Video Channels: 1 Audio Channels: 0 Maximum Width: 960 Maximum Height: 720 Minimum Width: 48 Minimum Height: 32 Window Attributes X Offset: 0 Y Offset: 0 Width: 1280 Height: error failed to 960 Picture Attributes Palette: 8 - YUYV Colour Depth: 16 Brightness: 37008 Hue: 0 Colour :7196 Contrast: 6939 Whiteness: 0 Channel 0 Attributes Name: Camera 1 Channel: 0 Flags: 0 Type: 2 - Camera Format: 0 - PAL But KO with V4L2 jpp@jpp-laptop:~$ zmu -d /dev/video1 -V2 -q -v Error, failed to query crop /dev/video1: Invalid argument jpp@jpp-laptop:~$ in zmdc.log there are : 10/03/10 12:17:33.072315 zmdc[10135].INF [Starting pending process, zmc -d /dev/video0] 10/03/10 12:17:33.074155 zmdc[10135].INF ['zmc -d /dev/video0' starting at 10/10/03 12:17:33, pid = 10410] 10/03/10 12:17:33.135364 zmdc[10135].ERR ['zmc -d /dev/video0' exited abnormally, exit status 6] It's impossible to see video from monitor in zoneminder :( no pb with xawtv xawtv -c /dev/video0 is OK. Thanks Add tags Tag help Launchpad Janitor (janitor) wrote on 2012-04-24: #1 Status changed to 'Confirmed' because the bug affects multiple users. Changed in zoneminder (Ubuntu): status: New → Confirmed william redland (wredland) wrote on 2012-04-24: #2 Exact same issue... I have two QuickCam Pro's One works, the other does not. zmdc.log 04/24/12 00:00:43.083066 zmdc[1955].INF [Starting pending process, zmc -d /dev/video1] 04/24/12 00:00:43.084820 zmdc[1955].INF ['zmc -d /dev/video1' starting at 12/04/24 00:00:43, pid = 4081] 04/24/12 00:00:43.120874 zmdc[1955].INF [