You can
obj.NumberOfFrames
before you have done the first readFrame(), but not after you have done the first readFrame()
When you
obj.NumberOfFrames
you get an estimate of the number of frames, based upon the approximate frame rate and the recorded duration of the movie. However, this can be off by about +/- 3 just due to round-off errors, and can be wrong by hundreds of frames in the case of a variable frame-rate movie.
The only reliable way to find the number of frames in a movie is to read all of the frames, counting as you go.
