Веб-камера

multimedia/cheese        A Photobooth-inspired app for taking pictures and videos from webcam


 * Установил webcamd и pwcview

Чтобы узнать имя веб-камеры usbconfig ugen3.2:  at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

kldload snd_uaudio  uaudio1:  on usbus3 uaudio1: No playback! uaudio1: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format uaudio1: No midi sequencer pcm0:  on uaudio1 
 * Микрофон

Хз что за модуль, но без него - Could not open /dev/cuse. Did you kldload cuse4bsd? kldload cuse4bsd

Создание устройства /dev/video webcamd -d ugen3.2 -i 0 -v 0

echo 'webcamd_enable="YES"' >> /etc/rc.conf

video0 будет иметь владельца webcamd chown leksey:leksey /dev/video0

Просмотр pwcview -s vga

Вторая вебкамера webcamd -d ugen7.4 -i 0 -v 1 pwcview -s vga -d /dev/video8

 Linux video capture interface: v2.00 WARNING: You're using an obsolete driver! You shouldn't be using it! If you want anything new, you can use http://git.linuxtv.org/media_build.git. The tree is still here just to preserve the development history. benq: registered conex: registered etoms: registered finepix: registered gspca_gl860: driver startup - version 0.9d10 gspca_gl860: driver registered gspca: main v2.9.0 registered jeilinj: registered ALi m5602: registered mars: registered mr97310a: registered ov519: registered ov534: registered ov534_9: registered pac207: registered pac7302: registered pac7311: registered sn9c20x: registered sonixb: registered sonixj: registered spca500: registered spca501: registered spca505: registered spca506: registered spca508: registered spca561: registered sq905: registered sq905c: registered stk014: registered stv0680: registered STV06xx: registered sunplus: registered t613: registered tv8532: registered vc032x: registered zc3xx: registered pwc: Philips webcam module version 10.0.13 loaded. pwc: Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840. pwc: Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30, pwc: the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100. cpia2: V4L-Driver for Vision CPiA2 based cameras v2.0.0 em28xx driver loaded Em28xx: Initialized (Em28xx dvb Extension) extension pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner pvrusb2: Debug mask is 31 (0x1f) dib0700: loaded with support for 14 different device-types au0828 driver loaded b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully stv0680: registered SE401 usb camera driver version 0.24 registering DBG: usbvideo_register: Allocated $0x801232000 (4688. bytes) for 4. cameras DBG: usbvideo_register: Allocated cams[0].user_data=$0x801256bb0 (48. bytes) DBG: usbvideo_register: Allocated cams[1].user_data=$0x801256b80 (48. bytes) DBG: usbvideo_register: Allocated cams[2].user_data=$0x801256b50 (48. bytes) DBG: usbvideo_register: Allocated cams[3].user_data=$0x801256b20 (48. bytes)
 * v1.4:Konica Webcam driver

DBG: usbvideo_register: Allocated $0x801266b00 (1712. bytes) for 1. cameras DBG: usbvideo_register: Allocated cams[0].user_data=$0x801272e00 (200. bytes) DBG: usbvideo_register: Allocated $0x801273000 (4688. bytes) for 4. cameras DBG: usbvideo_register: Allocated cams[0].user_data=$0x801256af0 (48. bytes) DBG: usbvideo_register: Allocated cams[1].user_data=$0x801256ac0 (48. bytes) DBG: usbvideo_register: Allocated cams[2].user_data=$0x801256a90 (48. bytes) DBG: usbvideo_register: Allocated cams[3].user_data=$0x801256a60 (48. bytes)
 * Zoran 364xx

USB Video Class driver (v0.1.0) IR JVC protocol handler initialized IR LIRC bridge handler initialized IR NEC protocol handler initialized IR RC5(x) protocol handler initialized IR RC6 protocol handler initialized IR Sony protocol handler initialized lirc_dev: IR Remote Control driver registered, major 13 Attached ugen3.2[0] to cuse unit 0 uvcvideo: Found UVC 1.00 device (046d:0824) Creating /dev/video0

Основными чипами, используемыми в камерах являются uvc и gspca. Определить какой чип используется в вашем случае, можно на сайте производителя или опытным путем.
 * Чип камеры

речь о драйверах, gspca это более старый. Ему на смену пришел UVC USB video device class

If you intend to buy a Logitech webcam for use on Linux, the safest choice is a UVC camera, i.e. a webcam which is compliant to the UVC Video Class standard. The advantage is that UVC is an open standard with a well-maintained driver that is part of the kernel. This means that you can plug your camera and it will work without having to compile or install any drivers.

Выбор камеры

 * Сайт Логитеча специальный
 * Список камера для MacOS - это UVC-совместимые камеры.

 Интернет-камера Logitech "WebCam C100" 960-000555 (USB2.0) 	407.10 Интернет-камера Logitech "WebCam C160" 960-000658 с микрофоном (USB2.0) 	459.02 Интернет-камера Logitech "WebCam C210" 960-000657 с микрофоном (USB2.0) 	619.50 Интернет-камера Logitech "HD WebCam C270" 960-000636 с микрофоном, серый (USB2.0) 	781.16 Интернет-камера Logitech "HD WebCam C270" 960-000730 с микрофоном, синий, с рисунком (USB2.0) 	1 040.76 Интернет-камера Logitech "HD WebCam C270" 960-000726 с микрофоном, черный, с рисунком (USB2.0) 	1 040.76 Интернет-камера Logitech "HD WebCam C270" 960-000728 с микрофоном, розовый, с рисунком (USB2.0) 	1 040.76 Интернет-камера Logitech "HD WebCam C310" 960-000638 с микрофоном (USB2.0) 	1 301.54 Интернет-камера Logitech "HD WebCam C510" 960-000640 с микрофоном (USB2.0) 	1 505.68 Интернет-камера Logitech "WebCam Pro 9000 for Business" 960-000562 с микрофоном (USB2.0) 	1 847.88 Интернет-камера Logitech "B905 2MP Portable WebCam" 960-000565 с микрофоном (USB2.0) 	2 114.56 Интернет-камера Logitech "B910 HD WebCam for Business" 960-000684 с микрофоном (USB2.0) 	2 270.32 Интернет-камера Logitech "WebCam Pro 9000" 960-000483 с микрофоном (USB2.0) 	2 816.66 Интернет-камера Logitech "2-MP Portable Webcam C905" 960-000478 с микрофоном (USB2.0) 	2 829.64 Интернет-камера Logitech "HD Pro Webcam C910" 960-000642 с микрофоном (USB2.0) 	3 318.16 
 * Are the Newest C-series cams compatible with UVC
 * YES!

 Camera Name 	Model Number (M/N) 	Part Number (P/N) HD Webcam C270 	V-U0018 	860-000270 HD Webcam C310 	V-U0015 	860-000259 HD Webcam C510 	V-U0016 	860-000261 QuickCam Communicate Deluxe 	V-UBE43 	861235 QuickCam Communicate Deluxe (S7500) 	V-UBE43 	860-000107 QuickCam Communicate MP (S5500) 	V-UCR45 	860-000106 QuickCam Deluxe for Notebooks 	V-UBV49 	860-000009 QuickCam E3500 / E3560 	V-UCU56 	860-000095 QuickCam for Notebooks Pro 	V-UAR38 	861303 QuickCam Fusion 	V-UAR33 	861304 QuickCam Orbit AF / Sphere AF 	V-UCC22 	860-000063 QuickCam Orbit MP / Sphere MP 	V-UAY22 	861305 QuickCam Pro 5000 	V-UAX16 	861306 QuickCam Pro 9000 	V-UBM46 	861464 QuickCam Pro for Notebooks 	V-UBU48 	860-000026 QuickCam Ultra Vision 	V-UBH44 	861238 QuickCam Ultra Vision SE 	V-UBH44 	860-000023 QuickCam Vision Pro for Mac 	V-UBM46 	860-000143 Webcam C100 	V-U0013 	860-000244 Webcam C120 	V-U0012 	860-000237 Webcam C160 	V-U0011 	860-000277 Webcam C200 	V-U0011 	860-000206 Webcam C210 	V-U0019 	860-000295 Webcam C250 	V-U0003 	860-000180 Webcam C260 	V-U0018 	860-000297 Webcam C300 	V-U0004 	860-000184 Webcam C500 	V-U0006 	860-000177 Webcam C600 	V-U0007 	860-000174 Webcam C905 	V-UBU48 	860-000231 860-000287 Webcam Pro 9000 	V-U0009 	860-000109 860-000210 860-000228 

Проигрывание в Linux
vlc v4l2:///dev/video0

https://help.ubuntu.com/community/Webcam

UVC ls /dev/video* ls /dev/audio*

Попытка через SSH с Ubuntu
vlc v4l2:///dev/video0  VLC media player 1.0.6 Goldeneye [0x9f79088] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::begin: Paint device returned engine == 0, type: 1 [????????] x11 video output error: X11 request 138.1 failed with error code 10: BadAccess (attempt to access private resource denied) [????????] x11 video output notice: buggy X11 server claims shared memory [????????] x11 video output notice: support though it does not work (OpenSSH?) [????????] x11 video output error: X11 request 138.1 failed with error code 10: BadAccess (attempt to access private resource denied) 

Logitech
fcenter Webcam C160 Подключени dmesg uaudio0:  on uhub3 uaudio0: audio descriptors make no sense, error=4 device_attach: uaudio0 attach returned 6

fcenter Webcam C270 uaudio0:  on uhub3 uaudio0: audio descriptors make no sense, error=4 device_attach: uaudio0 attach returned 6

Ubuntu 10.4  [ 2828.692029] usb 1-8: new high speed USB device using ehci_hcd and address 5 [ 2828.957515] usb 1-8: configuration #1 chosen from 1 choice [ 2829.014777] Linux video capture interface: v2.00 [ 2829.044267] uvcvideo: Found UVC 1.00 device (046d:0824) [ 2829.084058] input: UVC Camera (046d:0824) as /devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0/input/input6 [ 2829.085063] usbcore: registered new interface driver uvcvideo [ 2829.085570] USB Video Class driver (v0.1.0) [ 2829.362758] usbcore: registered new interface driver snd-usb-audio 

R8.0  ugen3.2: at usbus3 uaudio1: <vendor 0x046d product 0x0824, class 239/2, rev 2.00/0.10, addr 2> on usbus3 uaudio1: No playback! uaudio1: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format uaudio1: No midi sequencer pcm1: <USB audio> on uaudio1 </PRE>

Try webcamd, it supports UVC drivers.

pwcview -s vga

pwcview просто дергает изображение с /dev/video0 и все.

chmod 666 /dev/video*

webcamd -d ugen4.2 -i 0 -v 0 Attached ugen4.2[0] to cuse unit 0 Cannot find USB device

Линуксовая поддержка
Установлено из портов:
 * cuse4bsd-kmod-0.1.11 Cuse4BSD character device loopback driver for userspace
 * pwcview-1.4.1_2 The Video4Linux PWC webcam viewer
 * webcamd-0.1.12 A port of Linux USB webcam and DVB drivers into userspace

Код: Выделить всё • Развернуть

g# cat /etc/rc.conf.local ...   webcamd_enable="YES"

USB Video Class (UVC) compatible camera device

Работа в Linux
UVC cameras work just fine with Ubuntu 10.04. Install guvcview to test your camera.

FreeBSD
http://www.rockafunk.org/ программаы работающие с веб-камеров во FreeBSD

Don't complain anymore that you can't use your webcam if you are using FreeBSD. Now we got the webcamd drivers en pwcview to view the webcam. But there are so much more programs that are working with webcamd, not only pwcview. On FreeBSD 8.0 release I have succesfully compiled the following programs:

* camorama * camserv * effectv * guvcview * luvcview * mencoder * mjpg_streamer * motion * mplayer * uvc_streamer * uvcview * wxcam * xawtv

Ссылки

 * http://forums.quickcamteam.net/forumdisplay.php?fid=4
 * http://www.quickcamteam.net/devices
 * http://opensource.creative.com/webcam.html
 * http://symmetrica.net/archive/reallinux.htm
 * http://www.ideasonboard.org/uvc/
 * http://mxhaard.free.fr/spca5xx.html
 * http://alpha.dyndns.org/ov511/cameras.html

howto
 * http://www.lissyara.su/articles/freebsd/tuning/webcam/