手元にあるBuffaloの
2.0Mega Pixcel web cameraで遊んでみようと
思って自作2号機に取り付けてみました。
/usr/ports/multimedia/webcamdをインストールします。webcamdと一緒にcuse4bsdがインストールされます。
インストール後は以下の設定をします。
*********************************************************************
1) webcamd requires the cuse4bsd kernel module, please load this
by doing
# kldload cuse4bsd
or adding
cuse4bsd_load="YES"
to your /boot/loader.conf.
2) Please restart devd as the configuration changed
# /etc/rc.d/devd restart
*********************************************************************
で、この後は、
Dreamcraft2# kldload cuse4bsd
Dreamcraft2# webcamd &
Attached ugen7.2[0] to cuse unit 0
Creating /dev/video0
それから、ビューワーをインストールしましょう。
Dreamcraft2# cd /usr/ports/multimedia/pwcview
ビューワーのインストールが終わったら、pwcviewを起動します。
こんな感じで動いていればOKです。
pwcviewのヘルプは以下のとおりです。
Dreamcraft2# man pwcview
Formatting page, please wait...Done.
PWCVIEW(1) FreeBSD General Commands Manual PWCVIEW(1)
NAME
pwcview -- view video, create jpeg snapshots and alter settings of a web-
cam controlled by the pwc(4) driver.
SYNOPSIS
pwcview [options]
DESCRIPTION
The pwcview utility is used to view the video, create jpeg snapshots, and
alter the settings of a webcam controlled by the pwc(4) driver.
COMMAND LINE OPTIONS
General options:
-? Display help message
-h Run pwcview in headless mode (without the gui)
-p Enable webcam snapshot button (only works with the
FreeBSD pwc driver and not with all cameras)
-k Add time date string to picture.
Device options:
-d device Selects the video device to open. The default is
/dev/video0
-s size Sets the webcam's video size. The default is sif. Can be
one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or 'vga',
for an image size of resp. 128x96, 160x120,
176x144,320x240, 352x288 and 640x480 (of course, only for
those cameras that support these resolutions).
-f fps Sets the webcam's frame rate. The default is 5. Should
be in the range of 5-30.
JPEG output options:
-c count Number of automatic jpeg snapshots to take. Set this to
-1 for unlimited automatic jpeg snapshots. The default is
0
-i interval Automatic jpeg snapshot interval in milliseconds. The
default is 3000
-q quality Quality of jpeg output images, range 0-100. The default
is 75
-o outfile Filename of the jpeg output images. This is a string that
is passed to the strftime(3) function and thus can con-
tain the format specifiers as documented in the strf-
time(3) man page. The default is /tmp/%Y%m%d%H%M%S.jpg