LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2156|回复: 15

[已解决]搞了几天了视频头还是搞不定,请高手帮忙!

[复制链接]
发表于 2009-12-7 09:57:26 | 显示全部楼层 |阅读模式
我的笔记本已经安装Gentoo几天了,不停的出现问题不停的解决。每解决一个问题都让我很有成就感,并且越来越喜欢Gentoo了。最近想把我本本上的内置的摄像头驱动起来,Google上面查了N多资料,试了很多方法还是没有解决,下面是我的一些信息,希望大家帮忙,非常感谢!
摄像头信息
linux_zhou ~ # lsusb
Bus 002 Device 002: ID 15d9:0a33 Unknown
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 05ca:1830 Ricoh Co., Ltd Visual Communication Camera VGP-VCC2 [R5U870]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 044e:300c Alps Electric Co., Ltd Bluetooth Controller (ALPS/UGPZ6)
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

看到视频是VGP-VCC2 [R5U870] 然后就在网上查找各种资料,最后找到了VGP-VCC2 [R5U870]的源吗,然后自己编译安装,安装好后发现已经可以注册了,下面是信息
linux_zhou ~ # dmesg | grep r5u870
\[    7.498290] usbcam: registering driver r5u870 0.11.3
[    7.498320] r5u870 1-6:1.0: usb_probe_interface
[    7.498322] r5u870 1-6:1.0: usb_probe_interface - got id
[    7.498328] r5u870-0: Detected Sony VGP-VCC2 (VAIO SZ)
[    7.498786] r5u870-0: registered as video0
[    7.498820] usbcore: registered new interface driver r5u870
我以为安装完成可以用了,但是我在软件中说什么都无法启动这个视频头
linux_zhou ~ # luvcview -f /dev/video0
luvcview version 0.2.1
Video driver: x11
A window manager is available
video /dev/video0
Unable to set format: 22.
Init v4L2 failed !! exit fatal
linux_zhou ~ #
提示 Init v4L2 failed !! exit fatal失败,不能启动

到底为什么呢?我怎么才能启动我的视频头呢?谢谢大家帮忙解决!!!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2009-12-7 11:52:48 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-7 12:32:42 | 显示全部楼层
我试了,还是不行的,无法打开摄像头,现在不知道从哪里入手了,刚才把内核又重新编译了,成功加载了r5u870这个模块,但是视频还是出不来
linux_zhou 2.6.31-gentoo-r6 # mplayer -cache 128 -tv driver=v4l:width=640:height=480utfmt=i420:device=/dev/video0 -vc rawi420 -vo xv tv://
MPlayer was compiled without TV interface support.
MPlayer SVN-r29463-4.3.4 (C) 2000-2009 MPlayer Team
回复 支持 反对

使用道具 举报

发表于 2009-12-7 14:13:11 | 显示全部楼层
MPlayer was compiled without TV interface support.

有些摄像头不是所有的应用程序都能用
比如龙芯笔记本上的目前就只有mplayer可以用
你的mplayer没有加入tv界面的支持
你加上相关的USE标记,重emerge再试试
回复 支持 反对

使用道具 举报

发表于 2009-12-7 14:27:32 | 显示全部楼层
再试试luvcview, 我用这个能看到摄像头的视频,但别的功能没有.
原来mplayer也能播摄像头,我这没出来:
正在播放 tv://。
缓存填充:  0.00% (0 字节)
检测到 TV 文件格式。
已选择驱动:v4l
名称:Video 4 Linux input
作者:Alex Beregszaszi
注释:under development
=================================================================
WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
As the V4L1 compatibility layer is broken, this may not work.
If you encounter any problems, use driver=v4l2 instead.
Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Selected device: UVC Camera (17ef:4807)
Capabilites: capture
Device type: 1
Supported sizes: 48x32 => 1280x1024
Inputs: 1
  0: Camera 1:  (tuner:0, norm:pal)
ioctl set chan failed: Invalid argument
ioctl set chan failed: Invalid argument
错误:无法进行规格化!
所选输入没有调台器!
ioctl set picture failed: Invalid argument
The 'outfmt' of 'Planar I420' is likely not supported by your card
Munmap failed: Invalid argument


正在退出...(文件末尾)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-7 15:54:47 | 显示全部楼层
楼上的兄弟比我的情况好多了,已经可以缓冲数据了。我的还是老样子,放弃段时间再弄吧,连续弄几天把我弄的都要崩溃了。。。重新编译内核,alsa又不好使了。不能再两个不同的内核上切换,切换的时候要手动运行一下alsaconf就可以了
回复 支持 反对

使用道具 举报

发表于 2009-12-7 17:37:20 | 显示全部楼层
如果是原來用gspca驅動的視頻頭,請注意安裝下libv4l。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-8 11:49:15 | 显示全部楼层
昨天晚上回来把mplayer加入了TV的支持,但是就是不出来视频,下面是我的mplayer出来的信息,疯掉了真是无从下手,网上的文章都搜烂了。就是没有解决啊!
zhoudazhi@linux_zhou ~ $ mplayer -cache 128 -tv driver=v4l2:width=640:height=480utfmt=i420:device=/dev/video0 -vc rawi420 -vo xv tv://
MPlayer SVN-r29463-4.3.4 (C) 2000-2009 MPlayer Team

Playing tv://.
Cache fill:  0.00% (0 bytes)   
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
v4l2: ioctl get standard failed: Invalid argument
Selected device: Sony VGP-VCC2 (VAIO SZ) #1
Capabilites:  video capture  read/write  streaming
supported norms:
inputs: 0 = Camera;
Current input: 0
Current format: YUYV
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
==========================================================================
Forced video codec: rawi420
Cannot find codec matching selected -vo and video format 0x32595559.
==========================================================================

v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (End of file)
zhoudazhi@linux_zhou ~ $
回复 支持 反对

使用道具 举报

发表于 2009-12-8 11:58:27 | 显示全部楼层
http://www.arakhne.org/ricoh/index.html

我不知道怎么说。我看了一下这个,包文件可能是media-video/linux-uvc。你如果用自己安装的不好用,可以用Portage里的。目前不确定这两个驱动是不是一个文件。

另外和v4l有关的话我就不清楚了。总之我的驱动也和v4l有关,我就在/etc/make.conf上加入了v4l v4l2两个USE。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-8 12:11:17 | 显示全部楼层
谢谢楼上,media-video/linux-uvc我没有办法安装的,被mask了的包,后来我硬装但是编译还是通过不了,而且我在gentoo上查找r5u870的文章,都是有r5u870的包的,但是我更新我的portage就是找不到,网上的驱动我试了N个了,按照各种教程都做过,现在是一头雾水啊。
zhoudazhi@linux_zhou ~ $ luvcview
luvcview version 0.2.1
Video driver: x11
A window manager is available
video /dev/video0
Unable to set format: 22.
Init v4L2 failed !! exit fatal
zhoudazhi@linux_zhou ~ $
那个V4l2到底是个什么东西,怎么总是失败呢?和我编译内核有关系吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表