个人工具

“UbuntuHelp:Webcam/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{Translation}} {{From|https://help.ubuntu.com/community/Webcam}} {{Languages|UbuntuHelp:Webcam}} === Driver installation === Many cameras work out-of-the-box. If needed, try [[UbuntuHelp...)
 
(webcam 摄像头安装)
第1行: 第1行:
 
{{Translation}}
 
{{Translation}}
 
{{From|https://help.ubuntu.com/community/Webcam}}
 
{{From|https://help.ubuntu.com/community/Webcam}}
 +
{{Translator|tianping }}
 
{{Languages|UbuntuHelp:Webcam}}
 
{{Languages|UbuntuHelp:Webcam}}
=== Driver installation ===
+
=== 驱动安装 ===
Many cameras work out-of-the-box. If needed, try [[UbuntuHelp:EasyCam|EasyCam]], a tool for installing webcam drivers. If you are unable to manage installing your Webcam using [[UbuntuHelp:EasyCam|EasyCam]], you may try installing your camera manually. At the end of this page are some links to help you with this.
+
许多摄像头安装上就可以使用,如果不能使用,你可以使用[[UbuntuHelp:EasyCam|EasyCam]]安装摄像头驱动。但是如果这样仍然不能解决问题,你可能就需要手动安装驱动了。本页末尾有几个链接可以提供帮助。
=== Testing your webcam ===
+
=== 测试摄像头 ===
There is a nifty little application called [http://camorama.fixedgear.org/ camorama] to view, alter and save images from a webcam. Simply install it via apt:
+
有一个叫做[http://camorama.fixedgear.org/ camorama]的好用的小程序可以查看,修改和保存摄像头捕获的图片。可以通过apt命令来安装:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install camorama
 
sudo apt-get install camorama
 
</nowiki></pre>
 
</nowiki></pre>
''xawtv'' is another program you can use to test the camera.
+
''xawtv'' 是另一个可以用来测试摄像头的工具。
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install xawtv
 
sudo apt-get install xawtv
 
</nowiki></pre>
 
</nowiki></pre>
=== Additional software ===
+
=== 附加软件===
If you want to have a little tray system icon that notifies you when your webcam is on, try [http://infinito.f2o.org/cameramonitor/ Camera Monitor]. There is even a [http://infinito.f2o.org/cameramonitor/cameramonitor_0.1-1_i386.deb debian/ubuntu package] available.
+
可以安装一个系统托盘[http://infinito.f2o.org/cameramonitor/ Camera Monitor],当摄像头打开时它可以通知你。在 [http://amsn.sourceforge.net/ aMSN], [http://kopete.kde.org/ kopete] [http://www.gnomemeeting.org/ ekiga]还有内置的摄像头驱动。安装方法如下:
Webcam support is built in to [http://amsn.sourceforge.net/ aMSN], [http://kopete.kde.org/ kopete] and [http://www.gnomemeeting.org/ ekiga]. As usual, install with
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install kopete
 
sudo apt-get install kopete
第21行: 第21行:
 
sudo apt-get install ekiga
 
sudo apt-get install ekiga
 
</nowiki></pre>
 
</nowiki></pre>
=== Recording to an AVI file ===
+
=== 记录成avi文件===
[[UbuntuHelp:MPlayer|MPlayer]] is capaple of displaying a webcam video stream, for example with the command line
+
[[UbuntuHelp:MPlayer|MPlayer]] 可以播放摄像头流媒体,可以使用下面命令行打开:
 
<pre><nowiki>
 
<pre><nowiki>
 
mplayer tv:// -tv driver=v4l:width=640:height=480:device=/dev/video0
 
mplayer tv:// -tv driver=v4l:width=640:height=480:device=/dev/video0
 
</nowiki></pre>
 
</nowiki></pre>
The resolution (width=??? & height=??? ) should be chosen to match the output of your device.
+
需要根据自己的设备输出来设置分辨率 (=??? & =??? ) [[UbuntuHelp:MPlayer|MPlayer]], [[UbuntuHelp:MEncoder|MEncoder]] 可以把摄像头内容记录成avi等视频文件,例如可以记录成没有声音的avi文件:
The companion to [[UbuntuHelp:MPlayer|MPlayer]], [[UbuntuHelp:MEncoder|MEncoder]] can record from a webcam to video files such as AVI, for example without audio:
+
 
<pre><nowiki>
 
<pre><nowiki>
 
mencoder tv:// -tv driver=v4l:width=320:height=240:device=/dev/video0 -ovc lavc -o webcam.avi
 
mencoder tv:// -tv driver=v4l:width=320:height=240:device=/dev/video0 -ovc lavc -o webcam.avi
 
</nowiki></pre>
 
</nowiki></pre>
and with audio
+
或者同时记录声音:
 
<pre><nowiki>
 
<pre><nowiki>
 
mencoder tv:// -tv driver=v4l:width=320:height=240:device=/dev/video0:forceaudio:adevice=/dev/dsp1 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
 
mencoder tv:// -tv driver=v4l:width=320:height=240:device=/dev/video0:forceaudio:adevice=/dev/dsp1 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
 
</nowiki></pre>
 
</nowiki></pre>
Type 'man mencoder' for more info on the audio options. In the example, /dev/dsp1 refers to the webcam USB Audio device, while /dev/dsp would refer to the sound card
+
可以利用'man mencoder'查看更多的音频选项。在上述例子中, /dev/dsp1 是指摄像头的USB音频设备,而 /dev/dsp 指的是声卡。
You may need to install these programs with
+
程序安装方法:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install mplayer mencoder
 
sudo apt-get install mplayer mencoder
 
</nowiki></pre>
 
</nowiki></pre>
=== Manual installation instructions ===
+
=== 手动安装方法===
==== Installing spca5xx manually ====
+
==== 手动安装 spca5xx ====
You can find howto's for manual installation of the spca5xx driver [[UbuntuWiki:Spca5xx|here]].
+
点击[[UbuntuWiki:Spca5xx|here]]查看手动安装spca5xx 驱动的方法。
==== Installing ov51x manually ====
+
==== 手动安装ov51x ====
You can find howto's for manual installation of the ov51x driver [[UbuntuHelp:Ov51x|here]].
+
点击[[UbuntuHelp:Ov51x|here]]查看手动安装spca5xx 驱动的方法。
==== Installing ov51x-jpeg manually ====
+
==== 手动安装ov51x-jpeg ====
This is a hacked driver by http://www.rastageeks.org/ and more info is available at http://www.rastageeks.org/ov51x-jpeg/index.php/Main_Page
+
在http://www.rastageeks.org/ 有一个破解的驱动,在http://www.rastageeks.org/ov51x-jpeg/index.php/Main_Page可以查看更多信息。
Suported hardware http://www.rastageeks.org/ov51x-jpeg/index.php/Working_Webcams
+
支持的硬件列表:http://www.rastageeks.org/ov51x-jpeg/index.php/Working_Webcams
My webcam is a Creative Live! Cam Vista IM and I found the instructions ready to go on the wiki very good. Installed it in 30 seconds
+
我的摄像头是 Creative Live! Cam Vista IM ,wiki上的方法对我很适用,30秒内就安装好了驱动。
==== Installing UVC manually ====
+
==== 手动安装UVC ====
The UVC module is included in 7.10, and possibly earlier but the included version has problems with some webcams. If you need to install/update it you can find a howto [[UbuntuHelp:UVC|here]]
+
在7.10中已经包含了UVC的模块,但是对某些摄像头支持得并不是很好。如果需要安装或者更新UVC,请查看[[UbuntuHelp:UVC|here]]
=== Edgy troubleshooting : pwc driver is broken ===
+
=== Edgy 查错: pwc driver is broken ===
On Edgy, the pwc driver in the kernel is [https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.17/+bug/56090 broken].
+
在Edgy版本, 内核中的pwc是 [https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.17/+bug/56090 broken].
 
[http://www.lavrsen.dk/twiki/bin/view/PWC/WorkingWebcamsWithPWC List of the working webcams with pwc.]
 
[http://www.lavrsen.dk/twiki/bin/view/PWC/WorkingWebcamsWithPWC List of the working webcams with pwc.]
An easy check to see if your pwc driver is broken :
+
一个查看pwc驱动是否崩溃的方法是:
 
<pre><nowiki>$ lsmod | grep pwc
 
<pre><nowiki>$ lsmod | grep pwc
  
pwc 51964 1  <- Your driver is broken ! (around 50kb)
+
pwc 51964 1  <- 驱动崩溃! (大约50kb)
  
pwc 93984 0  <- your driver seems ok. (around 90kb)
+
pwc 93984 0  <- 没有崩溃. (大约90kb)
 
</nowiki></pre>
 
</nowiki></pre>
How to get your webcam working ?
+
怎样让摄像头工作呢?
1) Install build-essential and the kernel-headers for your kernel (linux-headers-2.6.17-6-686 for me).
+
1) 安装你的内核对应的build-essential 和kernel-headers (对应于我的内核的文件是linux-headers-2.6.17-6-686 ).
2) Download latest driver from http://www.saillard.org/linux/pwc/ (http://www.saillard.org/linux/pwc/files/pwc-10.0.12-rc1.tar.bz2 for me)
+
2) 下载最新驱动 http://www.saillard.org/linux/pwc/ (这是我的http://www.saillard.org/linux/pwc/files/pwc-10.0.12-rc1.tar.bz2 )
3) Unpack and go into extracted directory
+
3) 解压并进入解压后的目录
 
4)  
 
4)  
 
<pre><nowiki>
 
<pre><nowiki>
第97行: 第96行:
 
sudo modprobe pwc
 
sudo modprobe pwc
 
</nowiki></pre>
 
</nowiki></pre>
12) Enjoy! :)
+
12) 好好爽吧 :)
=== See also ===
+
=== 参见其他 ===
* [[UbuntuHelp:InstallingLogitechQuickcamPro5000OnEdgy|InstallingLogitechQuickcamPro5000OnEdgy]]
+
* [[UbuntuHelp:InstallingLogitechQuickcamPro5000OnEdgy|在Edgy中安装LogitechQuickcamPro5000]]
 
* [[UbuntuHelp:InstallingEyetoyAsAWebcam|Installing the Eyetoy as a Webcam with Kopete]]
 
* [[UbuntuHelp:InstallingEyetoyAsAWebcam|Installing the Eyetoy as a Webcam with Kopete]]
 
----
 
----

2009年5月3日 (日) 15:43的版本

驱动安装

许多摄像头安装上就可以使用,如果不能使用,你可以使用EasyCam安装摄像头驱动。但是如果这样仍然不能解决问题,你可能就需要手动安装驱动了。本页末尾有几个链接可以提供帮助。

测试摄像头

有一个叫做camorama的好用的小程序可以查看,修改和保存摄像头捕获的图片。可以通过apt命令来安装:

sudo apt-get install camorama

xawtv 是另一个可以用来测试摄像头的工具。

sudo apt-get install xawtv

附加软件

可以安装一个系统托盘Camera Monitor,当摄像头打开时它可以通知你。在 aMSN, kopeteekiga还有内置的摄像头驱动。安装方法如下:

sudo apt-get install kopete
sudo apt-get install amsn
sudo apt-get install ekiga

记录成avi文件

MPlayer 可以播放摄像头流媒体,可以使用下面命令行打开:

mplayer tv:// -tv driver=v4l:width=640:height=480:device=/dev/video0

需要根据自己的设备输出来设置分辨率 (宽=??? & 高=??? ) 。 MPlayer, MEncoder 可以把摄像头内容记录成avi等视频文件,例如可以记录成没有声音的avi文件:

mencoder tv:// -tv driver=v4l:width=320:height=240:device=/dev/video0 -ovc lavc -o webcam.avi

或者同时记录声音:

mencoder tv:// -tv driver=v4l:width=320:height=240:device=/dev/video0:forceaudio:adevice=/dev/dsp1 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi

可以利用'man mencoder'查看更多的音频选项。在上述例子中, /dev/dsp1 是指摄像头的USB音频设备,而 /dev/dsp 指的是声卡。 程序安装方法:

sudo apt-get install mplayer mencoder

手动安装方法

手动安装 spca5xx

点击here查看手动安装spca5xx 驱动的方法。

手动安装ov51x

点击here查看手动安装spca5xx 驱动的方法。

手动安装ov51x-jpeg

在http://www.rastageeks.org/ 有一个破解的驱动,在http://www.rastageeks.org/ov51x-jpeg/index.php/Main_Page可以查看更多信息。 支持的硬件列表:http://www.rastageeks.org/ov51x-jpeg/index.php/Working_Webcams 我的摄像头是 Creative Live! Cam Vista IM ,wiki上的方法对我很适用,30秒内就安装好了驱动。

手动安装UVC

在7.10中已经包含了UVC的模块,但是对某些摄像头支持得并不是很好。如果需要安装或者更新UVC,请查看here

Edgy 查错: pwc driver is broken

在Edgy版本, 内核中的pwc是 broken. List of the working webcams with pwc. 一个查看pwc驱动是否崩溃的方法是:

$ lsmod | grep pwc

pwc 51964 1  <- 驱动崩溃! (大约50kb)

pwc 93984 0  <- 没有崩溃. (大约90kb)

怎样让摄像头工作呢? 1) 安装你的内核对应的build-essential 和kernel-headers (对应于我的内核的文件是linux-headers-2.6.17-6-686 ). 2) 下载最新驱动 http://www.saillard.org/linux/pwc/ (这是我的http://www.saillard.org/linux/pwc/files/pwc-10.0.12-rc1.tar.bz2 ) 3) 解压并进入解压后的目录 4)

make

5)

sudo modprobe -r pwc

6)

sudo cp pwc.ko /lib/modules/`uname -r`/kernel/drivers/media/video/pwc/pwc.ko.saillard

7)

cd /lib/modules/`uname -r`/kernel/drivers/media/video/pwc

8)

sudo mv pwc.ko pwc.ko.ubuntu

9)

sudo ln -s pwc.ko.saillard pwc.ko

10)

sudo depmod -a

11)

sudo modprobe pwc

12) 好好爽吧 :)

参见其他