Archive for Август, 2016

mjpg-streamer. snapshot.

Posted: 26th Август 2016 by shmyak in Пингвин

script: #!/bin/bash filename=$(perl -e «print time») foldername=$(date —rfc-3339=date) curl «http://127.0.0.1:8080/?action=snapshot» > $filename timestamp=stat -c %y $filename if ! [ -d/path/to/dir/$foldername ]; then mkdir /path/to/dir/$foldername fi ### timestamp convert $filename -fill black -fill white -pointsize 15 -draw  «text 5,15 ‘${timestamp:0:19}’»/path/to/dir/$foldername/$filename.jpg ### rm $filename   add to crontab: */1     *       *       *       *       /snapshot.sh >/dev/null 2>&1   […]

Raspberry Pi. mjpg-streamer

Posted: 25th Август 2016 by shmyak in Пингвин

mjpg-streamer.tar (from http://lilnetwork.com/download/raspberrypi/mjpg-streamer.tar.gz) sudo apt-get update sudo apt-get install libv4l-dev libjpeg8-dev subversion imagemagick sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer cd mjpg-streamer/ make USE_LIBV4L2=true clean all sudo make DESTDIR=/usr install sudo cp mjpg_streamer /usr/local/bin sudo cp -R www /usr/local/www mjpg_streamer -i «/usr/lib/input_uvc.so -d /dev/video0 -y -r 1280×720 -q 95 -f 4 -l auto» […]