Movie Component¶
The Movie component allows movie files to be played from a variety of formats (e.g. mpeg, avi, mov).
The movie can be positioned, rotated, flipped and stretched to any size on the screen (using the Units for the window and stimuli given).
- Categories:
Stimuli
- Works in:
PsychoPy, PsychoJS
Parameters¶
Basic¶
The required attributes of the stimulus, controlling its basic function and behaviour
- Name
Everything in a PsychoPy® experiment needs a unique name. The name should contain only letters, numbers and underscores (no punctuation marks or spaces).
- Start
When the Movie Component should start, see Defining the onset/duration of components.
- Expected start (s)
If you are using frames to control timing of your stimuli, you can add an expected start time to display the component timeline in the routine.
- Start type
How do you want to define your start point?
Options:
time (s)
frame N
condition
- Stop
When the Movie Component should stop, see Defining the onset/duration of components.
- Expected duration (s)
If you are using frames to control timing of your stimuli, you can add an expected duration to display the component timeline in the routine.
- Stop type
How do you want to define your end point?
Options:
duration (s)
duration (frames)
time (s)
frame N
condition
- Movie file
A filename for the movie (including path)
- Force end of Routine
Should the end of the movie cause the end of the Routine (e.g. trial)?
Layout¶
How should the stimulus be laid out on screen? Padding, margins, size, position, etc.
- Size [w,h]
Size of this stimulus (either a single value or x,y pair, e.g. 2.5, [1,2]
- Position [x,y]
Position of this stimulus (e.g. [1,2] )
- Spatial units
Spatial units for this stimulus (e.g. for its position and size), see Units for the window and stimuli for more info.
Options:
from exp settings
deg
cm
pix
norm
height
degFlatPos
degFlat
- Anchor
Which point in this stimulus should be anchored to the point specified by Position [x,y]?
Options:
center
top-center
bottom-center
center-left
center-right
top-left
top-right
bottom-left
bottom-right
- Orientation
Orientation of this stimulus (in deg)
Options:
-360
360
Appearance¶
How should the stimulus look? Colors, borders, styles, etc.
- Opacity
Vary the transparency, from 0.0 (invisible) to 1.0 (opaque)
- Contrast
Contrast of the stimulus (1.0=unchanged contrast, 0.5=decrease contrast, 0.0=uniform/no contrast, -0.5=slightly inverted, -1.0=totally inverted)
Playback¶
How should stimulus play? Speed, volume, etc.
- Loop playback
Whether the movie should loop back to the beginning on completion.
- No audio
Prevent the audio stream from being loaded/processed (moviepy and opencv only)
- Backend (if running locally)
What underlying Python library to use for loading movies
Options:
ffpyplayer
moviepy
opencv
vlc
- Volume
How loud should audio be played?
- Stop with Routine?
Should playback cease when the Routine ends? Untick to continue playing after the Routine has finished.
Data¶
What information about this Component should be saved?
- Save onset/offset times
Store the onset/offset times in the data file (as well as in the log file).
- Sync timing with screen refresh
Synchronize times with screen refresh (good for visual stimuli and responses based on them)
Testing¶
Tools for testing, debugging and checking the performance of this Component.
- Disable Component
Disable this Component
- Validate with…
Name of the Validator Routine to use to check the timing of this stimulus. Options are generated live, so will vary according to your setup.
See also
API reference for MovieStim