VideoExtension

class lib.align.updater.VideoExtension(alignments: dict[str, Any], version: float, video_filename: str)

Bases: _Updater

Alignments files from video files used to have a dummy ‘.png’ extension for each of the keys. This has been changed to be file extension of the original input video (for better) identification of alignments files generated from video files

Parameters:
  • alignments (dict[str, T.Any]) – The serialized alignments that have been loaded from disk

  • version (float) – The alignments file version that has been loaded

  • video_filename (str) – The video filename that holds these alignments

Attributes Summary

is_updated

True if this updater has been run otherwise False

Methods Summary

test()

Requires update if the extension of the key in the alignment file is not the same as for the input video file

update()

Update alignments files that have been extracted from videos to have the key end in the video file extension rather than ',png' (the old way)

Attributes Documentation

is_updated

True if this updater has been run otherwise False

Methods Documentation

test() bool

Requires update if the extension of the key in the alignment file is not the same as for the input video file

Return type:

True if the key extensions need updating otherwise False

update() int

Update alignments files that have been extracted from videos to have the key end in the video file extension rather than ‘,png’ (the old way)

Parameters:

video_filename – The filename of the video file that created these alignments

Return type:

int

test() bool

Requires update if the extension of the key in the alignment file is not the same as for the input video file

Return type:

True if the key extensions need updating otherwise False

update() int

Update alignments files that have been extracted from videos to have the key end in the video file extension rather than ‘,png’ (the old way)

Parameters:

video_filename – The filename of the video file that created these alignments

Return type:

int