I tried to display frames (in MATLAB GUI axes) of video with intervals for example 0.5 s (i.e. first display frame from video time 0.0, then frame from video time 0.5 and so on).
The following code works really slowly:
vidObj = VideoReader('video.mp4');
for i=1:20
frame = readFrame(vidObj);
imshow(frame);
vidObj.CurrentTime = vidObj.CurrentTime + 0.5;
end
Do you know a better method for that?