Camera Focus made Easy

Did quite a bit of research on turning off auto focus but this makes it easier for people that just need brass tax.

Open SSH to your Raspberry Pi, I like MobaXTerm (if you haven't used it, your welcome :slight_smile:

With autofocus on, set your camera up where you want it.

sudo v4l2-ctl --get-ctrl=focus_absolute

--This tells you what your focus is at, it's important for the third command.

sudo v4l2-ctl --set-ctrl=focus_auto=0
sudo v4l2-ctl --set-ctrl=focus_absolute=##number from first command##

Next you have to write it to your startup or it will be written over on reboot.

sudo nano home/pi/mpeg-streamer/

right under their explanation of the file, put in your commands, here are mine.

sudo v4l2-ctl --set-ctrl=focus_auto=0
sudo v4l2-ctl --set-ctrl=focus_absolute=380

Hit crtl+x to save document