I have a problem in MatLab. I try to read a video, and play it, but I only read a part of the movie, and I can't control the frame rate.
The idea is to treat the image after that, and do real-time processing, so I can't save the image in a file to create a video later.
Here is my code :
videoFReader = vision.VideoFileReader('movie.avi');
videoPlayer = vision.VideoPlayer;
while ~isDone(videoFReader)
videoFrame = step(videoFReader);
step(videoPlayer, videoFrame);
end
release(videoPlayer);
release(videoFReader);
This video contains 2521 frames, and I only read the 372 first frames.
Thanks in advance for your help !
Edit : Can this be a codec problem ?
Okay, if this can help anyone, I found out that the 64 bits video codec aren't right, and were the problems. It seems that if I want to solve the problem, going back to matlab 32 bits is the solution...