'python raspberry camera settings for night
I have here my perfect setup for my raspberry video.
raspivid -fps 25 -sh 0 -co 50 -br 50 -sa 0 -ISO 800 -ev +2 -ex auto -awb auto -mm average -n -b 2000000 -w 1920 -h 1080 -o /home/pi/cam/nachtvideo.h264 -t 0
Now I have but this fancy python script:
with picamera.PiCamera(resolution='1280x720', framerate=30) as camera:
output = StreamingOutput()
camera.brightness = 55
camera.contrast = 75
camera.sharpness = 0
camera.saturation = 0
camera.iso = 800
camera.exposure_mode = 'auto'
camera.start_recording(output, format='mjpeg')
Does someone know how I can make the same effect just as one liner in the python script? Because if I would run the script I can see only black and everything is really dark..
Thanks for your help.
Solution 1:[1]
The values, which the python script passes to the camera are sometimes a little bit different from the ones of the raspivid command. Raising the ISO, the brightness, the saturation and hardcoding a high exposure is sometimes necessary here. When I made a timelapse of my street at night, I had to use the 'verylong' exposure_mode, to make it see anything at all.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ductTapeIsMagic |