How to convert captured frames from webcam into avi format with 20fps.
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I've used this code then it is saving the video but it's not playing when I go to that folder andplay with media player:
I'll be thankful if you may help
cd ('E:\8th semester\Machine vision LAB\Talha Data for open ended lab')
cam = webcam;
writerObj=VideoWriter('MyAVI.avi');
open(writerObj);
for i=1:60
filename = sprintf('153MC%0d.png', i);
imwrite(snapshot(cam),filename);
b=imread(['153MC',num2str(i),'.png']);
writeVideo(writerObj,b);
end
close(writerObj);
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!