Question

I want to play an MP4 file showing a reaching task for an experiment. I am not sure how to formulate the syntax. So far I have:

moviefile = 'GOPR0056.MP4';
screenNum = 0;
[window, rect] = Screen('OpenWindow', screenNum, 1);
moviePtr = Screen('OpenMovie', window, moviefile);
Screen('PlayMovie', moviePtr, 1); 

But I'm getting an issue:

PTB-ERROR: Could not open movie file [GOPR0056.MP4] for playback! No such moviefile with the given path and filename. PTB-ERROR: The specific file URI of the missing movie was: file:///GOPR0056.MP4.

The file is located in the directory. May I be getting a video drivers error because this is a MP4 file. Thanks.

Était-ce utile?

La solution

When playing videos with Psychtoolbox, always provide the full path, even if the video is in the current directory. Try this:

moviefile = [pwd filesep 'GOPR0056.MP4'];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top