Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.
First install motion
:
~> sudo apt-get install motion
Then create a config file:
~> mkdir ~/.motion
~> nano ~/.motion/motion.conf
In it, the bare minimum to run a web server and view it on other computers:
webcam_port 8081
webcam_localhost off
Then run motion:
~> motion
Now you can view the webcam at http://hostname:8081 If it doesn't work, try rebooting between steps or something.
Isn't that easy? >:(
See also: How to run webcam software only when I am not home
Anyone know how to make motion serve up single snapshots, on-demand, via URL? host:port/0/action/snapshot successfully results in generating the snapshot, saving it in /var/lib/motion, but it doesn't seem to actually serve up the resulting image (i.e. lastsnap.jpg) to the browser. This seems like a pretty basic feature, but I've searched a couple hours now and can't seem to find any evidence it is supported in motion.