this one helps. I have solved it. I'd like to explain how, but I really have no clue. After several upgrades, dist-upgrades, ppa's added, etc. I got it to work. I hope if anyone finds this can at least use some of the comments to help out.
Does Python have an equivalent of VideoReader in Matlab?
hope this fix your issue With a typical video codec you can't decode frames individually, decoding always starts at a keyframe. Let's assume keyframes are 1,11,21,... While the real strategies are probably a little more advanced, just assume the first 10 frames are decoded at once and put into a cache, assuming that frame 2 to 10 are needed slightly after reading frame 1. This means you get 10 frames at a price of processing 1 keyframe and 9 difference frames. Now your loop, for the first iteration frame 1 and 2 is read and probably removed from the cache (who expects someone to read the same frame twice?). Now you read frame 2 and 3, 2 is not found so decoding has to start over again. For the 10th iteration where you read frame 10 and 11 it's the worse. The codec probably dropped frame 10 earlier so frame 1 to 10 are decoded again. Making this single last loop more expensive than reading full 10 frames in order, 2 keyframes and 9 difference frames are processed.
Video = VideoReader('test_E.avi');
GrayImage1 = rgb2gray(read(Video, 1));
for k = 1:1:100
GrayImage0 = GrayImage1;
GrayImage1 = rgb2gray(read(Video, k+1));