Developers>Tutoriels>Use the camera with Raspberry Pi
Enable the camera
- Open raspi-config tool :
$ sudo raspi-config
- Select ‘Enable Camera’ :
Then the main menu appears.
- Select ‘Finish’ with the Tab key :
$ cd /home/pi/Pictures/
- Take a simple photo :
$ raspistill -o img1.jpg
The raspistill command to take a simple photo. The photo is saved in the JPEG image img1.jpg.
-
Check the creation of the image :
$ ls
Exemple :
In this example the image is upside down, here is the command to flip the image:
$ raspistill -vf -hf -o img1.jpg
The result :
Video
- Command for record a video :
$ raspivid -o video.h264 -t 10000
This will save 10 seconds of video.
- If the video is in the wrong direction :
$ raspivid -vf -hf -o video.h264 -t 10000
10000 : 10 seconds.







