Skip to content

Write overall macro duration on export #96

@vadosnaprimer

Description

@vadosnaprimer

Hi. Over at tasvideos we're trying to support this replay format, and the one bit that's missing is a way to calculate overall movie time automatically. Normally we do this by either counting how many frames a movie has for cases when their rate is constant, or we parse the resulting time from the movie metadata when framerate is variable.

The latter seems to be the case for GZ macros, but there's no metadata we could parse directly (or indirectly). Macro duration is stored but frequency of those frames changes and there's no way to know which frames had which frequency without running it against the game (tho those aren't stored either). movie_last_recorded_frame is exported but not only is it in that VFR format but it seems to indicate whichever frame the author was recording last, which may not be the last frame of the movie.

Would it be feasible (and sufficient) to append gz.cpu_counter at the end of the macro upon export, or maybe a new variable would make more sense that'd store cpu_counter value that it had on the final frame of the macro? Since movie navigation is non-linear, I feel a bit of extra logic would be needed to properly update that value on movie extension or truncation.

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