pliers.stimuli.VideoFrameStim

class pliers.stimuli.VideoFrameStim(video, frame_num, duration=None, data=None)[source]

Bases: ImageStim

A single frame of video.

Parameters
  • video (VideoStim) – The source VideoStim the frame is drawn from.

  • frame_num (int) – The index of the current frame in the source video.

  • duration (float) – Optional duration of presentation, in seconds.

  • filename (str) – Path to input video file, if one exists.

  • data (ndarray) – Optional numpy array to initialize the image from.

__init__(video, frame_num, duration=None, data=None)[source]
get_bytestring(encoding='utf-8')

Return the image data as a bytestring.

Parameters

encoding (str) – Encoding to use. Defaults to utf-8.

Returns: A string.

get_filename()

Return the source filename of the current Stim.

property history

Return stimulus history.