crewtimer / crewtimer-video-review

Utility app for connecting to FinishLynx or recorded video
MIT License
0 stars 0 forks source link

File Scrubber view assumes continuous time #30

Open glenne opened 1 month ago

glenne commented 1 month ago

The waypoint annotations on the File Scrubber sections currently assumes time is continuous time. That is, the location of the annotations is drawn as a single view and markers located based on a global start and stop time.

If the video recording has gaps for deleted files or pauses in the recording, the location of the indicators will not be correct.

To fix this, each 'segment' must draw it's own markers based only on that particular file.

To avoid traversing the entire list of time markers every time a new marker is added perhaps one traversal where the markers are placed into bins and then drawn would be a compromise.

glenne commented 4 weeks ago

Currently the length of a file is not known without opening the file and processing the mpeg headers. When there are gaps due to deleted files, the length of the file prior to the deleted segment is assumed to extend to the start of the next file.

As a result, when clicking in this 'dead space' the mapping to the VideoScrubber is not accurate. Icons are drawn in the correct location in the video scrubber but are not in the proper position in the File Scrubber due to the extended length with no data.

To fix this would require the application to scan each file to get an accurate length. One possible solution would be to store this info in the json file that can be associated with each file. If the json file does not exist, the mp4 file would need to be processed and the json file updated.