Repository navigation
stereo-gui: Improve Sync, Add QOL Features - #47
Conversation
This change hopefully improves sync by waiting until the sync is complete. This change also adds some QOL features such as sync logging, record time, and automatic timecode header insertion.
This change makes the recording time start when the cameras are synced. This makes the recording time on the web page accurate.
This change automatically converts the recordings to an MKV, which makes the camera much easier to use. The README was updated to match recent changes.
This is because it seems that we don't need to sync the time between the cameras anymore.
This is because these transforms are empty, so they are only cluttering the code.
ao-david
left a comment
There was a problem hiding this comment.
Not sure how related some of these changes are, I found it quite hard to review (partially that I'm out of date with python), but mostly because of all of the context switching.
| self._log_to_file("CORRECTION", correction) | ||
| else: | ||
| # Only update the last frame duration after a correction | ||
| self.last_frame_duration = frame_duration |
There was a problem hiding this comment.
the comment says only update after a correction, but isn't the else statement mean there isn't a correction?
| return | ||
| try: | ||
| timestamp = datetime.datetime.now().isoformat() | ||
| with open(self.current_log_file, 'a') as f: |
There was a problem hiding this comment.
Not sure about the logic of with, is that opening the file everytime this is called, or opens it once and knows to keep it open?
There was a problem hiding this comment.
It is opening and then closing the file every time this is called, however this function is called relatively infrequently (a few times a minute at most). Opening the file each time is probably the way to go in this context since it is safer because we are flushing the file each time so we won't lose data if we crash.
This PR improves the synchronisation of the cameras when recording video. It also adds some quality of life improvements, including: