inputVideo = VideoReader('video1.avi');
ii = 1;
while hasFrame(inputVideo)
imgsq(:,:,:,ii) = readFrame(inputVideo);
ii = ii + 1;
end
outputVideo = VideoWriter('video1f62.avi');
outputVideo.FrameRate = inputVideo.FrameRate;
open(outputVideo)
%从第62帧截取视频
for ii = 62:size(imgsq, 4)
writeVideo(outputVideo,imgsq(:,:,:,ii))
end
close(outputVideo)
Matlab将视频分段截取
最新推荐文章于 2023-09-13 12:12:17 发布