I've just started 3D printing, and moved to octoprint after a week or so. I had an old camera that I was using with motion on a rpi setup just to look at my prints as they went along, but as I had the rpi and it can also do timelapses I thought I might as well move to octoprint.
However, my camera is not supported by octoprint - it keeps reporting an incorrect pixel format. But I know the camera works with raspbian, so I thought I'd give my solution here for other newbies:
I used this to install motion via SSH:
And then I changed the webcamera streaming location in octoprint to my camera that I could see - 192.168.1.XXX:PORTNUMBER, and hey presto, octoprint saw the feed from my camera.
However, it all stopped working today - I had filled up my SD card with images from motion in /var/lib/motion/, so I had to create a cronjob to delete unwanted images:
sudo cronjob -e will open up cron to run as root
and then add this at the bottom:
*/2 * * * * find /var/lib/motion/ -mmin +1 -delete
which deletes all files older than a minute in /var/lib/motion/ every 2 mins
This keeps the amount of files low and I can print fine it seems.