Skip to content

average() not working/available #325

Description

@aski-codes

I am unable to call average() like described in example 8 from https://github.com/fourMs/MGT-python/blob/master/docs/examples.md :

mv = mg.MgVideo(mg.examples.pianist)
...
average_standard = mv.average()

I get an error message that MgVideo does not have an average attribute.

Activity

  1. joachimpoutaraud commented on Mar 16, 2026

    @joachimpoutaraud
    Contributor

    Hi,

    I think the documentation hasn't been updated here. I recommend checking the documentation here: https://github.com/fourMs/MGT-python/wiki

    If you want to compute the motion average of your video file, use the following code:

    source_video = musicalgestures.MgVideo('/path/to/source/video.avi')
    motion_average = source_video.blend(component_mode='average') # average image of the video
    motion_average.show() # view result
  2. Copilot commented on Apr 13, 2026

    Copilot
    Contributor

    The agent encountered an error and was unable to start working on this issue: The service is temporarily unavailable. Please try again later. (Request id: 8C28:28356A:4351B1:32CEE0:69DD0265)

  3. alexarje commented on Apr 13, 2026

    @alexarje
    Contributor

    Can you try this one again?

  4. removed their assignment
    on Apr 13, 2026
  5. joachimpoutaraud commented on Apr 15, 2026

    @joachimpoutaraud
    Contributor

    In order to get the average picture of a video it is now required to call the .blend(component_mode='average') function.
    The .average() function was removed from the musical gestures toolbox. Functions that blend two video frames into each other are now accessible with the .blend() function.

    You can check wiki documentation for more details: https://github.com/fourMs/MGT-python/wiki/4-%E2%80%90-Video%E2%80%90based-Processes#blend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions