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

Add parameters to specify a partial segment (start time and end time) of the video #51

Closed
owencking opened this issue Jan 17, 2024 · 5 comments
Labels
✨N New feature or request
Milestone

Comments

@owencking
Copy link
Collaborator

New Feature Summary

As a user, when I specify a start time and/or an end time, the app detects scenes only for that period of the video. After the end time is reached, no more frames are extracted, and execution completes.

This would allow identification of scenes only within a time period of interest, minimizing the execution time for the app. This will be especially useful for detecting bars at the beginning of videos. It is also useful for testing and evaluation.

Suggested names for the new parameters: startTime and endTime.

Related

No response

Alternatives

No response

Additional context

No response

@owencking owencking added the ✨N New feature or request label Jan 17, 2024
@marcverhagen marcverhagen added this to the swt-3.0 milestone Jan 17, 2024
@marcverhagen marcverhagen self-assigned this Jan 17, 2024
@marcverhagen
Copy link
Contributor

This should be easy to do. One thing to discuss is what time units to accept. In MMIF we are moving towards a default of using milliseconds, and maybe even disallow other time units.

But this is not MMIF. And no user in their right mind would probably enjoy using startTime=630000 and endTime=640000 if they want processing limited from 10:30 till 10:40.

@keighrim
Copy link
Member

Well, I think this is still MMIF , as those parameter values are stored under view metadata in the output MMIF.

In clamsproject/mmif#192 , we decided to move away from allowing different time units, and stick to an integer type. If the app allows "start" and "end" param values passed as ISO format string, there are few things to consider, off the top of my head;

  1. Allowed granularity
  2. Handling conversion that minimizes any errors
  3. User education
  4. Documentation

First two are not problems if we stick to millisecs. For the rest, then, I think we need to include the time unit name itself as a part of the parameter name to make it transparent without separate , verbose documentation. For example , startWatchingFromMilliseconds.

@owencking
Copy link
Collaborator Author

From my perspective, values in milliseconds are totally fine for this parameter.

I'm now in the habit of thinking of all CLAMS/MMIF durations and time markers in terms of milliseconds.

@marcverhagen
Copy link
Contributor

Ah, we disagree on whether this is MMIF. I don't think it is. What is MMIF is that milliseconds are the unit for annotation types (assuming we are going that way) and that we have a dictionary of parameters in the metadata. That does not preclude allowing the CLAMS user to specify seconds or an ISO format string and convert 10 seconds to 10000 ms and "1:10" to 70000.

My preferred way is usually to do what is natural for the user, and if that takes some conversion then that is worth it.

Having said that, given Owen's remark it certainly makes sense to go with milliseconds for now.

@marcverhagen
Copy link
Contributor

This is done in 63ef0a5, but using startAt and stopAt instead of the suggested startTime and endTime in order to stay consistent with other apps.

@clams-bot clams-bot removed this from the swt-3.0 milestone Jan 29, 2024
@keighrim keighrim added this to the swt-v3 milestone Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨N New feature or request
Projects
Archived in project
Development

No branches or pull requests

4 participants