You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Vistalab,
I'd like to record a video of pRF mapping stimuli but haven't been successful in forcing Psychtoolbox to do so. I have tried adding VideoRecordingDemo('pRF.avi',0, 0,1,1) at the beginning of doRetinotopyScan.m. It starts recording but fails to continue due to codec issues. Although this is a Psychtoolbox, not a Vistadisp issue, I would greatly appreciate your advice on how to record a video of bar stimuli?
Many thanks in advance and kind regards,
Ahmadi
The text was updated successfully, but these errors were encountered:
Note that it will take a lot of memory, though, since concatenating all the images makes for a very large array before it gets compressed into an MP4. Once saved, it is about 5 MB.
% Get PRF directory (requires Remote Data Toolbox)
erniePRF = mrtInstallSampleData('functional', 'erniePRF');
cd(erniePRF);
% Load images and parameters from the pRF experiment
load('8_bars_images');
load('8_bars_params');
% Get frame rate
isi = median(diff(stimulus.seqtiming));
frameRate = round(1/isi);
% Initialize a movie
myMovie = images(:,:,stimulus.seq);
% Pad with singleton dimension so Matlab knows it's a gray-scale movie% ( x * y * 1 * n)
sz = size(myMovie);
myMovie = reshape(myMovie, sz(1),sz(2),1,sz(3));
% Initialize a video writer
v = VideoWriter('PRF.mp4', 'MPEG-4');
v.FrameRate =frameRate;
% Open it, write it, and close it
open(v);
writeVideo(v,myMovie)
close(v);
Dear Vistalab,
I'd like to record a video of pRF mapping stimuli but haven't been successful in forcing Psychtoolbox to do so. I have tried adding VideoRecordingDemo('pRF.avi',0, 0,1,1) at the beginning of doRetinotopyScan.m. It starts recording but fails to continue due to codec issues. Although this is a Psychtoolbox, not a Vistadisp issue, I would greatly appreciate your advice on how to record a video of bar stimuli?
Many thanks in advance and kind regards,
Ahmadi
The text was updated successfully, but these errors were encountered: