Raspberry Pi Camera

raspistill -o testshot.jpg

raspistill -o mypic.jpg --width 2592 --height 1944 --quality 100 --hflip --verbose

Image parameter commands

-?, --help : This help information

-w, --width : Set image width

-h, --height : Set image height

-q, --quality : Set jpeg quality <0 to 100>

-r, --raw : Add raw bayer data to jpeg metadata

-o, --output : Output filename (to write to stdout, use '-o -'). If not specified, no file is saved

-v, --verbose : Output verbose information during run

-t, --timeout : Time (in ms) before takes picture and shuts down (if not specified, set to 5s)

-th, --thumb : Set thumbnail parameters (x:y:quality)

-d, --demo : Run a demo mode (cycle through range of camera options, no capture)

-e, --encoding : Encoding to use for output file (jpg, bmp, gif, png)

-x, --exif : EXIF tag to apply to captures (format as 'key=value')

-tl, --timelapse : Timelapse mode. Takes a picture every ms


raspivid -o myvideo.h264

Libcamera (newer Raspberrys)


libcamera-vid -t 10000 -o video.h264

libcamera-jpeg -o test.jpg -t 2000 --width 640 --height 480

libcamera-jpeg -o test2.jpg -t 2000 --width 640 --height 480

 A little script to save a timestamp jpg

#! /bin/bash

NOW=`date '+%F_%H:%M:%S'`;


raspistill -n -v -t 500 -o $NOW.jpg;

echo $filename;