homebridge-camera-rpi
homebridge-camera-rpi copied to clipboard
Inconsistent white balance
In the Live streaming mode the camera picture is correctly white-balanced. However, the static snapshots have this awful yellow tint.
See here: https://imgur.com/YfVnA7Y
We start with a yellow tint, then I switch to the Live mode and the picture gets properly white-balanced, then I exit the Live mode and another yellow snapshot gets generated.
Would it be possible to use the same settings for both the Live feed and the snapshots?
Seems like the first seconds of livestream have the same tint.
Maybe I could try to capture a few seconds before taking a snapshot... but that would probably break things like live notifications on motion detection, door bell etc. because of the delay.
The first seconds of livestream (at least for me) are not an actual livestream. They have the same tint, some artifacts and it's just a still picture without any movement. Once the frames start moving, they start with the right color balance right away.
Here you could add the option -ss 1.0
to seek the first second (or more maybe) and try if it helps with the tint. I can't test this currently.
This is a result of adding
-ss 1.0
. I tried adding it to the input part, to the output part and to both parts of the command. Same result for all of them. :(
Does using something longer than 1.0 seconds change the effect?
This is what -ss 3.0
looks like.
does something like 15s look any better?
let ffmpegCommand = `\
-f video4linux2 -input_format mjpeg -ss 15.0 -video_size ${request.width}x${req$
-vframes 1 -f mjpeg -`
the only notable difference is that it now takes longer to generate this crappy snapshot
Would it be possible to generate the static snapshots using raspistill instead of ffmpeg? It seems that people are getting better quality photos with it.
Would it be possible to generate the static snapshots using raspistill instead of ffmpeg? It seems that people are getting better quality photos with it.
To answer my own question, it is possible and it gives better results. See comparison below. I'll submit a pull request tonight after I do some more testing.