Video
显示 更早的评论
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.
回答(1 个)
SR
2012-4-12
0 个投票
Weird, both code pieces work for me, I see an .avi with a spinning axes. I'm running 2011b on 64-bit Windows.
类别
在 帮助中心 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!