4

树莓派安装motion实现在浏览器查看摄像头

 2 years ago
source link: https://www.taholab.com/23844
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

树莓派安装motion实现在浏览器查看摄像头

By: taho
On: 2021年9月27日
In: 树莓派
Tagged: 创客, 硬件
With: 0 Comments

安装方法:

sudo apt-<span class="hljs-built_in">get</span> install motion

然后打开 motion daemon 守护进程,让他可以一直在后台运行:

<span class="hljs-attribute">sudo</span> nano /etc/default/motion
#<span class="hljs-literal">no</span>修改成<span class="hljs-literal">yes</span>:
start_motion_daemon=<span class="hljs-literal">yes
</span>

修改motion的配置文件:

<span class="hljs-attribute">sudo</span> vim /etc/motion/motion.conf
<span class="hljs-comment">#deamon off 改成 on  这一步是允许关闭终端后motion服务继续运行</span>
<span class="hljs-attribute">deamon</span> <span class="hljs-literal">on</span>
<span class="hljs-comment">
#设置分辨率,分辨率越低画面越流畅</span>
<span class="hljs-attribute">width</span> <span class="hljs-number">640</span>
<span class="hljs-attribute">height</span> <span class="hljs-number">480
</span>
<span class="hljs-comment">#关闭 localhost 的限制,允许局域网其他人访问,借助内网穿透可以实现外网访问</span>
<span class="hljs-attribute">webcam_localhost</span> <span class="hljs-literal">off</span>

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK