changed video frame index reading