This is due to the fact that keyframes are not present in the file being loaded. To work around the issue, add key frames to the AVI-file, as in the code below:
tic
avi = avifile('int_with_keyframes.avi', 'Compression', 'Indeo5', 'Quality', 85);
for ii = 1:500:9000
frames = aviread('caille court.avi', [ii:ii+499]);
for jj = 1:length(frames)
avi = addframe(avi, frames(jj));
end
end
avi = close(avi);
toc
Best Answer