{"id":160,"date":"2023-11-06T15:15:34","date_gmt":"2023-11-06T07:15:34","guid":{"rendered":"https:\/\/www.xuzhe.tj.cn\/?p=160"},"modified":"2025-05-03T09:48:38","modified_gmt":"2025-05-03T01:48:38","slug":"%e4%bd%bf%e7%94%a8mt7628openwrt%e8%8e%b7%e5%be%97mjpg%e6%a0%bc%e5%bc%8f%e7%9a%84%e6%91%84%e5%83%8f%e5%a4%b4%e8%a7%86%e9%a2%91%e6%b5%81","status":"publish","type":"post","link":"https:\/\/www.xuzhe.tj.cn\/index.php\/2023\/11\/06\/%e4%bd%bf%e7%94%a8mt7628openwrt%e8%8e%b7%e5%be%97mjpg%e6%a0%bc%e5%bc%8f%e7%9a%84%e6%91%84%e5%83%8f%e5%a4%b4%e8%a7%86%e9%a2%91%e6%b5%81\/","title":{"rendered":"\u4f7f\u7528MT7628(OpenWRT)\u83b7\u5f97MJPG\u683c\u5f0f\u7684\u6444\u50cf\u5934\u89c6\u9891\u6d41"},"content":{"rendered":"<h1>\u4e00\u3001\u51c6\u5907<\/h1>\n<p>SCP\u6587\u4ef6\u4f20\u8f93 \u5c06 kmod-video-uvc\u3001mjpg-streamer\u4ee5\u53calibjpeg\u4e09\u4e2a\u5305\u590d\u5236\u5230\u5f00\u53d1\u677f\u7684\/tmp\/pkg\/\u76ee\u5f55\u4e0b\u3002<\/p>\n<p><!--more--><\/p>\n<h1>\u4e8c\u3001\u5b89\u88c5<\/h1>\n<p>\u5728\/tmp\/pkg\/\u76ee\u5f55\u4e0b\uff0c\u8fd0\u884c\u6307\u4ee4\uff1a opkg install kmod_video-uvc<em> opkg install libjpeg<\/em> opkg install mjpg*<\/p>\n<h1>\u4e09\u3001\u914d\u7f6e<\/h1>\n<h2>1.mjpg-streamer\u914d\u7f6e\u6587\u4ef6<\/h2>\n<p>\u5728\/etc\/config\u76ee\u5f55\u4e0b\uff0c\u8fd0\u884c\uff1a vi mjpg-streamer<\/p>\n<p>\u4fee\u6539option enabled\u3001option resolution\u3001option fps\u3002 \u8bbe\u7f6e\u540e\u7684\u5185\u5bb9\u4e3a\uff1a<\/p>\n<pre><code class=\"language-shell\">config mjpg-streamer &#039;core&#039;\n        option enabled &#039;1&#039;\n        option input &#039;uvc&#039;\n        option output &#039;http&#039;\n        option device &#039;\/dev\/video0&#039;\n        option resolution &#039;1280x720&#039;\n        option yuv &#039;0&#039;\n        option quality &#039;80&#039;\n        option fps &#039;30&#039;\n        option led &#039;auto&#039;\n        option www &#039;\/www\/webcam&#039;\n        option port &#039;8080&#039;\n        option username &#039;openwrt&#039;\n        option password &#039;openwrt&#039;<\/code><\/pre>\n<p>\u4fee\u6539\u540e\u4fdd\u5b58\u3002esc :wq<\/p>\n<h2>2.\u7cfb\u7edf\u8bbe\u7f6e<\/h2>\n<p>(1) start on boot (\u968f\u7cfb\u7edf\u542f\u52a8) <code>\/etc\/init.d\/mjpg-streamer enable<\/code><\/p>\n<p>(2) start mjpg-streamer (right now \u7acb\u5373\u542f\u52a8mjpg-streamer) <code>\/etc\/init.d\/mjpg-streamer start<\/code><\/p>\n<p>(3) stop mjpg-streamer (\u505c\u6b62mjpg-streamer) <code>\/etc\/init.d\/mjpg-streamer stop<\/code><\/p>\n<h1>\u56db\u3001\u4f7f\u7528<\/h1>\n<p>\u73b0\u5728\u5728\u6d4f\u89c8\u5668\u6216VLC\u4e2d\u6253\u5f00URL <code>http:\/\/192.168.1.1:8080\/<\/code> \u89c2\u770bMJPEG\u6d41\uff08\u9ed8\u8ba4\u7528\u6237\u540d\/\u5bc6\u7801\u4e3a <code>&quot;openwrt&quot;\/&quot;openwrt&quot;<\/code>\uff09\u3002\u5728\u5176\u4ed6\u6d4f\u89c8\u5668\u3001\u811a\u672c\u7b49\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>http:\/\/192.168.1.1:8080?action=snapshot<\/code> \u62cd\u6444\u4e00\u5f20\u56fe\u7247\uff0c\u6216\u4f7f\u7528 <code>http:\/\/192.168.1.1:8080?action=stream<\/code> \u83b7\u53d6\u89c6\u9891\u6d41\u3002<\/p>\n<h1>\u4e94\u3001\u63a7\u5236\u66dd\u5149\u3001\u8272\u5f69\u5e73\u8861\u7b49<\/h1>\n<p>opkg \u7248\u672c\u7684 <code>mjpg-streamer<\/code> \u6ca1\u6709\u76f8\u673a\u7684\u63a7\u5236\u9009\u9879\u3002\u5982\u679c\u60f3\u63a7\u5236\u66dd\u5149\uff0c\u4eae\u5ea6\u548c\u5176\u4ed6\u9009\u9879\uff0c\u9700\u8981\u5b89\u88c5uvcdynctrl\u3002<\/p>\n<p>\u53c2\u8003\uff1a<br \/>\n<a href=\"https:\/\/openwrt.org\/docs\/guide-user\/hardware\/video\/webcam\">https:\/\/openwrt.org\/docs\/guide-user\/hardware\/video\/webcam<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u51c6\u5907 SCP\u6587\u4ef6\u4f20\u8f93 \u5c06 kmod-video-uvc\u3001&#8230;<\/p>\n","protected":false},"author":1,"featured_media":528,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[14,9],"class_list":["post-160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-10","tag-mt7628","tag-openwrt"],"_links":{"self":[{"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/posts\/160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/comments?post=160"}],"version-history":[{"count":1,"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/posts\/160\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/posts\/160\/revisions\/161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/media\/528"}],"wp:attachment":[{"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/media?parent=160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/categories?post=160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xuzhe.tj.cn\/index.php\/wp-json\/wp\/v2\/tags?post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}