linux usb 摄像头测试软件webcam spcaview luvcview xawtv 使用问题

时间:2021-06-15 13:29:33

在用v4l进行测试时,总会出现问题,而且大部分都是 ... Invalid argument,这让我很是无解。这个问题专门开贴来解决。先说一下我用的测试软件。

现在的平台

ubuntu

Linux version 2.6.27-7-generic

usb摄像头驱动:UVC(USB Video Class Linux device driver)-->集成.

( 从2.6.26开始, gspca已经合并到内核中间,
名称为UVC(USB Video Class Linux device driver), 在driver/media/video/gspca目录. 编译时只需勾选相关的模块即可.)

 

接下来我下载了几个测试测试摄像头可用以下几个软件:
webcam

spcaview

luvcview

xawtv

(spcaview是编译安装,剩下的sudo apt-get install ...)

这几个软件运行后,后两个(luvcview xawtv)可以看到采集图像,前两个不成功。。。下面是执行后信息。

@ubuntu:~$ webcam
reading config file: /home/kongdepeng/.webcamrc
ioctl: VIDIOC_QUERYCTRL(id=9963776;type=unknown;name="";minimum=0;maximum=0;step=0;default_value=0;flags=0): Input/output error
video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr
grabber config:
  size 320x240 [none]
  input (null), norm (null), jpeg quality 75
  rotate=0, top=0, left=0, bottom=240, right=320

***********************************************************************************************************

spcaview
 Spcaview version: 1.1.7 date: 06:11:2006 (C) mxhaard@magic.fr
Initializing SDL.
SDL initialized.
bpp 3 format 15
Using video device /dev/video0.
Initializing v4l.
**************** PROBING CAMERA *********************
Camera found: USB 2.0 PC Camera
Hmm did not support Video_channel
*****************************************************
 grabbing method default MMAP asked
 init VIDIOCGMBUF FAILED
: Invalid argument
VIDIOCGMBUF size 0  frames 0  offets[0]=0 offsets[1]=0
VIDIOCGPICT
brightnes=33410 hue=32768 color=16513 contrast=32768 whiteness=18236
depth=16 palette=8
Couldnt get videopict params with VIDIOCSPICT
: Invalid argument

cvsync err
: Invalid argument
Segmentation fault

*******************************************************************************************************************

 
@ubuntu:~$ luvcview
luvcview 0.2.4

SDL information:
  Video driver: x11
  A window manager is available
Device information:
  Device path:  /dev/video0
Stream settings:
  Frame format: YUYV (MJPG is not supported by device)
  Frame size:   640x480
  Frame rate:   30 fps

*******************************************************************************************************************

@ubuntu:~$ xawtv
This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.27-7-generic)
xinerama 0: 1024x768+0+0
WARNING: No DGA support available for this display.
/dev/video0 [v4l2]: no overlay support
v4l-conf had some trouble, trying to continue anyway
ioctl: VIDIOC_QUERYCTRL(id=9963776;type=unknown;name="";minimum=0;maximum=0;step=0;default_value=0;flags=0): Input/output error
ioctl: VIDIOC_QUERYCTRL(id=9963777;type=unknown;name="";minimum=0;maximum=0;step=0;default_value=0;flags=0): Input/output error
Warning: Cannot convert string "-*-ledfixed-medium-r-*--39-*-*-*-c-*-*-*" to type FontStruct
ioctl: VIDIOC_G_STD(std=0xb7967490b7eab1b8 [PAL_H,PAL_I,PAL_D,PAL_K,PAL_M,NTSC_M,NTSC_M_JP,?,SECAM_D,SECAM_H,SECAM_K1,SECAM_L,?ATSC_8_VSB,ATSC_16_VSB,(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)]): Invalid argument
ioctl: VIDIOC_S_STD(std=0x0 []): Invalid argument