Skip to content

Videograms

Auto-generated documentation for musicalgestures._videograms module.

videograms_ffmpeg

[find in source code]

def videograms_ffmpeg(
    self,
    target_name_x: str | None = None,
    target_name_y: str | None = None,
    overwrite: bool = True,
) -> 'MgList':

Renders horizontal and vertical videograms of the source video using ffmpeg. Averages videoframes by axes, and creates two images of the horizontal-axis and vertical-axis stacks. In these stacks, a single row or column corresponds to a frame from the source video, and the index of the row or column corresponds to the index of the source frame.

Arguments

  • target_name_x str, optional - Target output name for the vertical videogram (the x-axis collapse). Defaults to None (which assumes that the input filename with the suffix "_vgv" should be used).
  • target_name_y str, optional - Target output name for the horizontal videogram (the y-axis collapse). Defaults to None (which assumes that the input filename with the suffix "_vgh" should be used).
  • overwrite bool, optional - Whether to allow overwriting existing files or to automatically increment target filenames to avoid overwriting. Defaults to True.

Returns

  • MgList - An MgList with the MgImage objects referring to the horizontal and vertical videograms respectively.