<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Motion</id>
	<title>Motion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Motion"/>
	<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Motion&amp;action=history"/>
	<updated>2026-10-23T04:47:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=4879&amp;oldid=prev</id>
		<title>Leo at 22:02, 14 June 2020</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=4879&amp;oldid=prev"/>
		<updated>2020-06-14T22:02:27Z</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 22:02, 14 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-l172&quot;&gt;Line 172:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 172:&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;{{Navbox Linux}}[[Category:Linux]]&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;{{Navbox Linux}}[[Category:Linux]]&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:LinuxUtilities]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-3693:rev-4879:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=3693&amp;oldid=prev</id>
		<title>Leo: Text replacement - &quot;Category:Linux{{Navbox Linux}}&quot; to &quot;{{Navbox Linux}}Category:Linux&quot;</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=3693&amp;oldid=prev"/>
		<updated>2019-09-01T06:22:10Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;&lt;a href=&quot;/wiki/Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Category:Linux&lt;/a&gt;{{Navbox Linux}}&amp;quot; to &amp;quot;{{Navbox Linux}}&lt;a href=&quot;/wiki/Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Category:Linux&lt;/a&gt;&amp;quot;&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 06:22, 1 September 2019&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-l171&quot;&gt;Line 171:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 171:&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;}}&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;}}&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;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; 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;[[Category:Linux]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Navbox Linux}}&lt;/del&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;{{Navbox Linux}}&lt;/ins&gt;[[Category:Linux]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-3325:rev-3693:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=3325&amp;oldid=prev</id>
		<title>Leo: Text replacement - &quot;Category:Linux&quot; to &quot;Category:Linux{{Navbox Linux}}&quot;</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=3325&amp;oldid=prev"/>
		<updated>2019-09-01T05:08:19Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;&lt;a href=&quot;/wiki/Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Category:Linux&lt;/a&gt;&amp;quot; to &amp;quot;&lt;a href=&quot;/wiki/Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Category:Linux&lt;/a&gt;{{Navbox Linux}}&amp;quot;&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 05:08, 1 September 2019&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-l171&quot;&gt;Line 171:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 171:&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;}}&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;}}&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;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; 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;[[Category:Linux]]&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;[[Category:Linux]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Navbox Linux}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-1952:rev-3325:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=1952&amp;oldid=prev</id>
		<title>Leo: /* Multiple Instances, Multiple Cameras */</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=1952&amp;oldid=prev"/>
		<updated>2017-03-06T00:09:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Multiple Instances, Multiple Cameras&lt;/span&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 00:09, 6 March 2017&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-l155&quot;&gt;Line 155:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 155:&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;}}&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;}}&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;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; 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;Create these 3 files for each individual instance.&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;Create these 3 files for each individual instance &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;you desire, then reload systemd and enable/start the service&lt;/ins&gt;.&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;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;== Troubleshooting / Issues ==&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;== Troubleshooting / Issues ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-1951:rev-1952:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=1951&amp;oldid=prev</id>
		<title>Leo: Created page with &quot;Motion is a daemon that captures images and videos from a Video4Linux compatible webcam.  This page will go over the steps to set up motion on a Raspberry Pi running ArchLinux...&quot;</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Motion&amp;diff=1951&amp;oldid=prev"/>
		<updated>2017-03-06T00:08:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Motion is a daemon that captures images and videos from a Video4Linux compatible webcam.  This page will go over the steps to set up motion on a Raspberry Pi running ArchLinux...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Motion is a daemon that captures images and videos from a Video4Linux compatible webcam.&lt;br /&gt;
&lt;br /&gt;
This page will go over the steps to set up motion on a Raspberry Pi running ArchLinux.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# pacman --noconfirm -S motion&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The package doesn&amp;#039;t seem to come with systemd service files.  You may need to create it manually:&lt;br /&gt;
&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# cat &amp;lt;&amp;lt;EOF &amp;gt; /usr/lib/systemd/system/motion.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Motion web cam server&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/motion&lt;br /&gt;
Restart=always&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# chmod 644 /usr/lib/systemd/system/motion.service&lt;br /&gt;
# systemctl daemon-reload&lt;br /&gt;
# systemctl enable motion&lt;br /&gt;
# systemctl start motion&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
Edit the configuration file at {{code|/etc/motion/motion.conf}}.&lt;br /&gt;
&lt;br /&gt;
The important fields are:&lt;br /&gt;
* videodevice &lt;br /&gt;
* width &lt;br /&gt;
* height&lt;br /&gt;
* target_dir&lt;br /&gt;
&lt;br /&gt;
Motion can be configured to monitor multiple cams per instance (one per each thread). However, this is very flaky for me on a Raspberry Pi and causes corrupt/mangled images or causes webcams to disconnect. &lt;br /&gt;
&lt;br /&gt;
If you plan on monitoring multiple cameras, I suggest running multiple instances of motion each recording one webcam discussed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Single Instance, Multiple Cameras ===&lt;br /&gt;
Specify each camera in its own individual thread file in {{code|motion.conf}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Multiple Instances, Multiple Cameras ===&lt;br /&gt;
Create an individual {{code|motion.conf}} file for each instance. My configs for the Raspberry Pis are:&lt;br /&gt;
&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# cat /etc/motion/motion1.conf&lt;br /&gt;
daemon off&lt;br /&gt;
process_id_file /var/run/motion/motion1.pid&lt;br /&gt;
setup_mode off&lt;br /&gt;
roundrobin_frames 1&lt;br /&gt;
roundrobin_skip 1&lt;br /&gt;
switchfilter off&lt;br /&gt;
threshold 0&lt;br /&gt;
threshold_tune off&lt;br /&gt;
noise_level 32&lt;br /&gt;
noise_tune on&lt;br /&gt;
despeckle EedDl&lt;br /&gt;
smart_mask_speed 0&lt;br /&gt;
lightswitch 0&lt;br /&gt;
minimum_motion_frames 1&lt;br /&gt;
pre_capture 0&lt;br /&gt;
post_capture 0&lt;br /&gt;
gap 60&lt;br /&gt;
max_mpeg_time 1800&lt;br /&gt;
output_all off&lt;br /&gt;
output_normal on&lt;br /&gt;
output_motion off&lt;br /&gt;
quality 75&lt;br /&gt;
ppm off&lt;br /&gt;
ffmpeg_cap_new on&lt;br /&gt;
ffmpeg_cap_motion off&lt;br /&gt;
ffmpeg_timelapse 0&lt;br /&gt;
ffmpeg_timelapse_mode hourly&lt;br /&gt;
ffmpeg_bps 500000&lt;br /&gt;
ffmpeg_variable_bitrate 0&lt;br /&gt;
ffmpeg_video_codec mpeg4&lt;br /&gt;
ffmpeg_deinterlace off&lt;br /&gt;
snapshot_interval 10&lt;br /&gt;
locate off&lt;br /&gt;
text_right %Y-%m-%d\n%T-%q&lt;br /&gt;
text_changes off&lt;br /&gt;
text_event %Y%m%d%H%M%S&lt;br /&gt;
text_double off&lt;br /&gt;
quiet on&lt;br /&gt;
thread /etc/motion/thread1.conf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# cat /etc/motion/thread1.conf&lt;br /&gt;
videodevice /dev/v4l/by-path/platform-3f980000.usb-usb-0:1.5:1.0-video-index0&lt;br /&gt;
v4l2_palette 8&lt;br /&gt;
norm 0&lt;br /&gt;
frequency 0&lt;br /&gt;
rotate 0&lt;br /&gt;
width 1280&lt;br /&gt;
height 720&lt;br /&gt;
framerate 2&lt;br /&gt;
minimum_frame_time 0&lt;br /&gt;
netcam_tolerant_check off&lt;br /&gt;
auto_brightness off&lt;br /&gt;
brightness 0&lt;br /&gt;
contrast 0&lt;br /&gt;
saturation 0&lt;br /&gt;
hue 0&lt;br /&gt;
snapshot_interval 3&lt;br /&gt;
locate off&lt;br /&gt;
text_right %Y-%m-%d\n%T-%q&lt;br /&gt;
text_changes off&lt;br /&gt;
text_event %Y%m%d%H%M%S&lt;br /&gt;
text_double off&lt;br /&gt;
target_dir /mnt/nfs/pi07-cam01&lt;br /&gt;
snapshot_filename snapshots/%Y%m/%d/%v-%H%M%S-snapshot&lt;br /&gt;
jpeg_filename motion/%Y%m/%d/%v-%Y%m%d%H%M%S-%q&lt;br /&gt;
movie_filename motion/%Y%m/%d/%v-%Y%m%d%H%M%S&lt;br /&gt;
timelapse_filename %Y%m%d-timelapse&lt;br /&gt;
webcam_port 8081&lt;br /&gt;
webcam_quality 80&lt;br /&gt;
webcam_motion off&lt;br /&gt;
webcam_maxrate 1&lt;br /&gt;
webcam_localhost off&lt;br /&gt;
webcam_limit 0&lt;br /&gt;
track_type 0&lt;br /&gt;
track_auto off&lt;br /&gt;
track_motorx 0&lt;br /&gt;
track_motory 0&lt;br /&gt;
track_maxx 0&lt;br /&gt;
track_maxy 0&lt;br /&gt;
track_iomojo_id 0&lt;br /&gt;
track_step_angle_x 10&lt;br /&gt;
track_step_angle_y 10&lt;br /&gt;
track_move_wait 10&lt;br /&gt;
track_speed 255&lt;br /&gt;
track_stepsize 40&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# cat /etc/systemd/system/multi-user.target.wants/motion1.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Motion web cam server&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/motion -c /etc/motion/motion1.conf&lt;br /&gt;
Restart=always&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Create these 3 files for each individual instance.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting / Issues ==&lt;br /&gt;
On the Raspberry Pi, the webcam sometimes disconnects (a power issue?). The video4linux path changes because of this (from {{code|/dev/video0}} to {{code|/dev/video3}} for instance).&lt;br /&gt;
&lt;br /&gt;
My work-around is to use the hardware path which doesn&amp;#039;t change. You can see the paths correspond to the proper video device by listing:&lt;br /&gt;
&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# ls -al /dev/v4l/by-path/&lt;br /&gt;
total 0&lt;br /&gt;
drwxr-xr-x 2 root root 80 Mar  4 13:00 .&lt;br /&gt;
drwxr-xr-x 4 root root 80 Mar  4 13:00 ..&lt;br /&gt;
lrwxrwxrwx 1 root root 12 Mar  4 13:00 platform-3f980000.usb-usb-0:1.2:1.0-video-index0 -&amp;gt; ../../video0&lt;br /&gt;
lrwxrwxrwx 1 root root 12 Mar  4 13:00 platform-3f980000.usb-usb-0:1.3:1.0-video-index0 -&amp;gt; ../../video1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
</feed>