-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: OPTIC-1608: Seeking video frame by frame sometimes produces duplicated or skipped frames visually #7027
Conversation
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
…Canvas Ref object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor suggestion, but other wise looks good.
Co-authored-by: yyassi-heartex <104568407+yyassi-heartex@users.noreply.github.com>
/git merge develop
|
Hey, thanks for implementing this! I was trying to test it on our videos as well as on the above 24fps video. I build the docker image for the app with However, it seems that the issue is still persisting. I made sure to clear the browser cache and the version displayed is 1.17.0-dev0. Any ideas why this might be the case? |
I tried it in both Firefox and Brave browser with same behaviour |
This is Feature Flagged to allow for rollout, so to enable the change in behaviour you will need to run your local Label Studio docker compose instance with the following environment variable set:
|
@bmartel YES! Thats it! With the flag enabled it works flawlessly! If I understand correctly, the frame labels are now indexed starting at 1? |
Although, there is still a small bug when pausing the video during playback. It seems that temporarily, the incorrect bounding box is displayed. But I think I will open this as a separate issue. Its probably related to the index calculation, but as part of the bounding box component. Thanks a lot! |
The original intent was such that they were reflecting a 1-based index for frames, so to not disturb this it retains that behaviour. The difference now is that the seeking is done such that it takes into account the maximum precision steps that the browser inherently has with regards to the currentTime being set. This was sometimes throwing that off internally, and just not actually seeking to the time we were enforcing because it was too specific and producing "ghost" frames, where some are skipped others are duplicated. |
PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
Change has impacts in these area(s)
(check all that apply)
Describe the reason for change
There were some reports of issues using Video with certain video files, specifically with regards to skipped or duplicated frames. Looking at the commonalities of these reports and investigating further the types of files that were producing known issues, the observation was that the way video was calculating frame seeking was incorrect.
There were two problems:
Reproduction
Created a Label Studio project with the following:
Config
Video File
fps_24_frames_9999_video.webm
What does this fix?
Closes #6593
What is the new behavior?
Seeking frame by frame now correctly works for all videos.
Kapture.2025-02-05.at.17.16.54.webm
What is the current behavior?
Seeking frame by frame worked for some videos, but struggled in cases where the framerate was low or in short video clips.
Kapture.2025-02-05.at.17.11.32.webm
What feature flags were used to cover this change?
fflag_fix_front_optic_1608_improve_video_frame_seek_precision_short
Does this PR introduce a breaking change?
(check only one)
What level of testing was included in the change?
(check all that apply)
Which logical domain(s) does this change affect?
Video