LoginSignup
5

More than 3 years have passed since last update.

Raspberry Pi のカメラモジュール設定→静止画・動画とる

Last updated at Posted at 2017-01-20

【2020/1/29更新】
ネットで検索すると古い情報が上に来るので、よろしくないと思い、本記事も更新します。
今や(少なくとも私のRPi4では)下記で実行できます。
$ sudo apt install motion
$ sudo motion
以上です。

---------昔は下記でした----------

sudo raspi-configでカメラを利用可に
raspistill -o a.png で静止画がもう撮れる

wget https://www.dropbox.com/s/xdfcxm5hu71s97d/motion-mmal.tar.gz
tar -zxvf motion-mmal.tar.gz

motion-mmalを持ってきて解凍

sudo nano /home/pi/motion-mmalcam.conf
で、内容を下記の通り書き換える。
stream_localhost off
stream_auth_method 1
stream_authentication username:password
output_pictures off
ffmpeg_output_movies off

sudo ./motion -n -c motion-mmalcam.conf
実行しブラウザに下記URLを入れる。(IPはhostname -Iで見る)
http://192.168.1.15:8081/

↑のstream_authenticationを弄ってないなら、”username”、”password”と入力する。

RPiカメラが見ているものがブラウザに表示されます。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5