made num_frames and frame_idx ints