It looks like your I1 is not a scalar or a 1x2 vector. Can you set a breakpoint at line 49 in ImageStore and say what I1 is.
I1 should be a frame number, e.g. 1, 10
or I1 should be a vector like [1 10] which says to read frames 1 to 10
You can also specify Inf like [10 Inf] read frames 10 to the end of the video.