making a quicktime movie

Hi,

I have an experiment that shows colored objects moving around on a black screen.
It draws the objects using Screen. After the positions are updated, the screen
is flipped, and the objects are redrawn. I want to make a quicktime video of
what appears on the screen. How do I do this?

Thanks
Hi Peter,

This should about do the trick:

%----
% record movie of trial - don't forget to save it to avi by hand
% afterwards with
% movie2avi(ims,'filename.avi','COMPRESSION','None','FPS',60) -- set FPS to
% screen's framerate, e.g. VLC seems to be able to play right about any
% framerate

ims.cdata = []; ims.colormap = []; end; % struct for
movie frames -> for avi output -- trick here is that for movie2avi()
to work, the struct must have the fields cdata and colormap, even if
colormap is not used.

for q=1:nframes % display all your frames, notice that q is the
current frame number
%...
ims(q).cdata = Screen('GetImage', ....);
%...
end

% as noted above, now just use movie2avi() to save the file. Check the
help of that function to see which formats are avaiable for your
platform (on windows, I think MATLAB is able to use any properly
installed codec of your choice).
%----

Best,
Diederick


On Wed, Apr 1, 2009 at 8:38 PM, peter.scarfe <peterscarfe@...> wrote:
>
>
> Hi,
>
> I want to make a quicktime movie from stimuli presented in PTB for use in
> presentations, is there a simple way to do this?
>
> I can see that a portion of the screen window can be captured using the
> Screen('GetImage', ) command. But is there a simple way to make these
> captured frames into a quicktime (or other format) movie for use in
> powerpoint presentations etc.
>
> Thanks,
>
> Peter