Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent white balance #37

Open
jankais3r opened this issue Aug 7, 2018 · 10 comments
Open

Inconsistent white balance #37

jankais3r opened this issue Aug 7, 2018 · 10 comments

Comments

@jankais3r
Copy link

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?

@moritzmhmk
Copy link
Owner

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.

@jankais3r
Copy link
Author

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.

@moritzmhmk
Copy link
Owner

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.

@jankais3r
Copy link
Author

img_2702
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. :(

@moritzmhmk
Copy link
Owner

Does using something longer than 1.0 seconds change the effect?

@jankais3r
Copy link
Author

This is what -ss 3.0 looks like.
img_2356

@moritzmhmk
Copy link
Owner

does something like 15s look any better?

@jankais3r
Copy link
Author

jankais3r commented Aug 13, 2018

  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

img_2790

@jankais3r
Copy link
Author

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.

@jankais3r
Copy link
Author

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.
camera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants