This page and project comes from Takafumi Mizuno.
It would be great to add support to all pwc's supported cams. I don't really have time to search for them, but if you know where are cam's headers for compressed modes, please tell me !

Release (v0.06): 2006-01-31 added command line options for frame dump, dump interval, and no display


 USB Philips webcam Image Capture Programs 0.06 for NetBSD/FreeBSD

 This patches have been written by Takafumi Mizuno and Vincent Hourdin

Philips USB Cameras Utilities for NetBSD/FreeBSD
-----------------------------------------------

1. What is it?
	phpsshot ... simple image capture program ( output stdout PPM file )
	phpsview ... sequential image viewer program ( about 3fps, even with decompression )

2. What are supported USB camera?

	Vendor  Device  Product Name(Sensor name)
	------  ------  ----------------------------------
	0x046d  0x08b1  Logitech QuickCam Notebook Pro
	0x046d  0x08b2  Logitech QuickCam Pro 4000
	0x041e	0x400c	Creative Labs Webcam 5
	0x0471	0x0311	Philips ToUCam Pro

	Maybe a camera that has a same CCD will work. 

	Same CCD cameras
	- Logitech QuickCam Pro 3000
	- Logitech QuickCam Zoom
	- Logitech QuickCam Zoom(new model)
	- Logitech QuickCam Orbit/Sphere
	- Creative Labs Webcam Pro Ex
	- Samsung MPC-C30
	- Visionite VCS-UC300


2. How to compile?
 a) Check your system.
	I tested below:
		NetBSD 1.6.2 and NetBSD 2.0.2
	I caught reports below:
		FreeBSD 5.2-RC(03/12/27)
	phpsview requires below:
		- gtk+-1.2.?? ( I tested 1.2.10 )
		- imlib 1.9.?? ( I tested 1.9.14 and 15 )

    - for NetBSD and Model that has a built-in microphone users.
        NetBSD Generic kernel configured Qcam Pro 4000 as uaudio(4).
        because it has a built-in microphone.
        You may rebuild a kernel without uaudio(4) or apply a patch below 
        that configured Qcam Pro 4000(and Notebook Pro) as ugen(4).

        Patch file for NetBSD 1.6.2_RC3 (you can do the same to other versions).
	For example:
		cd /usr/src/sys
		cat ${YOUR_DOWNLOAD_DIR}/phpsview-netbsd-sys-1.6.2.diff | patch -p0
		cd dev/usb
		make -f Makefile.usbdevs
		cd ../../arch/i386/conf
		config GENERIC
		cd ../compile/GENERIC
		make depend
		make
		make install
	 and reboot.

 b1) Download Linux Philips USB webcams driver and BSD patch:
 	from http://www.saillard.org/linux/pwc/ :
	'pwc-10.0.5.tar.bz2' is supported by this (0.04) patch.
	'pwc-10.0.5.tar.bz2' is supported by this (0.05) patch.
	'pwc-10.0.5.tar.bz2' is supported by this (0.06) patch.
	from http://www.smcc.demon.nl/webcam/
	'pwc-9.0.2.tar.gz' is supported by this (0.03) patch. (deprecated, no vga)
	'pwc-8.12.tar.gz' is supported by takaM patch. (deprecated, no vga)

 b2) Download tarball and go to d):
	from pwc-10.0.5-bsd-0.06.tar.gz
	from pwc-10.0.5-bsd-0.05.tar.gz

 c) Extract and Applied patch.
 	for example:
	% tar -zxvf ${YOUR_DOWNLOAD_DIR}/pwc-10.0.5.tar.gz
        % gzip -dc pwc-10.0.5-bsd-0.04.patch.gz | patch -p0

 d) Do make
        % cd pwc-10.0.5/ or cd pwc-9.0.2/2.4/ or pwc-8.12/2.4/
        % make -f Makefile.phpsshot
        % su root -c 'make -f Makefile.phpsshot install'
        % make -f Makefile.phpsview
        % su root -c 'make -f Makefile.phpsview install'

3. How to use?
3.1. phpsshot
 a) usage: phpsshot [devname]

    for Example.
        % phpsshot > output.ppm

	% phpsshot | ppmtojpeg > output.jpg

 b) Command line options.
     [devname]       specify ugen device name. ex. /dev/ugen0.00

     If no device file is specified, the program will cycle through the
     /dev/ugen0, /dev/ugen1, ... devices until it finds an attached Philips webcam.

3.2. phpsview
 a) usage: phpsview [-n] [devname] [resolution] [filename] [-ddump_interval]

    for Example.
	% phpsview
	% phpsview -d5000 tutu.pnm 160x120 /dev/ugen0.00 -n

 b) Command line options.
     [-n]		no display. does not open the window (can be used with dump).
     [devname]		specify ugen device name. ex. /dev/ugen0.00
     [resolution]	specify capture resolution. ex. 320x240
     [filename]		specify a file where a frame will be dumped (pnm format)
     [-ddump_interval]	set dump interval to filename if specified (milliseconds arg, default 1000ms).

     If no device file is specified, the program will cycle through the
     /dev/ugen0, /dev/ugen1, ... devices until it finds an attached Philips webcam.


-----------------------------------------------
References:
	Original author
	http://www2.starcat.ne.jp/~takam/bsd/NetBSD.html
	
	Linux driver for Philips webcam
	USB and Video4Linux interface part.
	(C) 1999-2003 Nemosoft Unv.
	http://www.smcc.demon.nl/webcam/
	Free pwc from Luc Saillard :
	http://www.saillard.org/linux/pwc/

	GNU/Linux OS Driver for the Quickcam Express
	http://qce-ga.sourceforge.net/

        NetBSD/FreeBSD Simple OV511 video capture program, version 1.0
        http://members.home.com/housel/projects.htm
-----------------------------------------------
Problems and Questions:
 a) Builtin microphone is not used.

 b) Low performace, because those programs aren't device driver.

 c) There are header bit streams that I don't know.

 d) Other Philips cameras (PCA645/646, PCVC675/680/690) ware not worked.
	I can't understand to VSYNC at above cameras.

-----------------------------------------------
History:
2003-09-12 0.01 First release
2003-12-30 0.02 support Linux driver for Philips webcam pwc-8.12,
    add man pages, add FreeBSD-5 support, add Qcam for Notebook pro
2004-10-30 0.03 support for pwc-9.0.2
2004-11-25 0.04 support for pwc-10.0.5 with decompression (supports vga size)
2005-12-24 0.05 added command line options to specify resolution
2006-01-31 0.06 added command line options for frame dump, dump interval, and no display 
-----------------------------------------------
Credits:
Thanks to GNU/Linux OS Driver for the Philips webcam developers.
Thanks to everyone who has tested this program and given me feedback on it.
-----------------------------------------------

written by Takafumi Mizuno and rewritten by Vincent Hourdin.

Back to vinvin's projects