Closed olokos closed 1 year ago
There are 2 bugs with this PR at the moment, that needs fixing before or after merging.
As for the bug 1 with 1kb recordings being saved, I suspect I might have introduced an infinite loop here:
Bug 2 might be related to the above screenshot
While with Bug 3 - I'm not sure how it was initially planned, but IMO it's quite good that it saves to filename the amount of changes that triggered saving, instead of the final/avg amount of changes saved into the filename, as it allows for better tweaking of that configuration file.
It's my first time working with golang, so bear with me :)
For reference, I've set the pixelChangeThreshold
to 8000
here, so anything above 8000 pixels should already trigger the log with "Attempted to save changes"
More details about bug 2:
There's no "Attempted to save changes" log, as if it wouldn't save count to filename, right? Well, wrong, it did!
1660645374_6-967003_NaUliceKamera_200-200-400-400_8399_769.mp4
But as for the second time the threshold was reached, there was a log about saving changes to the filename: and the resulting filename is:
1660645408_6-967003_NaUliceKamera_200-200-400-400_8277_769.mp4
So technically it works great, but log print is delayed?
I think the approach is great to save the first frame changes that triggered the recording to filename, without playing around with averaging or taking the highest value, as it tells the user clearly how many pixels changed here that were enough for triggering saving the recording. But as can be seen on screenshots above, the message with changes is a bit buggy right now.
This is the first implementation of the recording data being sent as a metadata struct, so it could be applied to the output filename of the recording.
I have also updated a lot of go and javascript (yarn/npm) dependencies.
I made Dockerfile to use node16 - since it's the latest LTS supported version aswell as some other improvements.
Each commits has quite well described commit message
With this commit I'm also updating
develop
branch to the current code state inmaster
, so there will be no issues later on when merging this.