MATLAB R2017a VideoWriter错误:属性无效

时间:2017-10-12 17:51:36

标签: matlab image-processing video-processing

我最近从MATLAB R2016a升级到R2017a(也从Windows 7改为现在使用Windows 10)。尝试使用VideoWriter创建视频对象来运行现有代码(没有任何更改),当我进入编写视频的阶段时,我收到以下错误:

Error using VideoWriter/writeVideo (line 369)
One or more properties of the video is invalid. Ensure 'Quality' and 'FrameRate' property of the object and the frame dimensions are within allowed range.

这是保存视频的代码:

v = VideoWriter('vidOutput','MPEG-4');
v.FrameRate = 240;
open(v);
for i = 1:size(data,2)
... code that plots an image frame...
F = getframe;
pause(0.000001)
writeVideo(v,F.cdata);
end

问题似乎与FrameRate属性有关。当它设置为150以上时,会发生错误。任何低于150的运行都可以。需要注意的是,在MATLAB R2016a上运行时,它确实适用于FrameRate = 240

知道可能出了什么问题吗?

0 个答案:

没有答案