Planet of NCCUCS

[ubuntu] 安裝uvc webcam

作者:TaopaiC on 四月 26, 2008 Posted in RSS | | 觀看文章來源

前幾天買了一個新的webcam, 不幸的是 ubuntu 8.04 內附的 uvcvideo 並不支援, 需要更新的 uvcvideo 才能使用.
自己編譯其實不麻煩, 用svn下載新的程式碼,make,make install就可以收工了

壞消息是 uvcvideo 只支援新的 Linux 的 Video API: V4L2 (Video For Linux 2), 並不向下支援 V4L1 , 也就是說 camorama 等軟體都不能使用. 可以安裝 luvcview 測試有沒有安裝成功.

我買的是 Microsoft LifeCam VX-7000 , usb id 是 045e:0723 .

微軟網路攝影機 VX-7000 (銀) (含廣告推薦連結) PCHOME或是興奇購物都有賣, 評價請看國外這篇評論, 我是買了才看到評論 :( 價錢跟L社便宜不少, 但是效果… 也還好啦 /_\

uvcvideo 安裝過程

下載程式碼

如果沒有安裝svn的話, 請先
sudo apt-get install subversion
用 svn 下載新版程式碼
svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk

安裝kernel header

sudo apt-get install linux-headers-`uname -r`

改makefile

因為ubuntu放uvcvideo.so的位置和預設的不太一樣,需要修改一下安裝位置
INSTALL_MOD_DIR := usb/media
to
INSTALL_MOD_DIR := ubuntu/media/usbvideo

安裝

make install

重載 uvcvideo

sudo modprobe -r uvcvideo
sudo modprobe uvcvideo

應就可在dmesg看到

[46167.743036] uvcvideo: Found UVC 1.00 device Microsoft� LifeCam VX-7000 (045e:0723)
[46167.744808] uvcvideo: Failed to query (135) UVC control 1 (unit 0) : -32 (exp. 26).
[46167.754655] input: Microsoft� LifeCam VX-7000 as /devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/input/input15
[46167.779862] usbcore: registered new interface driver uvcvideo
[46167.779873] USB Video Class driver (SVN r205)

每次更新 kernel 時都要重新編譯安裝.. 直到內建的 uvcvideo 支援為止.

luvcview - uvc webcam 的觀看程式

sudo apt-get install luvcview

簡易使用

luvcview -d device
例如
luvcview -d /dev/video0

常用參數

-L 列出支援的格式
-l 列出支援的控制或設定
-s 影像大小 (寬x高)
-f 影像格式 (jpg, yuv)

其他就請看 luvcview -h

參考連結

:, , , , , , ,

讀過本文的讀者, 也對以下文章有興趣

No comments for this entry yet...

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

最新文章

照片

R0012028R0012036R0013553R0013551R0013550R0013549R0013560R0013558R0013569R0013561R0013570R0013571R0013580R0013581R0013556R0013567R0013563R0013572R0011783R0012312