ioctl (VIDIOCSPICT): Invalid argument

Bug #318191 reported by Mathieu Marquer
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
webcam-server (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: webcam-server

Using Ubuntu Intrepid with -proposed repos enabled and a Omnivision webcam integrated to my Dell Vostro 1500 screen (05a9:2640).

The webcam works fine, for example with cheese, but here is the error message that appears when I try to launch webcam-server :

$ webcam-server
ioctl (VIDIOCSPICT): Invalid argument
error setting video device parameters, using defaults
ioctl (VIDIOCSPICT): Invalid argument
not a valid video device? quitting.

Revision history for this message
mallegonian (mallegonian) wrote :

Have you tried using
webcam-server -d /dev/video0
or whatever your video device is?

Revision history for this message
Sergey K (koblin) wrote :

i'm too have this issue with Logitech QuickCam Pro 9000

webcam-server -v -d /dev/video0
ioctl (VIDIOCGCAP): Invalid argument
ioctl (VIDIOCSPICT): Invalid argument
error setting video device parameters, using defaults
ioctl (VIDIOCGCAP): Invalid argument
ioctl (VIDIOCSPICT): Invalid argument
not a valid video device? quitting.

ls -la /dev/video0
crw-rw----+ 1 root video 81, 0 2009-11-16 00:22 /dev/video0

dmesg:
[39291.632076] usb 1-4: new high speed USB device using ehci_hcd and address 10
[39291.893001] usb 1-4: configuration #1 chosen from 1 choice
[39291.894572] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0990)
[39291.952087] input: UVC Camera (046d:0990) as /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/input/input19

webcam working fine with guvcview, cheese, skype, ...

Revision history for this message
risingape (risingape) wrote :

I am also having this issue with Karmic server and webcam-server 0.50-3.

$ webcam-server
ioctl (VIDIOCSPICT): Invalid argument
error setting video device parameters, using defaults
ioctl (VIDIOCSPICT): Invalid argument
not a valid video device? quitting.

Webcam works with cheese and motion.

Revision history for this message
Paul (peubanks) wrote :
Download full text (5.7 KiB)

I'm seeing the same issue. Here's kernel version and strace output when trying to run webcam-server. Let me know if I can help further.

$ uname -r
2.6.28-11-generic

$ strace webcam-server
execve("/usr/bin/webcam-server", ["webcam-server"], [/* 23 vars */]) = 0
brk(0) = 0x893f000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fad000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=70187, ...}) = 0
mmap2(NULL, 70187, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f9b000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libjpeg.so.62", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20'\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=140900, ...}) = 0
mmap2(NULL, 143684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f77000
mmap2(0xb7f99000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21) = 0xb7f99000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PI\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=116920, ...}) = 0
mmap2(NULL, 98792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f5e000
mmap2(0xb7f73000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7f73000
mmap2(0xb7f75000, 4584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f75000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260l\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1319364, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f5d000
mmap2(NULL, 1329512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e18000
mprotect(0xb7f56000, 4096, PROT_NONE) = 0
mmap2(0xb7f57000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e) = 0xb7f57000
mmap2(0xb7f5a000, 10600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f5a000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e17000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e176c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
open("/dev/urandom", O_RDONLY) = 3
read(3, "d\256\275", 3) = 3
close(3) = 0
mprotect(0xb7f57000, 8192, PROT_READ) = 0
mprotect(0xb7f73000, 4096, PROT_READ) = 0
mprotect(0xb7f99000, 4096, PROT_READ) = 0
mprotect(0xb7...

Read more...

Revision history for this message
Ondrej (ondrej-wisniewski) wrote :

I get the same error with Lucid (Kernel 2.6.32) and webcam-server 5.04.

I am using the webcam driver sn9c102. Since the ioctl parameters are implemented in the driver I had a look at the current source code. The constants used in the driver are different from the ones used by the application. I guess the problem is related to the driver being v4l2 and webcam-server still a v4l1 application. Its webpage http://webcamserver.sourceforge.net/ stated in 2007 that an upcoming release would introduce the v4l2 API but I cannot find any trace of this release. The project seems to be abandoned.

Looks like Ubuntu basically still ships the 0.5 release from 2004, also including a small patch from 2006.

So I think webcam-server needs to be updated to be compatible with the current v4l2 webcam drivers.

Revision history for this message
Dieter Deiss (flip) wrote :

Easy workaround is to load v4l1-compat:

#!/bin/bash
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so webcam-server -d /dev/video0 ...

Hope this helps someone.
Anyway, webcam-server needs to be updated to be compatible with the current v4l2!
I tried to Contact author with no success.

Revision history for this message
Ondrej (ondrej-wisniewski) wrote :

@Dieter: Does the workaround actually work for you? I had tried that but it didn't solve the problem for me.

Anyway, as a replacement try using "motion" (also in the repos). Just a little more complicated to configure but much more powerful and it is actively being developed, works great here.

Revision history for this message
tdn (spam-thomasdamgaard) wrote :

I get the same error:
~ $ webcam-server [pts/2 - 9328H 0J 0R - 2010-10-21 11:28:00 - 0+03:46 - 0.26 0.32 0.27]
ioctl (VIDIOCSPICT): Invalid argument
error setting video device parameters, using defaults
ioctl (VIDIOCSPICT): Invalid argument
not a valid video device? quitting.

Revision history for this message
tdn (spam-thomasdamgaard) wrote :

Workaround with LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so seems to be working.

Revision history for this message
Oibaf (oibaf) wrote :

webcam-server was removed from Ubuntu time ago.

Changed in webcam-server (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.