guysoft/OctoPi — pull request #7 by foosel (2013-08-11 12:16:43+00:00)
Title: Support both USB and RasPi webcams

Adjusted the webcamDaemon script to auto-detect whether an USB or a RasPi webcam is available. Also introduced a config file `octopi.txt` in `/boot` which is also accessible when mounting the SD under windows and allows adjusting the parameters used for calling MJPG Streamer and also to specify which camera to use if auto detection is not desired.

I had some hiccups with this additional file that might have been caused by my SD card though -- editing it under win and then saving caused some weird error, second save worked but then the Pi did not boot any more from the card. I couldn't properly reproduce this and -- as I said -- I'm not entirely sure if I'm doing something fundamentally wrong with this file or if the SD just is a bit wonky.

Also added a couple of lines to the chroot-script that will add the necessary config options to `/boot/config.txt` to enable the raspicam support, so this should not be needed as a separate step any more. If you feel comfortable with the changes, I think it should be possible to merge the whole branch into the mainline and allow raspicam and USB webcams to coexist peacefully with these changes :)