“UbuntuHelp:Webcam”的版本间的差异
来自Ubuntu中文
小 (New page: {{From|https://help.ubuntu.com/community/Webcam}} {{Languages|php5}} === Driver installation === Many cameras work out-of-the-box. If needed, try EasyCam, a tool for installing webcam dr...) |
小 |
||
第10行: | 第10行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get install camorama | sudo apt-get install camorama | ||
− | </nowiki></ | + | </nowiki></pre> |
''xawtv'' is another program you can use to test the camera. | ''xawtv'' is another program you can use to test the camera. | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get install xawtv | sudo apt-get install xawtv | ||
− | </nowiki></ | + | </nowiki></pre> |
=== Additional software === | === Additional software === | ||
第24行: | 第24行: | ||
sudo apt-get install amsn | sudo apt-get install amsn | ||
sudo apt-get install ekiga | sudo apt-get install ekiga | ||
− | </nowiki></ | + | </nowiki></pre> |
=== Recording to an AVI file === | === Recording to an AVI file === | ||
第31行: | 第31行: | ||
<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></ | + | </nowiki></pre> |
The resolution (width=??? & height=??? ) should be chosen to match the output of your device. | The resolution (width=??? & height=??? ) should be chosen to match the output of your device. | ||
第39行: | 第39行: | ||
<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></ | + | </nowiki></pre> |
and with audio | and with audio | ||
第45行: | 第45行: | ||
<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></ | + | </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 | 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 | ||
第53行: | 第53行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get install mplayer mencoder | sudo apt-get install mplayer mencoder | ||
− | </nowiki></ | + | </nowiki></pre> |
=== Manual installation instructions === | === Manual installation instructions === | ||
第76行: | 第76行: | ||
pwc 93984 0 <- your driver seems ok. (around 90kb) | pwc 93984 0 <- your driver seems ok. (around 90kb) | ||
− | </nowiki></ | + | </nowiki></pre> |
How to get your webcam working ? | How to get your webcam working ? | ||
第88行: | 第88行: | ||
<pre><nowiki> | <pre><nowiki> | ||
make | make | ||
− | </nowiki></ | + | </nowiki></pre> |
5) | 5) | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo modprobe -r pwc | sudo modprobe -r pwc | ||
− | </nowiki></ | + | </nowiki></pre> |
6) | 6) | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo cp pwc.ko /lib/modules/`uname -r`/kernel/drivers/media/video/pwc/pwc.ko.saillard | sudo cp pwc.ko /lib/modules/`uname -r`/kernel/drivers/media/video/pwc/pwc.ko.saillard | ||
− | </nowiki></ | + | </nowiki></pre> |
7) | 7) | ||
<pre><nowiki> | <pre><nowiki> | ||
cd /lib/modules/`uname -r`/kernel/drivers/media/video/pwc | cd /lib/modules/`uname -r`/kernel/drivers/media/video/pwc | ||
− | </nowiki></ | + | </nowiki></pre> |
8) | 8) | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo mv pwc.ko pwc.ko.ubuntu | sudo mv pwc.ko pwc.ko.ubuntu | ||
− | </nowiki></ | + | </nowiki></pre> |
9) | 9) | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo ln -s pwc.ko.saillard pwc.ko | sudo ln -s pwc.ko.saillard pwc.ko | ||
− | </nowiki></ | + | </nowiki></pre> |
10) | 10) | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo depmod -a | sudo depmod -a | ||
− | </nowiki></ | + | </nowiki></pre> |
11) | 11) | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo modprobe pwc | sudo modprobe pwc | ||
− | </nowiki></ | + | </nowiki></pre> |
12) Enjoy! :) | 12) Enjoy! :) |
2007年5月13日 (日) 12:51的版本
目录
Driver installation
Many cameras work out-of-the-box. If needed, try EasyCam, a tool for installing webcam drivers. If you are unable to manage installing your Webcam using EasyCam, you may try installing your camera manually. At the end of this page are some links to help you with this.
Testing your webcam
There is a nifty little application called camorama to view, alter and save images from a webcam. Simply install it via apt:
sudo apt-get install camorama
xawtv is another program you can use to test the camera.
sudo apt-get install xawtv
Additional software
If you want to have a little tray system icon that notifies you when your webcam is on, try Camera Monitor. There is even a debian/ubuntu package available.
Webcam support is built in to aMSN, kopete and ekiga. As usual, install with
sudo apt-get install kopete sudo apt-get install amsn sudo apt-get install ekiga
Recording to an AVI file
MPlayer is capaple of displaying a webcam video stream, for example with the command line
mplayer tv:// -tv driver=v4l:width=640:height=480:device=/dev/video0
The resolution (width=??? & height=??? ) should be chosen to match the output of your device.
The companion to MPlayer, MEncoder can record from a webcam to video files such as AVI, for example without audio:
mencoder tv:// -tv driver=v4l:width=320:height=240:device=/dev/video0 -ovc lavc -o webcam.avi
and with audio
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
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
You may need to install these programs with
sudo apt-get install mplayer mencoder
Manual installation instructions
Installing spca5xx manually
You can find howto's for manual installation of the spca5xx driver here.
Installing ov51x manually
You can find howto's for manual installation of the ov51x driver here.
Edgy troubleshooting : pwc driver is broken
On Edgy, the pwc driver in the kernel is broken.
List of the working webcams with pwc.
An easy check to see if your pwc driver is broken :
$ lsmod | grep pwc pwc 51964 1 <- Your driver is broken ! (around 50kb) pwc 93984 0 <- your driver seems ok. (around 90kb)
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).
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)
3) Unpack and go into extracted directory
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) Enjoy! :)
See also
- InstallingLogitechQuickcamPro5000OnEdgy
CategoryDocumentation CategoryCleanup