Capture and broadcast video from web cam

view story

http://unix.stackexchange.com – I have server on Debian 6, without Desktop Environment and I have simple web camera. Web camera is defined like /dev/video0, so I can use cat /dev/video0 > ~/photo to get image from it (of course this is not correct way :)) I want to capture, convert and broadcast video stream by HTTP, or can I make common IP web cam? (HowTos)