个人工具
登录
查看“UbuntuHelp:UVC”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:UVC”的源代码
来自Ubuntu中文
←
UbuntuHelp:UVC
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/UVC}} {{Languages|UbuntuHelp:UVC}} <<Include(Tag/NeedsExpansion)>> UVC stands for 'USB Video Class'. It defines video streaming functionality on the Universal Serial Bus. UVC compliant peripherals only need a generic driver; much like mass storage devices (USB flash disks, External disc enclosures, etc.) can be managed by a single driver because they conform to the USB Mass Storage specification. == UVC Linux Driver == The GNU/Linux UVC Driver page is at [http://linux-uvc.berlios.de/#devices Linux USB Video Class device driver home (Supported Devices)] and includes a list of supported devices. Instructions for downloading the driver are here [http://linux-uvc.berlios.de/#download Linux USB Video Class device driver home (Download)]. Only source code is available. Instructions for compiling the source code is included in this wiki. == UVC support in Ubuntu == === 9.04 === In 9.04 the UVC module has been included which means that some webcams 'just work' but it is recommended you still download the source code at [http://linuxtv.org/hg/~pinchartl/uvcvideo/shortlog/tip LinuxTV uvcvideo development repository]. On the left sidebar, choose your preferred compressed archive (they all contain the same files). Then build the UVC module as shown here: ==== Build for 9.04 ==== Make sure you have kernel header files. In Ubuntu 9.04 the header files package should be at least 2.6.28-11 or later. You can find out which version of Linux kernel you have by issuing the command: <pre><nowiki> uname -r </nowiki></pre> Then ensure you have the header files for building the UVC module with: <pre><nowiki> sudo apt-get install linux-headers-`uname -r` </nowiki></pre> ==== Install for 9.04 ==== Navigate to the 'uvcvideo-1b4c7a6b9d26' directory (or some similar name) containing the source. If you want to customize which drivers to compile, run: <pre><nowiki> make menuconfig </nowiki></pre> If you do not know what to do with the options that come up, just accept the defaults and exit by pressing ESC twice. To compile the drivers, run <pre><nowiki> make </nowiki></pre> then, to install the compiled drivers to the appropriate module directories, run <pre><nowiki> sudo make install </nowiki></pre> followed by <pre><nowiki> sudo depmod -a </nowiki></pre> After that you should not even need to plug your webcam in, although ensure you can see it by running: <pre><nowiki> lsusb </nowiki></pre> If it is there, then run: <pre><nowiki> sudo modprobe uvcvideo </nowiki></pre> And you should now be done! See below for other versions. === 7.10 to 8.x === From 7.10 the UVC module has been included which means that some webcams 'just work' however UVC is still at an early stage and device support and bugfixes are being added all the time. It may well be necessary to update to the latest version to get your hardware to work, in particular Skype will only work properly if you have uvc version 166 or above, earlier driver versions freeze up after a minute or so with some cameras. === 7.04 and earlier === UVC support is not included and you'll have to install it yourself. == Installing UVC == UVC has not released any 'snapshots' yet and has not been packaged and included in the Ubuntu repositories. There is a debian package located [http://packages.debian.org/unstable/graphics/linux-uvc-source here] but the best way at the moment is to grab the latest build from the [http://linuxtv.org/hg/~pinchartl/uvcvideo/shortlog/tip LinuxTV uvcvideo development repository] and compile it yourself. === Checkout from SVN (this source is deprecated) === '''This section describes the steps to download the sources (which are now deprecated) from the Subversion repository. The best place to get the drivers instead: [http://linuxtv.org/hg/~pinchartl/uvcvideo/shortlog/tip LinuxTV uvcvideo development repository].''' <<BR>>If you do not already have subversion installed get it with: <pre><nowiki> sudo apt-get install subversion </nowiki></pre> Then get that latest source from the repository with: <pre><nowiki> svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk </nowiki></pre> This will make the directory 'trunk' containing the source in your working directory === Build === Make sure you have kernel header files. In Ubuntu 7.10 and later, you need the header files package specific to your CPU architecture, for example, linux-headers-2.6.22-14-386 in addition to just linux-headers-2.6.22-14. You can do this with: <pre><nowiki> sudo apt-get install linux-headers-`uname -r` </nowiki></pre> Navigate to the 'trunk' directory containing the source and run: <pre><nowiki> make </nowiki></pre> === Install === Ubuntu keeps the kernel module for UVC in '''/lib/modules/'''''your kernel'''''/ubuntu/media/usbvideo''' and the makefile has to be altered slightly to install to the correct directory. Open the the makefile in a text editor and change : <pre><nowiki> INSTALL_MOD_DIR := usb/media to INSTALL_MOD_DIR := ubuntu/media/usbvideo </nowiki></pre> then run <pre><nowiki> sudo make install </nowiki></pre> === Update dependencies === <pre><nowiki> sudo depmod -a </nowiki></pre> === Insert Modules === Plug in your camera and enter the following command : <pre><nowiki> sudo modprobe uvcvideo </nowiki></pre> If you're running 7.10 this may complain that the module's already loaded. In that case unplug your camera and remove the old module with : <pre><nowiki> sudo modprobe -r uvcvideo </nowiki></pre> then insert the new one again as above. [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:UVC
。