banner



How To Check Camera In Linux Console

A capture from a webcam in the program Cheese

You want to set upwards your webcam with Linux, see a video stream from information technology and learn which applications yous can use with it, right? Then this article is for you.

Contents

  • 1 Try it
  • 2 Install cheese
  • 3 Bank check the Setup
  • 4 Troubleshooting
    • 4.1 SUSE Linux 11.0 and earlier
    • 4.2 Ubuntu
    • iv.3 Other webcams
  • 5 Utilise it
    • 5.ane tape video
    • v.2 video conferencing
    • 5.3 sentinel information technology
  • vi Testbed
  • 7 See as well

Attempt it

Offset permit's endeavor if it works out of the box, so, connect your webcam (if it'south not inbuilt), open a terminal and commencement the application cheese :

cheese        

This should switch on your webcam and you should see what it'southward recording.

Ok, you are reading on, then at that place is still something left, possibly:

  • terminal says "command not found", y'all need to install cheese. Read on at Install Cheese.
  • cheese does not show the camera's content -> read on at Check the Setup.
  • you want to #record_a_video with your webcam.

Install cheese

To install cheese, you need to know your distribution. Hither is how to find out your distribution.

  • for Debian, Raspbian, Ubuntu, Kubuntu, Flubuntu, Xubuntu, GEUbuntu, Edubuntu, ...:
sudo apt-get install cheese        
  • for SUSE:
yast -i cheese        

Check the Setup

If cheese starts, but does not find a webcam, yous need to dig deeper.

  • open a console and listing your video4linux devices:
ls -ltr /dev/video*        
  • you will find an output like this:
crw-rw----+ i root video 81, 0 Nov 11 09:06 /dev/video0        

In this case your webcam device is named /dev/video0. If y'all have no /dev/video file, read #Troubleshooting. If you have several video4linux devices, for example a telly card your webcam may evidence upwards every bit /dev/video1 or whatsoever. But the fourth dimension (in this case Nov xi 09:06) will be the time when y'all plugged it in.

You tin can also test your webcam the following ways:

  • if you lot have vlc installed you can start it and choose Media -> Open up Capture Device -> Video device proper name = /dev/video0 -> Play
  • if you lot have mplayer installed y'all can use the command
mplayer tv:// -tv driver=v4l2:width=640:top=480:device=/dev/video0 -fps thirty        

Troubleshooting

Troubleshooting heavily depends on the distribution and version you are using. If you take done cabling correctly and a device file /dev/video* does not announced, your kernel probably does not know the hardware. In this case y'all may have to install the device driver separately because it may not exist part of the kernel.

SUSE Linux 11.0 and earlier

This has been tested with SUSE Linux eleven.0 x64 only should work with any earlier SUSE version. Y'all will need to log in every bit user root. To find out what driver you lot need, open a console and call

hwinfo --usb        

If a Logitech Quickcam Messenger is plugged in the answer volition be like:

06: USB 00.two: 0000 Unclassified device   [Created at usb.122]                   UDI: /org/freedesktop/Hal/devices/usb_device_46d_8da_noserial_if2   Unique ID: Eopr.vE+cdFBwClB                                         Parent ID: uIhY.uOe2OKugI8D                                         SysFS ID: /devices/pci0000:00/0000:00:1a.2/usb3/3-1/3-1:ane.2         SysFS BusID: iii-ane:1.2                                                Hardware Course: unknown                                             Model: "Logitech QuickCam Messanger"                                Hotplug: USB                                                        Vendor: usb 0x046d "Logitech, Inc."                                 Device: usb 0x08da "QuickCam Messanger"                             Revision: "1.00"                                                    Commuter: "snd-usb-sound"                                             Driver Modules: "snd_usb_audio"                                     Speed: 12 Mbps                                                      Module Alias: "usb:v046Dp08DAd0100dc00dsc00dp00ic01isc02ip00"       Driver Info #0:                                                       Commuter Condition: quickcam_messenger is active          Driver Activation Cmd: "modprobe quickcam_messenger"          Commuter Info #1:                                                       Driver Condition: gspca is agile                                      Driver Activation Cmd: "modprobe gspca"   Config Status: cfg=new, avail=yes, need=no, agile=unknown          Attached to: #20 (Hub)        

This means you tin install and load the webcam driver like this:

yast -i gspcav-kmp-default modprobe gspca        

Now you should run across a video device:

ls /dev/video* /dev/video  /dev/video0        

That means you tin can install and kickoff your webcam-viewer-software. We choose gqcam:

yast -i gqcam gqcam        

It works. You see a video what from what is going on in front of your webcam.

Ubuntu

This has been tested with Ubuntu viii.x x32 but should work with any Ubuntu version. Detect out the driver activation control of your webcam. For this, first install the software hwinfo. Open a console and blazon:

sudo apt-become install hwinfo        

Then call hwinfo:

hwinfo --usb        

If a Logitech Quickcam Messenger is plugged in the response will be like: <source highlight=20> 04: USB 00.2: 0000 Unclassified device

          [Created at usb.122]  UDI: /org/freedesktop/Hal/devices/usb_device_46d_8da_noserial_if2  Unique ID: 4ajv.vE+cdFBwClB  Parent ID: k4bc._Mkd+LmXb03  SysFS ID: /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb1/i-i/one-ane:i.two  SysFS BusID: 1-1:ane.2  Hardware Grade: unknown  Model: "Logitech QuickCam Messanger"  Hotplug: USB  Vendor: usb 0x046d "Logitech, Inc."  Device: usb 0x08da "QuickCam Messanger"  Revision: "1.00"  Driver: "snd-usb-sound"  Driver Modules: "snd_usb_audio"  Speed: 12 Mbps  Module Alias: "usb:v046Dp08DAd0100dc00dsc00dp00ic01isc02ip00"  Driver Info #0:    Driver Status: gspca_zc3xx is active    Driver Activation Cmd: "modprobe gspca_zc3xx"  Config Status: cfg=new, avail=yep, demand=no, active=unknown  Attached to: #8 (Hub)</source>        

Activate the driver:

sudo modprobe gspca_zc3xx        

Now y'all should be able to encounter the video device:

ls /dev/video* /dev/video0        

You can now test your webcam using the software cheese:

sudo apt-get install cheese cheese        

Other webcams

If you have another webcam, attempt the above yet. If information technology does not work, substitution the driver gspca against uvcvideo:

yast -i uvcvideo_kmp_default modprobe uvcvideo        

and starting time gqcam over again.

Employ it

tape video

to capture video streams you can use cheese, a nice plan with a graphical user interface. It allows you to sentinel and record your camera output at the same time. It stores in a strange format (.webm), but vlc can play this.

Yous can too automate video recording so y'all can capture the camera stream with sitting in front of the computer. To do this you tin can

  • use the software mencoder:
mencoder tv:// -tv driver=v4l2:width=320:meridian=240:device=/dev/video0 -nosound -ovc lavc -o myvideo.avi        
  • or employ the software streamer, example:
streamer -c /dev/video0 -f jpeg -F stereo -o myvideo.avi -t 0:05        

video conferencing

  • to practice video conferencing, utilize skype under Linux.

lookout man information technology

To scout your photographic camera's input, use cheese or mplayer:

mplayer -fps 30 -cache 128 -tv commuter=v4l2:width=640:summit=480:device=/dev/video0 television://        

Or utilise vlc. You lot can run vlc as root by the mode. To watch your webcam /dev/video0, commencement vlc and select Media -> Open up Capture Device -> Video device proper noun = /dev/video0 -> Play

Testbed

The following webcams have been found working with this tutorial:

  • Logitech Quickcam messenger
  • Philips Webcam SPC220NC

A general list of working webcams can exist found at http://mxhaard.complimentary.fr/spca5xx.html.

The guide has been tested with SUSE Linux 11.iv till 13.2 and Ubuntu.

See also

  • hardware
  • http://en.opensuse.org/Webcam
  • http://world wide web.linux.com/characteristic/126186
  • http://ubuntulinuxhelp.com/linux-commuter-for-quickcam-usb-cameras-logitech-quickcam-fusion/
  • http://world wide web.goldmann.de/webcam-linux_tipp_408.html
  • http://wiki.ubuntuusers.de/Webcam

Source: http://www.linuxintro.org/wiki/Set_up_a_Webcam_with_Linux

Posted by: cabralbarbence.blogspot.com

0 Response to "How To Check Camera In Linux Console"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel