The steps required for video editting:
- Identify your input Video
- Expound the video by assuming each frame is an Image
- Perform some image editting or analysis
- Paste all the processed Images in a single sequence
- Create a new Video
fin = 'rawVideo.avi'; %input File name to be changed
fout = 'movie2.avi'; %output File name to be changed
%get the File info
fileinfo = aviinfo(fin);
%get the number of Frames
nframes = fileinfo.NumFrames;
aviobj =
avifile(fout, 'compression', 'none', 'fps',fileinfo.FramesPerSecond);
for i = 1:nframes %You may need to limit the nFrames, may result in a large file size
%Read frames
from input video
mov_in = aviread(fin,i);
im_in =
frame2im(mov_in);
%Do processing on each frame of the video
%TO DO.....
%Write frames to output video
frm =
im2frame(im_out);
aviobj = addframe(aviobj,frm);
i %Just to display frame number you can ommit
end;
%Don't forget to close output file
aviobj = close(aviobj);
return;
Thanks!
ReplyDeleteDo you know how to plot 5 points of a trajectory and then erase them and plot the next five and so on? When I create this kind of videos after several trajectories what you see is a mess and you cannot distinguish between different trajectories ... Thanks
ReplyDeleteThe command you are looking for is called "clf" and clears the plots from the current fig, while keeping the fig. Usually you place it before the new plotting command (in the loop you have i guess) so that your eye does not notice the difference. Cheers!
DeleteApple Clips is a video editing app that lets users create and share short videos complete with special effects, text, and graphics.
ReplyDeleteOne of the more interesting features of Clips is Live Titles, which let you create animated captions by talking as you record.
On Facebook, users play up to 85 percent of videos without sound, making this one of the more valuable video social media tools for boosting engagement rates.