<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://munkjensen.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi_-_Disable_webcam_autofocus</id>
	<title>Raspberry Pi - Disable webcam autofocus - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://munkjensen.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi_-_Disable_webcam_autofocus"/>
	<link rel="alternate" type="text/html" href="https://munkjensen.net/wiki/index.php?title=Raspberry_Pi_-_Disable_webcam_autofocus&amp;action=history"/>
	<updated>2026-04-23T23:41:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://munkjensen.net/wiki/index.php?title=Raspberry_Pi_-_Disable_webcam_autofocus&amp;diff=1461&amp;oldid=prev</id>
		<title>Admin at 09:15, 9 June 2020</title>
		<link rel="alternate" type="text/html" href="https://munkjensen.net/wiki/index.php?title=Raspberry_Pi_-_Disable_webcam_autofocus&amp;diff=1461&amp;oldid=prev"/>
		<updated>2020-06-09T09:15:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:15, 9 June 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if you want to check that your changes are permanent, do a restart and see the current values with &amp;#039;&amp;#039;sudo v4l2-ctl -l&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if you want to check that your changes are permanent, do a restart and see the current values with &amp;#039;&amp;#039;sudo v4l2-ctl -l&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:RaspBerry Pi]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:OctoPrint]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://munkjensen.net/wiki/index.php?title=Raspberry_Pi_-_Disable_webcam_autofocus&amp;diff=1459&amp;oldid=prev</id>
		<title>Admin at 09:13, 9 June 2020</title>
		<link rel="alternate" type="text/html" href="https://munkjensen.net/wiki/index.php?title=Raspberry_Pi_-_Disable_webcam_autofocus&amp;diff=1459&amp;oldid=prev"/>
		<updated>2020-06-09T09:13:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:13, 9 June 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# open a window with your octoprint camera and fine tune the focus..&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# open a window with your octoprint camera and fine tune the focus..&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# so enter sudo &amp;#039;&amp;#039;v4l2-ctl --set-ctrl=focus_absolute=70&amp;#039;&amp;#039; and change the number until the focus is ok&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# so enter sudo &amp;#039;&amp;#039;v4l2-ctl --set-ctrl=focus_absolute=70&amp;#039;&amp;#039; and change the number until the focus is ok&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;now, &lt;/del&gt;you have your two commands that fine tune your camera. In order to run them every time raspberry open, you have to add them to rc.local file:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Now &lt;/ins&gt;you have your two commands that fine tune your camera. In order to run them every time raspberry open, you have to add them to rc.local file&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. You can do that using the &quot;vi&quot; text editor like this&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Enter &lt;/ins&gt;&#039;&#039;sudo vi /etc/rc.local&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a) enter &lt;/del&gt;&#039;&#039;sudo vi /etc/rc.local&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;then go to line last line &quot;exit 0&quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;then go to line last line &quot;exit 0&quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Press &lt;/ins&gt;shift+O and write your two commands (you can copy and paste with left click)..&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;b) press &lt;/del&gt;shift+O and write your two commands (you can copy and paste with left click)..&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- If you mess up something press &amp;#039;&amp;#039;esc&amp;#039;&amp;#039; and &amp;#039;&amp;#039;:q!&amp;#039;&amp;#039; to quit&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- If you mess up something press &amp;#039;&amp;#039;esc&amp;#039;&amp;#039; and &amp;#039;&amp;#039;:q!&amp;#039;&amp;#039; to quit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://munkjensen.net/wiki/index.php?title=Raspberry_Pi_-_Disable_webcam_autofocus&amp;diff=1458&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;See this guide https://community.octoprint.org/t/anyway-to-disable-the-autofocus-for-cameras/801/23  &#039;&#039;&#039;I made a copy of it here:&#039;&#039;&#039;  # Install putty if you are in windows. Th...&quot;</title>
		<link rel="alternate" type="text/html" href="https://munkjensen.net/wiki/index.php?title=Raspberry_Pi_-_Disable_webcam_autofocus&amp;diff=1458&amp;oldid=prev"/>
		<updated>2020-06-09T09:09:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;See this guide https://community.octoprint.org/t/anyway-to-disable-the-autofocus-for-cameras/801/23  &amp;#039;&amp;#039;&amp;#039;I made a copy of it here:&amp;#039;&amp;#039;&amp;#039;  # Install putty if you are in windows. Th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;See this guide https://community.octoprint.org/t/anyway-to-disable-the-autofocus-for-cameras/801/23&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;I made a copy of it here:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# Install putty if you are in windows. This will let you enter the files inside raspberry pi.&lt;br /&gt;
# At tab session and Host Name field add octopi.local or your raspberry ip (you can find this in your router&amp;#039;s page 192.168.1.1..and it will be something like 192.168.1.X), choose SSH, port 22, Open&lt;br /&gt;
# username is default &amp;quot;pi&amp;quot;, and password &amp;quot;raspberry&amp;quot;&lt;br /&gt;
# you have to go to folder mjpg-streamer, so you enter the command cd mjpg-streamer/&lt;br /&gt;
# now enter &amp;#039;&amp;#039;sudo v4l2-ctl --set-ctrl=focus_auto=0&amp;#039;&amp;#039; to disable auto focus&lt;br /&gt;
# open a window with your octoprint camera and fine tune the focus..&lt;br /&gt;
# so enter sudo &amp;#039;&amp;#039;v4l2-ctl --set-ctrl=focus_absolute=70&amp;#039;&amp;#039; and change the number until the focus is ok&lt;br /&gt;
# now, you have your two commands that fine tune your camera. In order to run them every time raspberry open, you have to add them to rc.local file:&lt;br /&gt;
&lt;br /&gt;
a) enter &amp;#039;&amp;#039;sudo vi /etc/rc.local&amp;#039;&amp;#039;, then go to line last line &amp;quot;exit 0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
b) press shift+O and write your two commands (you can copy and paste with left click)..&lt;br /&gt;
&lt;br /&gt;
- If you mess up something press &amp;#039;&amp;#039;esc&amp;#039;&amp;#039; and &amp;#039;&amp;#039;:q!&amp;#039;&amp;#039; to quit&lt;br /&gt;
&lt;br /&gt;
- If you are fine press &amp;#039;&amp;#039;esc&amp;#039;&amp;#039; and &amp;#039;&amp;#039;:wq&amp;#039;&amp;#039; to save&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;some extra info:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
if you set &amp;#039;&amp;#039;focus_auto&amp;#039;&amp;#039; to 1 and let the webcam focus an object in the center you can take the &amp;quot;perfect&amp;quot; focus value... and then &amp;#039;&amp;#039;focus_auto&amp;#039;&amp;#039; to 0... but which is this value?&lt;br /&gt;
&lt;br /&gt;
Run the command &amp;#039;&amp;#039;sudo v4l2-ctl -l&amp;#039;&amp;#039; and you can find a line something like this :&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;#039;&amp;#039;focus_absolute (int) : min=0 max=250 step=5 default=8189 value=50&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In this case the &amp;quot;perfect&amp;quot; value is 50 - you can play with the other listed settings too..(like contrast with sudo &amp;#039;&amp;#039;v4l2-ctl --set-ctrl=contrast=200&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
if you want to check that your changes are permanent, do a restart and see the current values with &amp;#039;&amp;#039;sudo v4l2-ctl -l&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>