hi, I want to do do some video quality reduction fastly, I am using parallel computing , but this error is coming: 'Cannot call READ method after using READFRAME or HASFRAME methods or setting the CURRENTTIME property. Recreate the object to read a frame at a specific frame index'
my code is
videoSrc = VideoReader('rhinos.avi');% v = VideoWriter('newfile.avi');
% open(v)
spmd if labindex==1 v = VideoWriter('newfile.avi');open(v) for sr = 1:700 huo = read(videoSrc,sr); RGB2 = imresize(huo, [300 NaN]); writeVideo(v,RGB2) % waitbar(sr / videoSrc.NumberOfFrames)
end close(v) else R = rand(4,4); end end
Best Answer