Delete some frames of a video
7 views (last 30 days)
Show older comments
I have uploaded a video on Matlab and using the following code, I manage to read each frame and plot it on a figure:
x = VideoReader('name_of_video.avi');
figure
for i = 1:number_of_frame
frame_x = read(x,[i]);
imshow (frame_x)
end
Is it possible to delete some of these frame?
0 Comments
Answers (1)
Image Analyst
on 20 Jul 2020
Yes, you have to instantiate both a VideoReader and a VideoWriter. Then loop over frames and skip over frame numbers that you don't want to transfer/write. I'm attaching a demo that you can probably adapt.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!