ã¯ããã«
ããã®è¨äºã¯ãä¸è¨ãé»æ³¢ã¬ã¼ããã³ã°ãã®ä¸ã¤ã®æ©è½ãå®ç¾ããããã®ãã®ã§ãããåç¬ã§ãæç«ããè¨äºã«ãã¦ãã¾ãã®ã§ããé»æ³¢ã¬ã¼ããã³ã°ããããã人ãã¿ã¤ãã«éãã®ãã¨ã ããããã人ã両æ¹ã®æ¹ã対象ã®è¨äºã¨ãªãã¾ãã
ãããã§ããã¾ãã«ä»é±ã®ãé¡ãæ¤ç©å¤§å¥½ããã§ãã
ããã£ã¨æ軽ã«ç°¡æçãä½æãããæ¹ã¯ã以ä¸è¨äºåç §ãã ããã
Raspberry Piã§æ®å½±ããã¿ã¤ã ã©ãã¹åç»çæã¾ã§
ãRaspberry Piã§ã¿ã¤ã ã©ãã¹æ®å½±ãã¦ãPCã«åçã³ãã¼ãã¦åç»çæã¯ä½åº¦ããã£ããã¨ããã®ã§ãããRaspberry Piã§åç»çæã¾ã§å®çµã§ããã¨ããããã§ããã¨ããããã§ãã£ã¦ã¿ã¾ãããåç»çæ以å¤ã¯ä»ã¾ã§ãã£ããã¨ã®çµã¿åããã§ãã
é¨åãªã¹ãï¼å¿ è¦ãªãã®ï¼
ãå¿ è¦ãªãã®ã¯ä»¥ä¸ã§ããã«ã¡ã©ã¯ãRaspberry Piç¨ã®ã«ã¡ã©ã¢ã¸ã¥ã¼ã«ãåæã¨ãã¦ãã¾ãã
ãRaspberry Pi 3 ã«ã¡ã©ã¢ã¸ã¥ã¼ã« microSDã«ã¼ã[asin:B00PTGO146:detail] é»æº
Raspberry Piã¸ã®çµ¦é»ã±ã¼ãã«ãã¿ã¤ãAãªã¹- ãã¤ã¯ãã¿ã¤ãBãªã¹ãã¼ãã¦ã§ã¢ãã¹ã
Raspberry Piã»ããã¢ããã¨ã«ã¡ã©ãã¹ã
ãä¸è¨è¨äºãåç
§ã«åºç¤çãªã»ããã¢ããï¼$ sudo apt-get upgrade
ããã¨ããï¼ã¾ã§å®äºããã¦ä¸ãããã«ã¡ã©ã¢ã¸ã¥ã¼ã«ã¨Raspberry Piããã¬ãã±ã¼ãã«ã§æ¥ç¶ãããã¨ãå¿ããã«ã
ããã®å¾ãRaspi-configã»ããã¢ããã§ãInterface
ã®ã¿ããéãã«ã¡ã©(camera)
ãEnable
ã«è¨å®ãã¦ä¸ããã
ãRaspberry Piãåèµ·åããå¾ã以ä¸ã³ãã³ãã§æ®å½±ãã¾ãããã
$ raspistill -o test.jpg
ãã¨ã©ã¼ãªããtest.jpg
ã¨ããåçãã¡ã¤ã«ãçæãããã°OKã§ãã
Raspberry Piã®èªåæ®å½±
ãèªåæ®å½±ã®ããã®ã½ããã¯ä»¥åRaspberry Piã§ãã¸ã«ã¡ä½ã£ãæã«ä½ã£ããã®ã使ãåãã¦ãã¾ãã http://karaage.hatenadiary.jp/entry/2014/09/19/113816
ãã¡ãã£ã¨ã ãèªå·±æºè¶³çã«æ¹è¯ãã¦ãã¾ãããæ©è½ãæ§è½çã«ã¯å¤ãã£ã¦ãã¾ãããã³ã¼ãã¯ä»¥ä¸ã«ããã¾ãã
ã以ä¸ã³ãã³ãã§ã¯ãã¼ã³ï¼ã³ãã¼ï¼ãã¦
$ cd
$ git clone https://github.com/karaage0703/denpa-gardening.git
ã以ä¸ã³ãã³ãã§æ®å½±ã§ãã¾ãã
$ python ~/denpa-gardening/shutter.py
ãæ®å½±ãããã¡ã¤ã«ã¯ã~/denpa-gardening/photo_data
ã¨ãããã£ã¬ã¯ããªã®ä¸ã«ä¿åããã¾ãããã¡ã¤ã«åã¯1ããé ã«æ®å½±ã®ãã³ã«ã¤ã³ã¯ãªã¡ã³ãããã¦ããã¾ããæ°åãã¯ãªã¢ãããå ´åã¯ãphoto_data
ã¨ãããã£ã¬ã¯ããªã®ä¸ã«ããcamera.set
ã¨ãããã¡ã¤ã«ã«ãã¡ã¤ã«Noãæ¸ããã¦ããã®ã§ãä¸èº«ãæåã§æ¸ãæãã¦ãã ããã
ãæ´ã«crontab -e
å®è¡ãã¦ãæ«å°¾ã«ä»¥ä¸è¿½è¨ããã¨10åãã¨ã«åçãèªåã§æ®å½±ãã¦ä¿åããããã«ãªãã¾ãã
*/10 * * * * python ./denpa-gardening/shutter.py
ã¿ã¤ã ã¹ã¿ã³ã追å
ãåçã«ã¿ã¤ã ã¹ã¿ã³ãï¼æ¥ä»ãæéï¼ãå»å°ããã¦ããã¨å¾ã§è¦ãæ便å©ãããªã®ã§è¿½å ãã¦ã¿ããã¨ã«ãã¾ããã
ã以å妻ã®ããã«ã¿ã¤ã ã¹ã¿ã³ããå»å°ããã½ãããMacç¨ã«ã¤ãã£ãã®ã§ããï¼ä¸è¨ãªã³ã¯åç §ï¼ããã©ã³ãã®å ´æã®æå®ã ãå¤ãã¦ããã°ãRaspberry Piã§ãã®ã¾ã¾åãã¾ããããã£ãããä½ã£ã¦ã¦ããã£ãããªã®ã§ãããæã£ã¦ãã¾ãã
ã以ä¸ã³ãã³ããå®è¡ããã°ããã¡ã¤ã«ã«ã¿ã¤ã ã¹ã¿ã³ããèªåã§åãè¾¼ã¾ãã¾ããå ã«ã¯æ»ããªãã®ã§ã¿ã¤ã ã¹ã¿ã³ãç¡ãã®ã欲ãã人ã¯ãããããã©ããã«ããã¯ã¢ãããåã£ã¦ããã¦ä¸ããã
$ python ~/denpa-gardening/photo_exif_date_print.py <filename>
ã¿ã¤ã ã¹ã¿ã³ã追å å
ã¿ã¤ã ã¹ã¿ã³ã追å å¾
Raspberry Piã§åç»çæ
avconvã¤ã³ã¹ãã¼ã«
ãRaspbianå
¬å¼ãµã¤ãã®æ¨å¥¨ã¯memcoder
ã®ãããªã®ã§ãããç¾å¨ã®Raspbian Jessieã§ã¯ã¤ã³ã¹ãã¼ã«ã§ããªããªã£ã¦ãã¾ããè²ã
調ã¹ããavconv
ã§ãã£ã¦ãã¾ããã£ã¦ãã人ããããããªã®ã§ãavconv
ã§ãã£ã¦ã¿ããã¨ã«ãã¾ãã
$ sudo apt-get update $ sudo apt-get install libav-tools
ãffmpeg
ãèªåã§ãã«ããã¦ä½¿ã£ã¦ãã人ãããããã§ãã®ã§ãèå³ããæ¹ã¯æ¬è¨äºæ«ã«ããåèãªã³ã¯çãåç
§ä¸ããã
avconvã¯ffmpegã«çµ±åããããããªã®ã§ãffmpegã使ãã®ãè¯ãããã§ãã
avconvã§åç»ã¨ã³ã³ã¼ã
ãä¾ãã°ã000001.jpg
ãã000100.jpg
ã®ãã¡ã¤ã«ãé
ç½®ããã¦ããå ´åããã®ãã£ã¬ã¯ããªã«ç§»åãã¦ä»¥ä¸ã³ãã³ããå®è¡ãã¾ãã
$ avconv -y -f image2 -r 10 -i %6d.jpg -aspect 16:9 -s '1980x1080' output.mp4
$ ffmpeg -y -f image2 -r 10 -i %6d.jpg -aspect 16:9 -s '1980x1080' output.mp4
ã-r
ã®10
ãfpsï¼ãã¬ã¼ã ã¬ã¼ãï¼ã§ãããã®ä»ã®ãªãã·ã§ã³ã¯ffmpegã®ããã¥ã¡ã³ããåç
§ãã ããã
ã`output.mp4'ã¨ããåç»ãã¡ã¤ã«ãçæãããã°æåã§ããèªåã¯æåãã¾ããããªãã£ãã®ã§ããã¾ããã£ã¦ãã人ã®ãªãã·ã§ã³ãåèã«ãã¦ãã£ã¬ã³ã¸ãããæåãã¾ããã
ãåç»ã¯ä»¥ä¸ã®ãããªæãã«ãªãã¾ãã
èªåæ®å½±ããåç»çæã¾ã§ã®æµããèªåå
ãä»ã¾ã§ãã£ã¦ããä½æ¥ãèªååããmake-movie.sh
ã¨ããã¹ã¯ãªãããä½ãã¾ããã使ãæ¹ã¯ä»¥ä¸ã®ã³ãã³ããå®è¡ããã ãã§ãã
$ ~/denpa-gardening/make-movie.sh
ãã¹ã¯ãªããã¯ä»¥ä¸ã®ä½æ¥ãè¡ãã¾ãã
photo_data
以ä¸ã«ããç»åãã¡ã¤ã«ãä½æ¥ãã£ã¬ã¯ããªwork
ã«ã³ãã¼work
ã«ããå ¨ã¦ã®ç»åãã¡ã¤ã«ã«ã¿ã¤ã ã¹ã¿ã³ãã追åwork
ã«ããç»åãã¡ã¤ã«ãåç»ãã¡ã¤ã«ã«ã¨ã³ã³ã¼ããã¦denpa-gardening
ãã£ã¬ã¯ããªã«output_æ¥ä».mp4
ã¨ãããã¡ã¤ã«åã§ä¿åwork
ãã£ã¬ã¯ããªã®ãã¡ã¤ã«ãåé¤
ãã¿ã¤ã ã¹ã¿ã³ãã追å ãããããªãããåç»ã®ãªãã·ã§ã³ãªã©ã¯ã¹ã¯ãªããã®å¤æ°ã§å¤æ´ã§ããããã«ãã¦ããã®ã§ãèå³ããæ¹ã¯ã¹ã¯ãªããã®ä¸èº«ãã¿ã¦æ¸ãæããããã¦ã¿ãã¨ãããã¨æãã¾ãã
ãç»åãã¡ã¤ã«ã§ãã£ã¹ã¯ããã£ã±ãã«ãªãåã«ãå®æçã«ã¹ã¯ãªãã使ã£ã¦åçãã¡ã¤ã«ãåç»ã«ãã¦ãç»åãã¡ã¤ã«ã¯ä»¥ä¸ã³ãã³ãã§åé¤ãã¦ããã¨ããããããã¾ããã
$ rm ~/denpa-gardening/photo_data/*.jpg
ã¾ã¨ã
ãåºæ¬çã«ä»ã¾ã§ãã£ããã¨ã®çµã¿åãããªã®ã§æ¥½ã§ãããã¿ã¤ã ã©ãã¹åç»ã¯æ¥½ããã®ã§ãããã ãã§ãè²ã 使ãéãããã®ãããªãããªã¨æãã¾ãã
åèãªã³ã¯
- GitHub - pageauc/pi-timolo: Raspberry PI-TIMOLO ( PI-TImelapse, MOtion, LOwLight ) uses RPI picamera and OpenCV for Remote Headless Security Monitoring using Motion Tracking, Rclone Auto Sync files with remote storage services. Auto Twilight Transitions and Low Light Camera Settings. Panoramic images using PanTiltHat and More. This project is featured on GitHub Awesome software.
- Raspbian jessie : no package for mencoder · Issue #9 · pageauc/pi-timolo · GitHub
- mencoder not in jessie? - Raspberry Pi Forums
- avconvのオプション
- Raspberry Pi Documentation - Camera
é¢é£è¨äº
å¤æ´å±¥æ´
- 2020/05/22 åç»ã¨ã³ã³ã¼ãã½ããã§ããavconvã®ffmpegã¸ã®çµ±åã«ä¼´ãavconvãffmpegã«å¤æ´