I want to write multiple video files and my conditions are here
j=1 if (t >= 125) writerObj1 = VideoWriter('voilation1.avi'); open(writerObj1); writerObj2 = VideoWriter('violation2.avi'); open(writerObj2); disp("<--------- Violation Detected----------> ") vidname=strcat('writerObj',num2str(j)); writeVideo(vidname,img1); end if(t ==600) close(vidname); j=j+1; end
Best Answer