Hello,
I am trying to set up an all-sky system to capture lightning for a thunderstorm research project. The one partially successful result is here:
https://youtu.be/TS5qrMavIaQ?t=18It has been captured manually by controlling the camera from the web interface.
Today I want to improve the setup with the prepared python script
https://github.com/ODZ-UJF-AV-CR/CRREAT_cars/blob/master/chronos_camera/record_trigger.py which I intend to use for saving the video records.
I supposed the camera should be activated by manually enabling the "Recording" from the web interface. From the preliminary tests, this expectation looks correct.
Unfortunately in the field during a thunderstorm, I captured the following video:
https://www.youtube.com/watch?v=sA-Q35_yDNAThe video contains multiple time inconsistencies which are visible on movements of raindrops and clouds. The exact time inconsistencies are on 0:14, 0:26, 0:36, 0:50, 1:01 etc. Despite the fact, the text overlay claims the video has around 8 seconds the recorded video looks more like a timelapse of the sky during the save of video buffers (which takes several minutes).
Therefore I modified the script during the thunderstorm to stop recording before save.
+ post = requests.post('http://chronos.lan/control/stopRecording')
+ time.sleep(2)
post = requests.post('http://chronos.lan/control/startFilesave', json = {'format': 'h264', 'device': 'mmcblk1p1'})
print("Camera recording: " + post.reason)
The result is in the following video:
https://www.youtube.com/watch?v=3rmiTgen3hAAlthough the lightning was really captured in the middle of the video, there is at least one-time glitch on 2:21 of video time.
What is the correct workflow to capture and save few last seconds (for example latest 3seconds) of video from the video buffer by using the HTTP API?
Thanks for the quick reply in advice, the thunderstorm season is short.