We research and compare products using published specifications, features and owner feedback. When you buy through our links, we may earn a commission. As an Amazon Associate I earn from qualifying purchases. Learn more›

Raspberry Pi HQ Camera Astrophotography Raspistill Settings: A Guide

Learn the raspberry pi hq camera astrophotography raspistill settings that matter: exposure, gain, white balance and long-exposure options for sharper night sky

Updated November 2026

This guide explains the raspberry pi hq camera astrophotography raspistill settings you need to take usable night sky images from a Raspberry Pi High Quality Camera. You will learn how to set shutter speed, gain, white balance and file format from the command line, and how to build a simple shooting routine. The settings below work for wide-field star shots and short deep-sky captures on a fixed mount.

Set the Basic Capture Mode First

Raspistill is the still-image tool in Raspberry Pi OS. For astrophotography, you want full manual control, so turn off the automatic features that fight you in the dark. Start with a command like raspistill -o test.jpg, then add the flags below to control the exposure yourself.

Shopping for one? See our guide: 5 Best Camera Settings for Astrophotography: Our Picks Compared (2026).

  • -ss sets shutter speed in microseconds. For example, -ss 5000000 is a five-second exposure.
  • -ISO sets sensor gain. Values from 100 to 800 are common starting points.
  • -awb off disables auto white balance so colors stay consistent between frames.
  • -awbg lets you set fixed red and blue gains if you want to control the color balance yourself.
  • -ex off turns off the automatic exposure mode so your shutter speed is respected.

Choose Shutter Speed and Gain

Shutter speed and gain trade off against each other. A longer exposure collects more light but makes stars trail as Earth rotates. A higher gain brightens the image but adds noise. For a fixed camera without tracking, most users keep exposures short enough to avoid visible star trails, then stack several frames later.

Target Suggested shutter (-ss) Suggested ISO
Wide star field, fixed tripod 5,000,000 to 15,000,000 us 400 to 800
Moon or bright planets 1,000 to 50,000 us 100 to 200
Milky Way with lens 10,000,000 to 25,000,000 us 400 to 800

These are starting points, not fixed rules. Check your histogram or a test frame and adjust until the sky background is dark but not crushed to black.

Handle Format, Quality and Output

For astrophotography, save raw data if your workflow supports it. Raspistill can include raw sensor data with the -r flag, which lets you process the image later without losing detail to in-camera compression. Set -q 100 for the highest JPEG quality if you are skipping raw. Use -t 1 or a short timeout when you are scripting batches, so the command does not wait for user input between frames.

Build a Repeatable Shooting Routine

Consistency matters more than any single setting. Capture a series of frames with identical settings, then stack them in software such as DeepSkyStacker or Siril to reduce noise. Shoot dark frames with the lens capped at the same exposure and temperature to subtract sensor noise later.

  1. Focus on a bright star at infinity, then lock the focus ring with tape.
  2. Set -awb off, -ex off, and a fixed -ss and -ISO.
  3. Take a test frame and check the stars for sharpness and the background for brightness.
  4. Shoot a sequence, such as 20 to 50 frames, with a loop or script.
  5. Shoot matching dark frames at the same settings.

Common Mistakes

  • Leaving auto white balance on, which shifts colors from frame to frame.
  • Using exposures so long that stars trail without a tracking mount.
  • Forgetting that gain adds noise, and pushing ISO up instead of stacking more frames.
  • Refocusing between frames, which makes stacking unreliable.
  • Skipping dark frames, which leaves fixed-pattern noise in the final image.

A sturdy tripod keeps the camera still during long exposures, which reduces the need for extra frames. View on Amazon

A dedicated lens with a suitable focal length gives a wide, sharp star field from the HQ Camera’s sensor. View on Amazon

FAQ

What shutter speed should I use with raspistill for stars?

Start between 5 and 15 seconds for a wide field on a fixed tripod. Longer exposures will show star trails unless you use a tracking mount.

Why should I turn off auto white balance?

Auto white balance changes color from frame to frame, which makes stacking and color correction harder. A fixed setting keeps the color consistent across the whole sequence.

Do I need raw files for astrophotography?

Raw files preserve more detail and give you more room to adjust exposure and color later. JPEG works for quick tests, but raw is better for final stacked images.

Conclusion

With manual exposure, fixed white balance and a steady routine, the Raspberry Pi HQ Camera can produce clean night sky images. Use shorter exposures with moderate gain, then stack many frames to build detail. For a broader view of the process, see Raspberry Pi HQ Camera Astrophotography: A Step-by-Step Guide and Best Astrophotography Camera Settings: A Step-by-Step Guide for Beginners.

Colin Foster

About Colin Foster

Colin Foster is part of our editorial team and reviews and edits our telescopes & stargazing guides, checking product details against manufacturer specifications and owner feedback.

About the author

Colin Foster
Colin Foster

Colin Foster writes reviews and buying guides for Astronomy Site.