pi@raspberrypi ~ $ sudo raspi-config
pi@framboisepi ~ $ sudo apt-get install gqview
pi@framboisepi ~ $ raspistill -o image.jpg
pi@framboisepi ~ $ ls -l image.jpgTaille de l'image : 2592x1944 px
-rw-r--r-- 1 pi pi 2527753 janv. 9 19:14 image.jpg
pi@framboisepi ~ $ gqview image.jpg
pi@framboisepi ~ $ raspivid -o video.h264 -t 10000Durée de la vidéo : 10 sec. => 10000 millisec.
pi@framboisepi ~ $ ls -l video.h264
-rw-r--r-- 1 pi pi 20902952 janv. 9 19:27 video.h264
pi@framboisepi ~ $ omxplayer video.h264
pi@framboisepi ~ $ sudo apt-get install -y gpac
pi@framboisepi ~ $ MP4Box -fps 30 -add video.h264 video.mp4
AVC-H264 import - frame size 1920 x 1080 at 30.000 FPS
AVC Import results: 297 samples - Slices: 5 I 292 P 0 B - 0 SEI - 5 IDR
Saving to video.mp4: 0.500 secs Interleaving
pi@framboisepi ~ $ ls -l video.mp4
-rw-r--r-- 1 pi pi 20904999 janv. 9 19:47 video.mp4
/boot/config.txtAjouter à la fin :
disable_camera_led=1Action :
$ sudo reboot
pi@framboisepi ~ $ mkdir TIMELAPSE- Répertoire de traitement :
pi@framboisepi ~ $ mkdir CAMERA
pi@framboisepi ~ $ cd CAMERA/
pi@framboisepi ~/CAMERA $
timelapse.shAjouter :
#!/bin/shAction :
while [ true ]; do
image=photo_$(date -u +"%Y%m%d_%H%M%S").jpg
echo $image
raspistill -o /home/pi/TIMELAPSE/$image
sleep 10;
done;
$ chmod 755 ./timelapse.sh
pi@framboisepi ~/CAMERA $ screen -S timelapse
pi@raspberrypi ~/CAMERA $ ./timelapse.sh
pi@framboisepi ~/CAMERA $ ls -l ../TIMELAPSE/*.jpgTemps de prise : 2 heures 10 minutes.
total 1373808
-rwxr-xr-x 1 pi pi 2443966 2013-08-16 17:11 photo_20130816_171108.jpg
-rwxr-xr-x 1 pi pi 2446662 2013-08-16 17:11 photo_20130816_171124.jpg
-rwxr-xr-x 1 pi pi 2462648 2013-08-16 17:11 photo_20130816_171140.jpg
...
-rwxr-xr-x 1 pi pi 2875121 2013-08-16 19:20 photo_20130716_192011.jpg
-rwxr-xr-x 1 pi pi 2885910 2013-08-16 19:20 photo_20130816_192027.jpg
-rwxr-xr-x 1 pi pi 2879237 2013-08-16 19:20 photo_20130816_192043.jpg
-rwxr-xr-x 1 pi pi 2887403 2013-08-16 19:21 photo_20130816_192100.jpg
-rwxr-xr-x 1 pi pi 2857805 2013-08-16 19:21 photo_20130816_192116.jpg
pi@framboisepi ~/CAMERA $ ls -tr > liste.txt
pi@framboisepi ~/CAMERA $ sudo apt-get install mencoder
pi@framboisepi ~/CAMERA $ mencoder -nosound -ovc lavc \Durée du traitement : ?? min.
-lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 \
-o timelapse.avi -mf type=jpeg:fps=24 mf://@./liste.txt
...
Video stream: 8072.857 kbit/s (1009107 B/s) size: 20854881 bytes 20.667 secs 497 frames
pi@framboisepi ~/CAMERA $ omxplayer timelapse.avi
pi@framboisepi ~ $ sudo apt-get install gstreamer-tools \
gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly
pi@framboisepi ~ $ gst-inspect
videocrop: aspectratiocrop: aspectratiocrop
videocrop: videocrop: Crop
...
staticelements: pipeline: Pipeline object
Nombre total :233 greffons, 695 fonctionnalités
pi@framboisepi ~ $ raspivid -t 0 -w 1280 -h 720 -fps 25 -b 2500000 -p 0,0,640,480 \
-o - | gst-launch -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 \
! gdppay ! tcpserversink host=192.168.1.16 port=5000
[~] ➔ sudo add-apt-repository ppa:gstreamer-developers/ppa- Lecture du flux :
[~] ➔ sudo apt-get update
[~] ➔ sudo apt-get install gstreamer1.0*
[~] ➔ gst-launch-1.0 -v tcpclientsrc host=192.168.1.16 port=5000 ! gdpdepay \
! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
pi@framboisepi ~ $ sudo apt-get install libjpeg62-dev libjpeg8-dev \
imagemagick subversion
pi@framboisepi ~ $ mkdir -p /home/pi/tmp/flux
pi@framboisepi ~ $ mkdir mjpeg-streamer
pi@framboisepi ~ $ cd mjpeg-streamer/
pi@framboisepi ~/mjpeg-streamer $
pi@framboisepi ~ $ svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ .
pi@framboisepi ~/mjpeg-streamer $ make
pi@framboisepi ~/mjpeg-streamer $ sudo make install
pi@framboisepi ~/mjpeg-streamer $ raspistill -w 640 -h 480 -q 5 \
-o /home/pi/tmp/flux/image.jpg -tl 100 -t 9999999 -th 0:0:0 &
pi@framboisepi ~/mjpeg-streamer $ LD_LIBRARY_PATH=./ ./mjpg_streamer \
-i "input_file.so -f /home/pi/tmp/flux -n image.jpg" \
-o "output_http.so -w ./www" &
MJPG Streamer Version: svn rev: 3:172
i: folder to watch...: /home/pi/tmp/flux/
i: forced delay......: 0
i: delete file.......: no, do not delete
i: filename must be..: image.jpg
o: www-folder-path...: ./www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
pi@framboisepi ~ $ kill $(pgrep raspistill)
pi@framboisepi ~ $ kill $(pgrep mjpg_streamer)
pi@framboisepi ~ $ sudo apt-get install -y libav-tools pi@framboisepi ~ $ sudo apt-get install -y python-imaging-tk
pi@framboisepi ~ $ mkdir STOPMOTION pi@framboisepi ~ $ cd STOPMOTION/
pi@framboisepi ~/STOPMOTION $ python ./AnimationStudio.py
pi@framboisepi ~ $ sudo apt-get update && sudo apt-get upgrade
pi@framboisepi ~ $ sudo rpi-updateRedèmarrer le RaspPi.
pi@framboisepi ~ $ sudo apt-get install python-setuptools- Bibliothèque de gestion de la caméra en Python :
pi@framboisepi ~ $ sudo easy_install picamera- Bibliothèque Pygame :
pi@framboisepi ~ $ sudo apt-get install python-pygame- Outils de gestion vidéo :
pi@framboisepi ~ $ sudo apt-get install libav-tools
pi@framboisepi ~ $ sudo apt-get install omxplayer
pi@framboisepi ~ $ mkdir -p STOPMOTION/PIMATION pi@framboisepi ~ $ cd STOPMOTION/PIMATION/
pi@framboisepi ~/STOPMOTION/PIMATION $ git clone https://github.com/russb78/pi-mation.git pi@framboisepi ~/STOPMOTION/PIMATION $ cd pi-mation/pi-mation/ pi@framboisepi ~/STOPMOTION/PIMATION/pi-mation/pi-mation $
pi@framboisepi ~/STOPMOTION/PIMATION/pi-mation/pi-mation $ chmod 755 ./pi-mation.py pi@framboisepi ~/STOPMOTION/PIMATION/pi-mation/pi-mation $ ./pi-mation.py
http://framboisepi.fr | GraouLAB, le 16/01/14 : Présentation et atelier sur le module caméra du Raspberry Pi fait avec reveal-js