Kernel
Device Drivers --->
Multimedia devices --->
<*> Video For Linux
[ ] Enable Video For Linux API 1 (DEPRECATED)
[*] Enable Video For Linux API 1 compatible Layer
Device Drivers --->
Multimedia devices --->
[*] Video capture adapters --->
[*] V4L USB devices --->
<*> USB GSPCA driver
Device Drivers --->
Multimedia devices --->
[*] Video capture adapters --->
[*] V4L USB devices --->
<*> GSPCA based webcams --->
<*> ZC3XX USB Camera Driver
USE FLAGS: v4l and v4l2 are your friends, add them as a globals to make.conf
vi /etc/make.conf
v4l-info command will help view all configuration of your camera, install xawtv
emerge media-tv/xawtv
install ffmepg, enable codex you need, I recommend enable all flags
# emerge -pv ffmpeg These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-video/ffmpeg-0.5-r1 USE="3dnow 3dnowext X alsa amr bindist dirac encode faac faad gsm hardcoded-tables ieee1394 ipv6 jpeg2k mmx mmxext mp3 network oss schroedinger sdl speex ssse3 theora threads v4l v4l2 vdpau vhook vorbis x264 xvid zlib (-altivec) -custom-cflags -debug -doc -test" VIDEO_CARDS="nvidia" 0 kB
install libv4l package very important!
# emerge -pv libv4l These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-libs/libv4l-0.5.3 0 kB
install motion package to stream the video to the browser
# emerge -pv motion These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-video/motion-3.2.11.1 USE="ffmpeg mysql v4l -postgres" 0 kB
This will run the motion deamon and output the logs
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -n -d 99 2>&1 | tee motion-20060406.log