Skip to content

Variable frame rate (FPS 0) is not supported #9

@Endilll

Description

@Endilll

Key points:

  • I haven't decided on one true way of "addressing", so internally VSPreview equally supports frames and timestamps
  • There are probably some parts of code that relies on timestamp addressing, including ones that haven't been written yet
  • Support for frame addressing with VFR clips is technically possible to implement in VSPreview alone
  • VFR makes timestamp addressing quite difficult to implement
  • Support for timestamp addressing with VFR clips requires at least some kind of index.

How a proper solution could look like:

  1. Source filters supply timestamp for each frame in clip's properties. They probably already have them in their own index files
  2. VapourSynth does a great job keeping this metadata intact through all manipulations with the clip, taking care of all corner cases
  3. VSPreview takes advantage of the fact that for VFR clip with metadata seeking by timestamp is O(log n).

For instance, given the following CFR and VFR clips:

0    1     2      3      | 0    1     2
0 ms 50 ms 100 ms 150 ms | 0 ms 25 ms 80 ms

appending the latter to the former would result in:

0    1     2      3      4      5      6
0 ms 50 ms 100 ms 150 ms 200 ms 225 ms 280 ms

See also this comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions