Skip to content

Extend image_name_template to allow timestamp  #394

@Veldhoen

Description

@Veldhoen

Problem/Use Case

The current implementation for image_name_template allows four placeholders (of which FRAME_NUMBER is not described in the documentation).

                    VIDEO_NAME=video.name,
                    SCENE_NUMBER=scene_num_format % (i + 1),
                    IMAGE_NUMBER=image_num_format % (j + 1),
                    FRAME_NUMBER=image_timecode.get_frames()), image_extension)

In our use case, we would like to use the image timstamp in the filename, to be able to directly match the image with the right location in the video. Specifically, we would like to use the timestamp as in milliseconds from start, so we can use integers to refer to them.

Proposed Implementation:

In terms of implementation, it is pretty trivial to add this option just by adding
FRAME_TIMESTAMP_MS = int(image_timecode.get_seconds()*1000). (using FrameTimeCode.get_seconds)

To enable users to use this, all that needs to be done is extend the documentation specifying $FRAME_TIMESTAMP_MS as one of the template options.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions