Author Topic: Lightning capture - time discontinuity  (Read 7009 times)

kaklik

  • Newbie
  • *
  • Posts: 10
    • View Profile
Lightning capture - time discontinuity
« on: July 11, 2021, 05:51:23 AM »
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=18
It 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_yDNA
The 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.

Code: [Select]
+                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=3rmiTgen3hA

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









kaklik

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Lightning capture - time discontinuity
« Reply #1 on: July 15, 2021, 02:25:12 PM »
I have modified the trigger script in a way, that minimizes a possible disturbance of the camera video system by repeated requests. The new script version checks status before action.
It seems that time discontinuities are gone.

But the relevant trouble is the question, how to immediately restart the recording without periodic checking of file saving state?  In the case of external trigger initiated recording. There is an "Auto record" option that could be set from the camera menu. It ensures that recording is started immediately after the completion of the saving procedure.  Unfortunately, this option seems to have no effect in the case of file saving started from HTTP API.