I'm editing all frames of an existing mp4 video in MATLAB (doing it in a for loop). After I'm done editing, I want to save the new set of frames to a new output video file, but in mp4 rather than .avi (that seems to be the default). I thought changing the filename extension is sufficient, but apparently it's not. Any ideas?
newVid = VideoWriter(outputfilename);
newVid.FrameRate = fps;
newVid.Quality = 100;
open(newVid)
for...
writeVideo(newVid,imgs{i})%within the for loop saving one frame at a time
end
close(newVid)