ReduceVideo

ID: Multimedia/ReduceVideo


This is an array-based NumPy trace step for reducing video signals in frame rate, resolution or color channel count, to speed up subsequent video analysis steps.

A new video file (.mp4) will be created in the report folder. Because of video compression, do not expect the created frames to exactly fit the input video even if no resizing is done.

For an empty input (no frames) no video file will be created.

Signals

InputFrames

The input video signal.

  • Direction: IN

  • Optional: False

OutputFrames

The output video signal.

  • Direction: OUT

  • Optional: False

Parameters

OutputFilename

Name of the video file to be written. If not specified, ‘ReducedVideo’ will be used. If the file already exists, continuous numbering will be applied.

  • Direction: IN

OutputFrameRate

Frames per second for output video. If not specified, the (mean) frame rate of the input video is used. The output video is always written with a constant frame rate (CFR).

  • Direction: IN

ScaleFactor

Scaling factor that can be provided instead of a fixed output size. Do not provide both!

  • Direction: IN

OutputSize

Tuple (width, height) that describes the desired output video size. If the video codec does not support the specified size, it will use the next smaller supported size. Can be provided instead of a scale factor. Do not provide both!

  • Direction: IN

ConvertToGray

Set to True to write a gray scale video.

  • Direction: IN

TimeOffset

Input videos with a variable frame rate (VFR) might expose a time offset, i.e. the timestamp of the first frame being > 0. The output video will, however, always begin at t = 0. In such case, black frames are prepended and the time offset of the input video will be written into this output parameter, were it can be used to restrict an analysis to the time range of the input video via a trigger block.

  • Direction: OUT