LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I configure my webcam for use in linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-configure-my-webcam-for-use-in-linux-634192/)

kennyangaresi 04-09-2008 09:42 AM

How can I configure my webcam for use in linux?
 
I need to configure my webcam for use in linux and I'm in the dark as to how to go about it. Im running an acer aspire 4720z on fed8.
I'll appreciate any help I'll get.

kummiliim 04-09-2008 10:14 AM

Quick google : ) : link

Quote:

The webcam works in Fedora, Ubuntu and Arch. I haven't tried it in PCLinuxOS.

I used the program luvcview. In Fedora, I had to install it from source. The version is current at time of writing (early February, 2008). You will need some development tools and libraries.
Code:

yum install make gcc gcc-c++ kernel-devel SDL-devel
Code:

wget
http://mxhaard.free.fr/spca50x/Inves...0070512.tar.gz
tar zxvf luvcview-20070512.tar.gz
cd luvcview-20070512
make && make install


It will install the program into /usr/local/bin. You will have to fix permissions before you can run it as a regular user. (If you want it in /usr/bin/ for consistancy, you can edit the Makefile. Towards the top they define some variables, including BIN. It's defined as /usr/local/bin--you can change it to /usr/bin.)

Add the following to /etc/security/console.perms.d/50-default.perms. At the top where they list devices you can add
Code:

<video>=/dev/video0

At the bottom, where they list permissions, you can add
Code:

<console> 0666 <video>  0600 root

To start using it without a reboot, just do as root or with root privilege
Code:

chmod 666 /dev/video0

If you now start the program with
Code:

luvcview -f yuv
you should be able to see yourself as you type. It works, so I've read, with Ekiga, though I haven't tried it. With Ekiga and any other app that asks, choose V4L2 rather than V4L or V4L1.

In Ubuntu, it's a bit simpler.
Code:

apt-get install luvcview

After that, use the same command as above, luvcview -f yuv. (The -f is for format. The default is jpg but that doesn't seem to work.)

In Arch, I had a bit of difficulty. Although there is a linux-uvc-svn in the community repo, it may be out of date. It insisted on putting the module in /lib/modules/2.6.23-Arch when I had kernel 2.6.24. So, when I did modprobe uvcvideo, I would get module not found. Eventually, I grabbed the source code with
Code:

svn://svn.berlios.de/linux-uvc/linux-uvc/trunk

Note that you need to have subversion installed for that to work. Subversion can be installed with pacman -S subversion.

Once it's downloaded, you'll see a new directory called trunk. Just cd into trunk and do make && make install. It should install the module in the proper place. You can then load the module with
Code:

modprobe uvcvideo

One can then install luvcview from AUR.

However, that didn't work for me either. I didn't feel like investigating at that point so I grabbed the source code from the URL given above in the Fedora section.

I then built it with make && make install as I had in Fedora. In Arch, a user of the webcam has to be in the video group. If the user name was john, you could do it thusly.
Code:

usermod -G video -a john

Now, the user john can use luvcview.
Code:

luvcview -f yuv

I also have a webcam that uses uvcvideo driver and I havent bothered with it yet. Let me know how it goes.


All times are GMT -5. The time now is 12:02 AM.