Skip to content
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

Sub second marker timestamp precision #5431

Merged
merged 7 commits into from
Nov 2, 2024

Conversation

WithoutPants
Copy link
Collaborator

Resolves #5382

Allows specifying marker times by frame within seconds:

image
image

Frames are specified with a trailing .ffff which is the 0-based frame number.

Times with a fractional component are formatted as [hh:]mm:ss.ffff - frame number 12 at time 3:45 is displayed as 3:45:0012. The time field accepts the same value without the leading zeroes as well, ie 3:45.12, but will be re-formatted to the other format.

Times at frame 0 are accepted and displayed without the .ffff suffix.

Times from the current frame of the video will include sub-second precision.

The length of the ffff field was an arbitrary choice and I'm happy to hear alternatives.

This PR will be rebased once #5311 is merged.

@WithoutPants WithoutPants added the feature Pull requests that add a new feature label Nov 1, 2024
@WithoutPants WithoutPants added this to the Version 0.28.0 milestone Nov 1, 2024
@feederbox826
Copy link
Contributor

I personally don't prefer frames in SMPTE, I much prefer HH:MM:SS.ms since you

  1. avoid frame -> ms conversion, also dealing with DF/NDF (and video.currentTime is .ms)
  2. are able to get sub-frame precision easily
  3. .ms remains consistent across framerates and conversions
  4. makes semantic sense if finely adjusting it, since DF wraparound would be at 29.97 and jump to 00

If you do want to stick to SMPTE, then I suggest sticking with HH:MM:SS:FFFF to not confuse it with .ms

@damontecres
Copy link
Contributor

I also think that more users would be familiar with millisecond times over a frame number.

And not exactly relevant, but just as another data point for reference: Android media3's ExoPlayer uses a millisecond precision 64 bit integer for timestamps when playing video files.

@WithoutPants
Copy link
Collaborator Author

Thanks for the feedback. I've updated to use hh:mm:ss.ms instead. It simplified the code doing it that way anyway.

@WithoutPants WithoutPants merged commit e8125d0 into stashapp:develop Nov 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull requests that add a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add millisecond (or frame) precision to markers
3 participants