Image options
The command line options specified in this section apply only to still image output.
To pass one of the following options to an application, prefix the option name with --. If the option requires a value, pass the value immediately after the option name, separated by a single space. If the value contains a space, surround the value in quotes.
Some options have shorthand aliases, for example -h instead of --help. Use these shorthand aliases instead of the full option name to save space and time at the expense of readability.
quality
Alias: -q
Default value: 93
Sets the JPEG quality. Accepts a value between 1 and 100.
exif
Saves extra EXIF tags in the JPEG output file. Only applies to JPEG output. Because of limitations in the libexif library, many tags are currently (incorrectly) formatted as ASCII and print a warning in the terminal.
This option is necessary to add certain EXIF tags related to camera settings. You can add tags unrelated to camera settings to the output JPEG after recording with ExifTool.
Example: rpicam-still -o test.jpg --exif IDO0.Artist=Someone
timelapse
Records images at the specified interval. Accepts an interval in milliseconds. Combine this setting with timeout to capture repeated images over time.
You can specify separate filenames for each output file using string formatting, for example, --output test%d.jpg.
Example: rpicam-still -t 100000 -o test%d.jpg --timelapse 10000 captures an image every 10 seconds for 100 seconds.
framestart
Configures a starting value for the frame counter accessed in output file names as %d. Accepts an integer starting value.
datetime
Uses the current date and time in the output file name, in the form MMDDhhmmss.jpg:
-
MM= 2-digit month number -
DD= 2-digit day number -
hh= 2-digit 24-hour hour number -
mm= 2-digit minute number -
ss= 2-digit second number
Does not accept a value.
timestamp
Uses the current system Unix time as the output file name. Does not accept a value.
restart
Default value: 0
Configures the restart marker interval for JPEG output. JPEG restart markers can help limit the impact of corruption on JPEG images, and additionally enable the use of multi-threaded JPEG encoding and decoding. Accepts an integer value.
immediate
Captures the image immediately when the application runs.
keypress
Alias: -k
Captures an image when the timeout expires or on press of the Enter key, whichever comes first. Press the x key, then Enter to exit without capturing. Does not accept a value.
signal
Captures an image when the timeout expires or when SIGUSR1 is received. Use SIGUSR2 to exit without capturing. Does not accept a value.
thumb
Default value: 320:240:70
Configure the dimensions and quality of the thumbnail with the following format: <w:h:q> (or none, which omits the thumbnail).
encoding
Alias: -e
Default value: jpg
Sets the encoder to use for image output. Accepts the following values:
-
jpg– JPEG -
png– PNG -
bmp– BMP -
rgb– binary dump of uncompressed RGB pixels -
yuv420– binary dump of uncompressed YUV420 pixels
This option always determines the encoding, overriding the extension passed to output.
raw
Alias: -r
Saves a raw Bayer file in DNG format in addition to the output image. Replaces the output file name extension with .dng. You can process these standard DNG files with tools like dcraw or RawTherapee. Does not accept a value.
The image data in the raw file is exactly what came out of the sensor, with no processing from the ISP or anything else. The EXIF data saved in the file, among other things, includes:
-
exposure time
-
analogue gain (the ISO tag is 100 times the analogue gain used)
-
white balance gains (which are the reciprocals of the "as shot neutral" values)
-
the colour matrix used by the ISP
latest
Creates a symbolic link to the most recently saved file. Accepts a symbolic link name as input.
autofocus-on-capture
If set, runs an autofocus cycle just before capturing an image. Interacts with the following autofocus_mode values:
-
defaultormanual: only runs the capture-time autofocus cycle. -
auto: runs an additional autofocus cycle when the preview window loads. -
continuous: ignores this option, instead continually focusing throughout the preview.
Does not require a value, but you can pass 1 to enable and 0 to disable. Not passing a value is equivalent to passing 1.
Only supported by some camera modules (such as the Raspberry Pi Camera Module 3).