Hello, I'm trying to save a video in .avi format but I just cannot do it. Whenever I see the final video on a player, I just get an static image that doesn't move at all. First I tried this:
angleview=linspace(0,360,18);
for tt=1:numel(angleview)
view(angleview(tt),30);
M(tt)=getframe(gcf);
end
movie2avi(M,'video.avi','compression','none','fps',4);
then this:
aviobj = avifile('video.avi');
angleview=linspace(0,360,18);
for tt=1:numel(angleview)
view(angleview(tt),30);
M(tt)=getframe(gcf);
aviobj=addframe(aviobj,M(tt));
end
aviobj=close(aviobj);
Whats wrong? I appreciate your help.

Réponses (1)

SR
SR le 12 Avr 2012

0 votes

Weird, both code pieces work for me, I see an .avi with a spinning axes. I'm running 2011b on 64-bit Windows.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by