{"id":793,"date":"2021-03-14T18:55:28","date_gmt":"2021-03-14T17:55:28","guid":{"rendered":"https:\/\/www.yelloworb.com\/orbblog\/?p=793"},"modified":"2021-03-14T19:10:55","modified_gmt":"2021-03-14T18:10:55","slug":"installing-xiaomi-xiaofang-with-octoprint","status":"publish","type":"post","link":"https:\/\/www.yelloworb.com\/orbblog\/installing-xiaomi-xiaofang-with-octoprint\/","title":{"rendered":"Installing Xiaomi XiaoFang with OctoPrint"},"content":{"rendered":"\n\n[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;3.22&#8243; custom_padding=&#8221;0px|||||&#8221;][et_pb_row _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221;][et_pb_column _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221; type=&#8221;4_4&#8243;][et_pb_text _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; sticky_enabled=&#8221;0&#8243;]I wanted to have a live video stream from my Snapmaker 2.0 since it now has got a space in a closet. After a couple of tries to use a live video stream from the XiaoFang camera I realized it would not be a good solution. Quite a lot of tweaking to get it to work and it would require quite some resources from the Raspberry and thus might affect prints. But I still wanted to use that camera since I already had it.[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221; column_structure=&#8221;2_5,3_5&#8243;][et_pb_column _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221; type=&#8221;2_5&#8243;][et_pb_image src=&#8221;https:\/\/www.yelloworb.com\/orbblog\/wp-content\/uploads\/2021\/03\/Screenshot_031421_065057_PM.jpg&#8221; _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221; alt=&#8221;OctoPrint video&#8221; title_text=&#8221;Screenshot_031421_065057_PM&#8221; hover_enabled=&#8221;0&#8243; sticky_enabled=&#8221;0&#8243;][\/et_pb_image][\/et_pb_column][et_pb_column _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221; type=&#8221;3_5&#8243;][et_pb_text _builder_version=&#8221;4.9.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; sticky_enabled=&#8221;0&#8243;]<p>After looking through the OctoPrint forum I saw that some people had used a special firmware on Wyze cameras to just make them into webcameras and connect directly to the Raspberry. The <a href=\"https:\/\/wyze.com\/wyze-cam.html\">Wyze camera<\/a> and the XiaoFang are the same camera, but wonder if it would just work to use that firmware? Found <a href=\"https:\/\/automatedhome.party\/2020\/04\/02\/using-the-wyzecam-as-a-webcam-for-your-computer-or-octoprint\/\">an article indicating it should work<\/a> so gave it a try. Went to the <a href=\"https:\/\/wyzelabs.zendesk.com\/hc\/en-us\/articles\/360041605111-Webcam-Firmware-Instructions\">firmware page and followed the instructions<\/a>. <a href=\"https:\/\/www.instructables.com\/Male-to-Male-A-to-A-USB-Cable\/\">Built a USB A to USB A cable<\/a> and connected the camera to my PC. Wow, it is a webcam! Connected it the the Raspberry and entered the default settings for camera. Voila!<\/p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]\n\n","protected":false},"excerpt":{"rendered":"<p>I wanted to have a live video stream from my Snapmaker 2.0 since it now has got a space in a closet. After a couple of tries to use a live video stream from the XiaoFang camera I realized it would not be a good solution. Quite a lot of tweaking to get it to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<!-- wp:paragraph -->\n<p>Install VLC on OctoPi by ssh into the octopi.local<br \/><code>sudo apt-get update<br \/>sudo apt-get install vlc<\/code><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>cvlc -R rtsp:\/\/&lt;rtsp user>:&lt;rtsp password>@&lt;rtsp ip addr>\/live --sout-x264-preset fast --sout='#transcode{acodec=none,vcodec=MJPG,vb=1000,fps=0.5}:standard{mux=mpjpeg,access=http{mime=multipart\/x-mixed-replace; boundary=--7b3cc56e5f51db803f790dad720ed50a},dst=:8899\/videostream.cgi}' --sout-keep<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>cvlc -R rtsp:\/\/&lt;camera_username>:&lt;camera_pass>@&lt;camera_hostname>\/live --sout-x264-preset fast --sout=\"#transcode{acodec=none,vcodec=MJPG,vb=10000,fps=5}:standard{mux=mpjpeg,access=http{mime=multipart\/x-mixed-replace; boundary=--7b3cc56e5f51db803f790dad720ed50a},dst=:8990\/videostream.mjpeg}\" --sout-keep<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>cvlc -R rtsp:\/\/camera:kalle@192.168.10.40:8554\/unicast --sout-x264-preset fast --sout=\"#transcode{acodec=none,vcodec=MJPG,vb=10000,fps=5}:standard{mux=mpjpeg,access=http{mime=multipart\/x-mixed-replace; boundary=--7b3cc56e5f51db803f790dad720ed50a},dst=:8990\/videostream.mjpeg}\" --sout-keep<\/p>\n<!-- \/wp:paragraph -->","_et_gb_content_width":"","footnotes":""},"categories":[75,32,29,76],"tags":[],"class_list":["post-793","post","type-post","status-publish","format-standard","hentry","category-3d-skrivare","category-hacking","category-hardware-projects","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/posts\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":5,"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/posts\/793\/revisions"}],"predecessor-version":[{"id":803,"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/posts\/793\/revisions\/803"}],"wp:attachment":[{"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/media?parent=793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/categories?post=793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yelloworb.com\/orbblog\/wp-json\/wp\/v2\/tags?post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}