As I understand that a video file is a binary file, the frames are not really present in a contiguous manner in a video file, so reading the video file by doing a seek and reading it frame by frame wouldn't work until you have loaded the entire file into memory and then go through it frame by frame.
But if you see any video file reading library eg opencv code, you can read each frame one by one by calling read multiple times in a loop.
video=cv2.VideoCapture(video_path)
grabbed, frame=video.read()
My question is how do they(such libraries) work internally to read the frames one by one without loading the entire video file in memory since frames are not really present in a video file in a contiguous manner so the seek and read x+size data wouldn't work.