Skip to content

allow enforcing a maximum scene length for the stitcher #306

Description

@owencking

New Feature Summary

As of swt-detection v9.0, we have a high degree of control over the number of representatives. This allows us to get frequent representatives for highly dynamic scenes, like credits. That's great!

However, some highly dynamic scenes can last for a long time. A 60s credits sequence with representatives every 2s, yields 30 representatives. For OCR/captioning workflows, this situation causes unpredictable VRAM requirements. We need some way to impose a limit for downstream VRAM demands.

It would be helpful to enforce a maximum scene length (expressed in milliseconds) for scenes with text, such that, for any would-be scene greater than that max length, the scene is split into (approximately) equal length segments each of which is less than that max.

For example, if a credits sequence lasts 180 seconds and would ordinarily have a 3-minute long scene, but there is a maximum scene length of 50 seconds, then the scene will be split into 4 scenes each of approximately 45 seconds.

Related

No response

Alternatives

No response

Additional context

This feels slightly hacky (though not too bad), but I can't figure out another way to avoid having to process an indefinitely large number of representatives in a single call downstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨NNew feature or request

    Type

    No type

    Projects

    • Status
      Todo
    • Status
      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions