I just installed the v2 NoIR camera module in a Pi 3. I try raspistill -o test.jpg -t 5000. I see proper preview for 5 seconds, then preview window closes and I find the file test.jpg, but despite the preview having been ok that picture is just black. What I do wrong?

  • Could you try flipping the order of -o test.jpg and -t 5000?
    – goobering
    Commented Jul 4, 2016 at 15:34
  • @goobering Thanks, flipping the args seem to do the trick. Please add as an answer.
    – 0__
    Commented Jul 4, 2016 at 16:40
  • Err ... the order of the options to raspistill has no effect at all; options are parsed up front then the resulting values (like timeout etc.) are used in the same way regardless of the order they were specified in. Whatever fixed your issue I can pretty much guarantee it wasn't the ordering of the options.
    – Dave Jones
    Commented Jul 4, 2016 at 20:16
  • @DaveJones Well I can only tell what I see. But what I also see is that if I shoot multiple images with timelapse the early ones can go completely bananas with respect to exposure, even if using the same awb, shutter times etc. So definitely this tool raspistill has some severe bugs built it. Another thing that guarantees black images is the --ISO setting, no matter what value you choose.
    – 0__
    Commented Jul 4, 2016 at 23:30

3 Answers 3


The order of the options passed to raspistill is non-trivial - you should always finish with your output file location, not with an option.

In this case, swapping the preview timer option with the output location worked:


raspistill -o test.jpg -t 5000


raspistill -t 5000 -o test.jpg

Seems a problem of the preview mode. If I choose --nopreview, image comes out as expected.


Jhony come lately

i do this: raspistill -t 5000 -awb off -ex off -drc off -ss 5400 -awbg 1.1,1.95 -ISO 120 -ag 1 -dg 1 -vf -hf -o LastImageName.jpg

and get a good preview and a black file.

when i remove the "-ex off" i get an over exposed image. any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.