{"id":3538,"date":"2015-12-06T21:18:55","date_gmt":"2015-12-07T02:18:55","guid":{"rendered":"http:\/\/www.summet.com\/blog\/?p=3538"},"modified":"2015-12-06T21:18:55","modified_gmt":"2015-12-07T02:18:55","slug":"streaming-usb-webcam-to-the-web-with-motion-on-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2015\/12\/06\/streaming-usb-webcam-to-the-web-with-motion-on-ubuntu-14-04\/","title":{"rendered":"Streaming USB webcam to the web with motion on Ubuntu 14.04"},"content":{"rendered":"<p>After <a href=\"http:\/\/www.summet.com\/blog\/2015\/12\/06\/ubuntu-14-04-mjpg_streamer-install-attempt\/\">trying to use mjpg_streamer and failing<\/a> (my webcam doesn&#8217;t have hardware support to output mjpg streams) I used &#8220;motion&#8221; instead.<br \/>\n<!--more--><\/p>\n<p>You can use the &#8220;motion&#8221; program to stream\/export a USB webcam to the web.<\/p>\n<p><code><br \/>\nsudo apt-get install motion<br \/>\n<\/code><\/p>\n<p>Edit the configuration file located in \/etc\/default\/motion<br \/>\nto the following:<br \/>\n<code><br \/>\nstart_motion_daemon=yes<br \/>\n<\/code><\/p>\n<p>Then edit the \/etc\/motion\/motion.conf file file as follows:<\/p>\n<p>Set width and height appropriately (640&#215;480 in my case).<br \/>\nAdjust framerate if you want.<br \/>\nI set minimum_motion_frames to 2 because I have a higher framerate.<\/p>\n<p>webcam_quality 85<\/p>\n<p>webcam_localhost off<br \/>\nwebcam_port 8080<br \/>\nwebcam_motion on<br \/>\nwebcam_maxrate 5<br \/>\ncontrol_port 0<\/p>\n<p>Start things up with<br \/>\n<code>sudo service motion start<\/code><\/p>\n<p>And then double check things by pointing your web browser to 127.0.0.1:8080.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After trying to use mjpg_streamer and failing (my webcam doesn&#8217;t have hardware support to output mjpg streams) I used &#8220;motion&#8221; instead.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3538","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/3538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=3538"}],"version-history":[{"count":4,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/3538\/revisions"}],"predecessor-version":[{"id":3553,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/3538\/revisions\/3553"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=3538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=3538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=3538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}