プログラミングとかLinuxとかの備忘録

プログラミング、Linuxでハマった箇所や環境構築のメモ

Raspberry Piとウェブカメラでmotionを使う

スポンサーリンク

motionをインストール

$ sudo apt-get -y install motion

motionの設定

stream_localhost on
webcontrol_localhost on

stream_localhost off
webcontrol_localhost off

に変更する。

動作確認

USBカメラの確認

$ lsusb 
Bus 001 Device 005: ID 046d:082c Logitech, Inc. 

起動する

$ sudo motion -n
[0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
[0:motion] [NTC] [ALL] motion_startup: Motion 4.0 Started
[0:motion] [NTC] [ALL] create_path: creating directory /var/log/motion
[0:motion] [NTC] [ALL] motion_startup: Logging to file (/var/log/motion/motion.log)

Ctrl+Cで止めて、 /var/lib/motionに画像が保存るはずなのでsftp等で確認する。