I was having trouble getting mjpg_streamer to work on the 3.18 kernel, but this worked for me.
Note: "uvcdynctrl" is not mandatory for install, it is just a useful little tool that will read out the supported resolutions, frame rates, file formats that are supported by your webcam. This is handy when you are sorting out the best set up for your webcam.
to run just: uvcdynctrl -f
sudo apt-get install subversion
sudo apt-get install libjpeg8-dev
sudo apt-get install imagemagick
sudo apt-get install libv4l-0
sudo apt-get install libv4l-dev
sudo apt-get install uvcdynctrl
sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
extraxt zip to:
make USE_LIBV4L2=true clean all
sudo make install
to initialize run this from /mjpg-streamer-experimental:
sudo ./mjpg_streamer -i "./input_uvc.so -f 24 -r 432x240" -o "./output_http.so -w ./www"
access on client:
record stream on VLC:
media -> open network stream
enter network URL: http://ip.address.here:8080/?action=stream
change option from "play" to "stream"
source, change nothing,press next
destination setup, add file -> give your file a name, press next
transcodin options, use "video - H.264 + MP3 (MP4)", press next
option setup, press stream
OK, now you are streaming to vlc and can record and stop recording at any time, no need to restart or change anything until next powerdown.