Skip to content

fix(frames): correct extracted frame timestamp calculation#2175

Merged
zzacharo merged 1 commit intoCERNDocumentServer:mainfrom
zubeydecivelek:frame-timestamp
Apr 22, 2026
Merged

fix(frames): correct extracted frame timestamp calculation#2175
zzacharo merged 1 commit intoCERNDocumentServer:mainfrom
zubeydecivelek:frame-timestamp

Conversation

@zubeydecivelek
Copy link
Copy Markdown
Contributor

@zubeydecivelek zubeydecivelek commented Apr 21, 2026

Frame timestamps were calculated with start_time + (i + 1) * time_step. Because enumerate(frames) starts at i = 0, the very first extracted frame was being stored with a timestamp one full step later than its actual position in the video.

Example:
start_time = 5s
time_step = 10s
extracted frames correspond to positions 5s, 15s, 25s, ...

(i + 1) logic stored them as:

  • frame 0 → 15s
  • frame 1 → 25s
  • frame 2 → 35s

This means every frame timestamp was shifted forward by one interval.

@zzacharo zzacharo merged commit 19abce8 into CERNDocumentServer:main Apr 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants