There are some problem happened when I save avi video to jpg

1 view (last 30 days)
I want to save30fps avi video to jpg picture but person must be close his mouth at first for a period time, but picture is open mouth,and the same picture for hundreds of pictures After 10 sec pictures is different and may be right.
It happened in some videos but not happened in others with the same video recoder
I can't not find reason and can not search it on the net.
It happened the same like I open it with windows media player at first. but if I load video for a period time and let video play at the begining, the video return normal.
I=zeros(480,640);
figure('visible','off');
for pp=6:9
for p00=1:2
mov=VideoReader(strcat('pp',num2str(pp),'_',num2str(p00),'.avi'));
numFrames = mov.NumberOfFrames;
nowPath='F:\Desktop\matlab_code';
outputPath =strcat('F:\Desktop\matlab_code\pp',num2str(pp),'_',num2str(p00
)');
for b=1:1:numFrames
I = read(mov,b);
imshow(I);
cd(outputPath)
saveas(gcf,strcat(num2str(b),'.jpg'),'jpg');
cd(nowPath)
end
end
end
  2 Comments
Jon
Jon on 28 Jul 2015
You should try to save as a different filetype, like mp4. Also, I've had problems similar to yours which were resolved if I tried different video players. VLC is a nice, free media player. You can also load the video in Powerpoint and see if it displays correctly.
Yian
Yian on 29 Jul 2015
3Q ,I transform them to mp4 video , the question is resolved. BTW,there are still the same problem when playing on realplayer

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!