pvlbzn / avgframe

Reverse of a time lapse videos. Map video to one image.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Average Frame

Produce one frame from a sequence of frames such that resulting frame represents an average of a sequence.

Algorithm

Where X is a set of frames, x is a particular frame.

Usage

From terminal:

python3 path/to/video/file.mp4 frames_to_skip frames_to_grab

From REPL:

from src import averanger as a

# Path to your video file
path = 'data/video.mp4'

# Frames to skip
skip = 2000

# Frames to grab
grab = 25

a.averengify(path, skip, grab)

Outcomes

There is no one unique recipe besides basic video analysis. General rules are the following:

  • The more video is centered on some object and more this object 'still' the bigger grab value can be taken

  • The more video intense (change of the background, absence of central or 'still' object) the smaller grab value should be

170 Frames, Still

170 frames

5 frames, Action

5 frames

10 frames, Action

10 frames

25 frames, Action

25 frames

50 frames, Action

50 frames

About

Reverse of a time lapse videos. Map video to one image.


Languages

Language:Python 100.0%