• 使用motion进行摄像头监视


    使用motion进行摄像头监视(树莓派)

    安装

    • 系统更新sudo apt-get update
    • 安装Vimsudo apt-get install vim
    • 终端输入sudo apt-get install motion

    配置motion

    • sudo vim /etc/default/motion

    修改内容

    
    # set to 'yes' to enable the motion daemon
    start_motion_daemon=no
    
    ## 修改为start_motion_daemon=yes
    
    
    • sudo vim /etc/motion/motion.conf

    tips:

    可以通过vim的字符串匹配功能,快速定位到该项。

    • 命令状态下
    • /字符串 回车
    • 使用 n 进行下一个

    
    # Start in daemon (background) mode and release terminal (default: off)
    daemon off
    
    #修改为:daemon on
    
    

    ############################################################
    # Live Stream Server
    ############################################################
    
    # The mini-http server listens to this port for requests (default: 0 = disabled)
    stream_port 8081
    
    #修改为 8081 #这是端口
    
    

    # Restrict stream connections to localhost only (default: on)
    stream_localhost on
    
    # 修改为 stream_localhost off
    
    

    
    ############################################################
    # HTTP Based Control
    ############################################################
    
    # TCP/IP port for the http server to listen on (default: 0 = disabled)
    webcontrol_port 8080 
    
    # Restrict control connections to localhost only (default: on)
    webcontrol_localhost on
    ##这里修改为 webcontrol_localhost off
    
    # Output for http server, select off to choose raw text plain (default: on)
    webcontrol_html_output on
    
    

    # Image width (pixels). Valid range: Camera dependent, default: 320
    width 320
    ## 这里的320可以修改为摄像头的分辨率 长
    
    
    # Image height (pixels). Valid range: Camera dependent, default: 240
    height 240
    ## 这里的240可以修改为摄像头的分辨率 宽
    
    
    # Maximum number of frames to be captured per second.
    # Valid range: 2-100. Default: 100 (almost no limit).
    framerate 2
    
    

    然后使用命令sudo motion启动该软件

    之后就可以在局域网内,通过ip+端口的方式访问你的监控了。如网站输入192.168.0.111:8081回车进行查看

    想要退出的话sudo service motion stop


    如果想查看自己摄像头的状况,树莓派系统下面安装luvcview

    使用命令sudo apt install luvcview

    安装完成之后,使用命令查看

    luvcview -d /dev/video* -L

    这是小睿的博客,如果需要转载,请标注出处啦~ヾ(≧▽≦*)o谢谢。
  • 相关阅读:
    thinkphp 框架的学习(1) 扩展配置文件
    【7】了解Bootstrap栅格系统基础案例(2)
    【6】了解Bootstrap栅格系统基础案例(1)
    【5】了解Bootstrap预置的栅格系统
    【4】创建一个自己的Bootstrap模板
    【3】Bootstrap的下载和目录结构
    【2】认识Bootstrap
    【1】Bootstrap入门引言
    css(html)背景图优化合并
    CSS2书写顺序
  • 原文地址:https://www.cnblogs.com/Yunrui-blogs/p/12690080.html
Copyright © 2020-2023  润新知