(2017-01-27追記) CSIカメラ(mmal service 16.1) と USBカメラ(USB 2.0 PC Camra)のカメラ2台にて。
概要
-
motionEyeというのをラズパイに入れてみる。
-
機能 (Features)
- ウェッブベースで、モバイル・タブレットフレンドリーな、ユーザインタフェース
- らずぱいのカメラモジュール(CSI)や、多くのUSBカメラとの互換性
- IPネットワークカメラ対応
- スケジュール動体検出で、eメールでお知らせ。
- JPEG静止画、AVIで動画保存。
- 低速度撮影(timelapse)動画
- グーグルドライブやドロップボックスへファイルのアップロード
# だそうです。全機能は確認してません。
環境
-
Raspberry Pi 3
-
2016-05-27-raspbian-jessie-lite.img
-
USB2.0 Webカメラ BUFFALOのやつ.
-
らずぱいのカメラモジュール使う場合は、
bcm2835-v4l2
を/etc/modules
に追加しておく
grep bcm2835-v4l2 /etc/modules || echo bcm2835-v4l2 | sudo tee -a /etc/modules
- (2017-01-27更新) Raspberry Pi 2 + `2017-01-11-raspbian-jessie-lite.img` + USBカメラ + CSIカメラにて動作確認。
## 手順
1. いつもの (`sudo apt-get update; sudo apt-get upgrade; sudo raspi-config` )
2. motionEyeのインストール
- [Install On Raspbian](https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian)にしたがって、インストール
```bash
# 必要なパッケージ類のインストール
sudo apt install -y python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142
# motionのインストール
# 2017-01-27: Raspbianのmotionいれて動くよ。
sudo apt install -y motion
# 2017-01-27: ↓でも動作確認済み
# ffmpegのインストール
#wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.deb
#sudo dpkg -i ffmpeg_3.1.1-1_armhf.deb
# motionのインストール.
#sudo wget https://github.com/ccrisan/motioneye/wiki/precompiled/motion-mrdave-raspbian -O /usr/local/bin/motion
#sudo chmod +x /usr/local/bin/motion
# motioneyeのインストール
sudo pip install motioneye
# motionの設定ファイル
sudo mkdir -p /etc/motioneye
sudo cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
# motionのメディアディレクトリ
sudo mkdir -p /var/lib/motioneye
# initスクリプトの追加、motionEyeサーバ起動.
sudo cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
sudo systemctl daemon-reload
sudo systemctl enable motioneye
sudo systemctl start motioneye
systemctl status motioneye
##########################################
# motionEyeをアップグレードするとき。
#
sudo pip install motioneye --upgrade
sudo systemctl restart motioneye
-
ブラウザからアクセス:
http://<らずぱいのIP>:8765/
- 初回ログイン
Usename: admin
Password: (なし)
ポートの設定は、このへん。 - 初回ログイン
pi@raspberrypi:~ $ cat /etc/motioneye/motioneye.conf | grep -i ^port
port 8765
<!--

-->
4. `You have not configured any camera yet. Click here to add one...`
=> のメッセージをクリック => 認識されているカメラが出てくるので、選んで `[OK]`

5. adminとuserのパスワードを設定しときましょう。