Help us understand the problem. What is going on with this article?

Raspberry Pi でカメラ

More than 3 years have passed since last update.

以下のサイトを参考に実施

USB カメラが認識されているか確認

$ lsusb
Bus 001 Device 004: ID 046d:09a2 Logitech, Inc. QuickCam Communicate Deluxe/S7500

Motion をインストール

$ sudo apt-get install motion

設定変更

$ sudo vi /etc/motion/motion.conf

書き変え

  • localhostのみの操作アクセス制限をoffに
    webcontrol_localhost on
     ↓
    webcontrol_localhost off

  • localhostのみの表示アクセス制限をoffに
    stream_localhost on
     ↓
    stream_localhost off

起動

$ sudo motion -c /etc/motion/motion.conf

または

$ sudo motion -n
(Run in non-daemon mode)

動体検知で /var/lib/motion に静止画が保存される

停止

$ sudo service motion stop

PC からアクセス

ブラウザで設定変更

http://XXX.XXX.XXX.XXX:8080/
ブラウザから設定値をコントロールできる

ブラウザでストリーム表示

http://XXX.XXX.XXX.XXX:8081/

枠は表示されるが画像が表示されない
Video device fatal error - Closing video device

どこかのタイミングで静止画が保存されなくなった
reboot して

$ sudo motion -n

で、静止画が保存されるようになった
ストリーミングもOK

動体検知した部分だけ動画にして保存している

設定変更

$ sudo vi /etc/motion/motion.conf

書き変え

  • 静止画を保存しない
    output_pictures on
     ↓
    output_pictures off

  • サイズ
    width 640 # 幅
    height 480 # 高さ

suppy193
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした