{"id":677,"date":"2024-01-22T13:57:22","date_gmt":"2024-01-22T04:57:22","guid":{"rendered":"https:\/\/www.despina.work\/wordpress\/?p=677"},"modified":"2024-01-22T13:57:23","modified_gmt":"2024-01-22T04:57:23","slug":"raspberry-pi-zero-%e3%81%a7%e3%82%ab%e3%83%a1%e3%83%a9%e6%98%a0%e3%81%99%e6%96%b9%e6%b3%95%e3%83%a1%e3%83%a2%e2%91%a1mjpg-streame%e3%81%ae%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.despina.work\/wordpress\/?p=677","title":{"rendered":"Raspberry Pi zero \u3067\u30ab\u30e1\u30e9\u6620\u3059\u65b9\u6cd5\u30e1\u30e2\u2461MJPG-Streame\u306e\u8a2d\u5b9a"},"content":{"rendered":"\n<p>\u300cMJPG-Streame\u300d\u3067\u3084\u3063\u3066\u3044\u304f\u3002<\/p>\n\n\n\n<p>\u6700\u65b0\u306e\u3084\u3064\u3060\u3068\u53c2\u8003\u30b5\u30a4\u30c8\u306e\u3084\u308a\u304b\u305f\u306e\u4e00\u90e8\u304c\u901a\u3089\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u304b\u3089\u307e\u3068\u3081\u306e\u610f\u5473\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p><strong>\uff11\uff0e\u524d\u63d0\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5165\u308c\u308b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install cmake libjpeg8-dev\n##If you do not have gcc (and g++ for the opencv plugin) you may need to install those.\nsudo apt-get install gcc g++<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u6642\u300c<em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ff0000\" class=\"has-inline-color\">E: Package &#8216;libjpeg8-dev&#8217; has no installation candidat<\/mark><\/em>\u300d\u307f\u305f\u3044\u306a\u30a8\u30e9\u30fc\u304c\u3067\u3066\u3067\u304d\u306a\u304b\u3063\u305f\u3002\u53c2\u8003\u30b5\u30a4\u30c8\u306e\uff14\u3001\u300c<strong>libjpeg-dev<\/strong>\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u5148\u3078\u9032\u3081\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install -y git cmake libjpeg-dev\n\n<\/code><\/pre>\n\n\n\n<p><strong>\uff12\uff0e\u30e9\u30ba\u30d1\u30a4\u5185\u3001\u30e6\u30fc\u30b6\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u306bgit\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30af\u30ed\u30fc\u30f3\u4f5c\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/\ngit clone https:\/\/github.com\/neuralassembly\/mjpg-streamer.git\ncd mjpg-streamer\/mjpg-streamer-experimental\nmake\nsudo make install<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center\">\u300csudo make install\u300d\u306f\u304a\u3068\u306a\u3057\u304f\u5b9f\u884c\u3057\u3066\u3066\u3044\u3044<\/p>\n\n\n\n<p><strong>\uff13\uff0e\u30ab\u30e1\u30e9\u6709\u52b9\u306b\u3059\u308b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo raspi-config nonint do_legacy 0\nsudo reboot<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center\">\u307e\u3042\ud83d\udc47\u307f\u305f\u3044\u306b\u300csudo raspi-config\u300d\u3067\u9078\u629e\u3057\u3066\u3044\u3063\u3066\u3082\u3067\u304d\u308b\u3063\u307d\u3044<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"988\" height=\"496\" src=\"https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-7.png\" alt=\"\" class=\"wp-image-678\" srcset=\"https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-7.png 988w, https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-7-300x151.png 300w, https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-7-768x386.png 768w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/figure>\n\n\n\n<p><strong>\uff14\uff0e\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u4f5c\u308b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \u9069\u5f53\u306a\u30d5\u30a1\u30a4\u30eb\u540d.sh<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>PORT=\"8080\" <em>#WEB\u753b\u9762\u306e\u30a2\u30af\u30bb\u30b9\u6642\u306e\u30dd\u30fc\u30c8\u756a\u53f7<\/em>\nWINDOWSIZE=\"640x480\" <em>#\u753b\u9762\u306e\u30b5\u30a4\u30ba<\/em>\nFRAMERATE=\"20\" <em>#\u30d5\u30ec\u30fc\u30e0\u30ec\u30fc\u30c8<\/em>\nexport LD_LIBRARY_PATH=\/usr\/local\/lib mjpg_streamer -i \"input_uvc.so -f $FRAMERATE -r $WINDOWSIZE -d \/dev\/video0 -y -n\" \\ -o \"output_http.so -w \/usr\/local\/share\/mjpg-streamer\/www -p $PORT\"<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\uff15\uff0e\u5b9f\u884c\u3059\u308b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sh \u9069\u5f53\u306a\u30d5\u30a1\u30a4\u30eb\u540d.sh<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"384\" src=\"https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-8-1024x384.png\" alt=\"\" class=\"wp-image-679\" srcset=\"https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-8-1024x384.png 1024w, https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-8-300x113.png 300w, https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-8-768x288.png 768w, https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-8.png 1345w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">\u3053\u3093\u306a\u611f\u3058<\/p>\n\n\n\n<p>\u81ea\u52d5\u8d77\u52d5\u3068\u304b\u3057\u305f\u3044\u5834\u5408\u306f\u30b0\u30b0\u308b\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\uff16\uff0eWEB\u30da\u30fc\u30b8\u8868\u793a\u3057\u3066\u5b8c\u6210<\/strong><\/p>\n\n\n\n<p>http:\/\/\uff08Raspberry Pi\u306eIP\u30a2\u30c9\u30ec\u30b9 or \u30db\u30b9\u30c8\u540d\uff09:8080<\/p>\n\n\n\n<p>\u52d5\u753b\u306e\u753b\u9762\u3060\u3051\u3067\u3044\u3044\u5834\u5408\u306f\u3053\u3063\u3061\ud83d\udc47<\/p>\n\n\n\n<p>http:\/\/\u30a2\u30c9\u30ec\u30b9\u3068\u304b:8080\/?action=stream<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"755\" height=\"760\" src=\"https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-9.png\" alt=\"\" class=\"wp-image-680\" srcset=\"https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-9.png 755w, https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-9-298x300.png 298w, https:\/\/www.despina.work\/wordpress\/wp-content\/uploads\/2024\/01\/image-9-150x150.png 150w\" sizes=\"auto, (max-width: 755px) 100vw, 755px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">\ud83d\udc48\u306e\u300cStatic\u300d\u304c\u9759\u6b62\u753b\u3001\u300cStream\u304c\u52d5\u753b\u300d<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\"><strong>\u304a\u308f\u308a<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>\u53c2\u8003\uff11\uff1a<a href=\"https:\/\/github.com\/jacksonliam\/mjpg-streamer\">GitHub &#8211; jacksonliam\/mjpg-streamer: Fork of http:\/\/sourceforge.net\/projects\/mjpg-streamer\/<\/a><\/p>\n\n\n\n<p>\u53c2\u8003\uff12\uff1a<a href=\"https:\/\/kuimal.com\/making-pet-camera-raspberrypi-zero-2\/\">\u3010\u5b9f\u88c5\u7de8\u2460\u3011Raspberry Pi Zero W\u3067\u30da\u30c3\u30c8\u30ab\u30e1\u30e9\u3092\u4f5c\u308b\uff08MJPG-Streamer\uff09 (kuimal.com)<\/a><\/p>\n\n\n\n<p>\u53c2\u8003\uff13\uff1a<a href=\"https:\/\/note.com\/airily_inc\/n\/n1059bdc89ce8\">\u3010\u30e9\u30ba\u30d1\u30a4\u6d3b\u7528\u8853\u3011Raspberry Pi\u3067\u7c21\u6613\u7684\u306a\u76e3\u8996\u30ab\u30e1\u30e9\u3092\u4f5c\u3063\u3066\u307f\u305f\uff5c\u682a\u5f0f\u4f1a\u793e\u30a8\u30a2\u30ea\u30fc\uff1a\u6280\u8853\u30d6\u30ed\u30b0 (note.com)<\/a><\/p>\n\n\n\n<p>\u53c2\u8003\uff14\uff1a<a href=\"https:\/\/ponkichi.blog\/mjpg-streamer\/\">Raspberry Pi\u3067MJPG-Streamer\u3092\u4f7f\u3063\u3066\u76e3\u8996\u30ab\u30e1\u30e9\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046 (ponkichi.blog)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300cMJPG-Streame\u300d\u3067\u3084\u3063\u3066\u3044\u304f\u3002 \u6700\u65b0\u306e\u3084\u3064\u3060\u3068\u53c2\u8003\u30b5\u30a4\u30c8\u306e\u3084\u308a\u304b\u305f\u306e\u4e00\u90e8\u304c\u901a\u3089\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u304b\u3089\u307e\u3068\u3081\u306e\u610f\u5473\u304c\u3042\u308b\u3002 \uff11\uff0e\u524d\u63d0\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5165\u308c\u308b \u3053\u306e\u6642\u300cE: Package &#8216;libjpeg8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-677","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=677"}],"version-history":[{"count":1,"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/677\/revisions"}],"predecessor-version":[{"id":681,"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/677\/revisions\/681"}],"wp:attachment":[{"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.despina.work\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}