Dear all,
I would like to display multiple different movies (but same length) concurrently. I simply extended the SimpleMovieDemo.m by repeating the critical sentences like below and it worked. Is this the best way? (I don’t think so.) Is there any way to increase processing speed? I wonder if there is anything to make the code efficient. I would appreciate any help and comment. Thank you,
moviename1 = [ pwd '/movie/1.mov' ];
moviename2 = [ pwd '/movie/2.mov' ];
...
% Open movie file: 1350 x 1080
movie1 = Screen('OpenMovie', win, moviename1);
movie2 = Screen('OpenMovie', win, moviename2);
....
% Start playback engine:
Screen('PlayMovie', movie1, 1);
Screen('PlayMovie', movie2, 1);
...
% Playback loop: Runs until end of movie or keypress:
while ~KbCheck
% Wait for next movie frame, retrieve texture handle to it
tex1 = Screen('GetMovieImage', win, movie1);
tex2 = Screen('GetMovieImage', win, movie2);
...
% Draw the new texture immediately to screen:
Screen('DrawTexture', win, tex1,[],[0,0,1350/2,1080/2]);
Screen('DrawTexture', win, tex2,[],[0+1350/2,0,1350/2+1350/2,1080/2]);
...
end
% and then release texture, stop, and close the movie.