usbcamera_motion监控摄像头

sudo apt-get install motion

sudo vi /etc/motion/motion.conf

以下配置带宽120k/s,cpu 50%

# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 10  # captured最大帧率

# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to 'center'.
output_normal off # 检测输出图片

# Use ffmpeg to encode mpeg movies in realtime (default: off)
ffmpeg_cap_new off # 运动检测保存视频

...

# Maximum framerate for webcam streams (default: 1)
webcam_maxrate 10 # 网页显示最大帧率